Rev 15179 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
11375 | bpr | 1 | type=question |
13714 | obado | 2 | textarea="data1 data2 data3 data4 data5 data6 data7 data8 data9 data10 instruction" |
3 | asis="data1 data2 data3 data4 data5 data6 data7 data8 data9 data10 instruction" |
||
4 | iEdit="instruction" |
||
3445 | bpr | 5 | |
13714 | obado | 6 | :Several questions on the same screen |
7 | |||
8 | <p>This exercise presents several multiple choice questions.</p> |
||
9 | <p>The number of questions is limited to 10. |
||
10 | You can chose the number of questions to be presented for each exercise, |
||
11 | and if these questions will be taken randomly or not.</p> |
||
15179 | lemaire | 12 | <p>Author of the model: <a href="mailto:bernadette.m.riou@orange.fr">Bernadette Perrin-Riou</a></p> |
3445 | bpr | 13 | |
14 | :%%%%%%%%%%%%%%%%% ATTENTION %%%%%%%%%%%%%%%%%%%% |
||
15 | |||
11544 | obado | 16 | Remove the above header if you destroy the model tags! (The lines starting |
17 | with a ':'.) Otherwise the exercise might not be taken back by Createxo. |
||
3445 | bpr | 18 | |
11544 | obado | 19 | :%%%%%%%% Sample parameters to be redefined %%%%%%%%%%%%%%%%% |
3445 | bpr | 20 | |
13714 | obado | 21 | :\title{Several multiple choices} |
5147 | bpr | 22 | :\author{Bernadette, Perrin-Riou} |
3445 | bpr | 23 | :\email{bpr@math.u-psud.fr} |
9925 | obado | 24 | :\credits{Image from Pfly [CC BY-SA 2.5], via Wikimedia Commons} |
13714 | obado | 25 | |
9925 | obado | 26 | :Global Instruction |
9980 | obado | 27 | A global instruction displayed before questions. |
28 | $embraced_randitem |
||
9925 | obado | 29 | \text{instruction=Répondez à chaque question d'une première série, validez, puis répondez aux questions de la seconde série.} |
3445 | bpr | 30 | |
9925 | obado | 31 | :Random order |
9980 | obado | 32 | Choose "yes" to display questions in a random order, "no" otherwise. |
33 | \text{alea=item(1, yes, no)} |
||
3451 | obado | 34 | |
9925 | obado | 35 | :Maximum questions by step |
13714 | obado | 36 | WIMS will automatically separate your exercise into steps |
37 | based on the total number of questions and the number of questions by steps. |
||
15044 | lemaire | 38 | \text{N=3} |
3451 | obado | 39 | |
9925 | obado | 40 | :Maximum steps |
13714 | obado | 41 | Maximum amount of steps to produce |
3445 | bpr | 42 | \text{MAX=2} |
3451 | obado | 43 | |
9925 | obado | 44 | :Text for "Your response" feedback |
3451 | obado | 45 | |
9925 | obado | 46 | \text{qcm_prompt1=Your response:} |
3451 | obado | 47 | |
9925 | obado | 48 | :Text for "The good responses were..." feedback |
3451 | obado | 49 | |
9925 | obado | 50 | \text{qcm_prompt2=The good responses were... :} |
3451 | obado | 51 | |
9925 | obado | 52 | :Text for "Good response!" feedback |
3451 | obado | 53 | |
9925 | obado | 54 | \text{good_answer_text=Good response!} |
3451 | obado | 55 | |
9925 | obado | 56 | :Text for "Bad response!" feedback |
3451 | obado | 57 | |
9925 | obado | 58 | \text{bad_answer_text=Bad response!} |
3451 | obado | 59 | |
9925 | obado | 60 | :Text for "Incomplete response!" feedback |
3451 | obado | 61 | |
9925 | obado | 62 | \text{incomplete_answer_text=Incomplete response...} |
3451 | obado | 63 | |
13714 | obado | 64 | :CSS for questions |
3451 | obado | 65 | |
9925 | obado | 66 | \text{style_question=background-color: #F2F9FC;} |
3451 | obado | 67 | |
9925 | obado | 68 | :CSS for responses |
3451 | obado | 69 | |
15044 | lemaire | 70 | \text{style_reponse=color:#555;font-size:90%;} |
3451 | obado | 71 | |
13714 | obado | 72 | :Percentage of success required to proceed to the next step (if Maximum steps> 1) |
3451 | obado | 73 | |
3445 | bpr | 74 | \text{percent=0} |
3451 | obado | 75 | |
9925 | obado | 76 | :Embraced Randitem |
5797 | bpr | 77 | $embraced_randitem |
9925 | obado | 78 | \text{accolade=item(2, yes, no)} |
5797 | bpr | 79 | |
15044 | lemaire | 80 | :Display response analysis |
81 | Let us assume that the exercise is used with the setting |
||
82 | "Never post the right answers." |
||
83 | <ul><li>If you choose "yes" then, after each question, it will be |
||
84 | be indicated whether the selected choices are right or wrong. |
||
85 | <li></li> |
||
86 | If you choose "no" then, after each question, the selected choices |
||
87 | will be displayed without any indication. |
||
88 | </li></ul> |
||
17142 | obado | 89 | In other cases, after each question, it will be indicated whether |
90 | the selected choices are right or wrong and in case of error, |
||
15044 | lemaire | 91 | the list of correct choices will be displayed. |
92 | |||
9925 | obado | 93 | \text{answer_given=item(1, yes, no)} |
94 | |||
95 | :Questions |
||
13714 | obado | 96 | <p>Enter here the question to ask, according to the following format:</p> |
9925 | obado | 97 | <ol> |
13714 | obado | 98 | <li>The first line contains the statement of the question.</li> |
99 | <li>The second line represents feedback, which will be displayed |
||
100 | after validation of the answers (can be left empty).</li> |
||
101 | <li>Enter on the 3rd line the list of correct answer numbers, separated by commas. |
||
102 | (The numbers represent the order in which the proposals are written below)</li> |
||
103 | <li>Each following line represents the different response proposals.</li></ol> |
||
104 | <div style="border-left:2px solid orange;width:45em;background-color:white;padding:1em .5em;">Example : <br/> |
||
105 | <pre>Statement of question #1 |
||
106 | Feedback displayed if wrong answer to question #1 |
||
107 | Number(s) of the correct answer(s) |
||
108 | Choice #1 |
||
109 | Choice #2 |
||
110 | Choice #3</pre></div> |
||
111 | <p class="oef_indbad"><strong>Warning:</strong> Semicolons are forbidden here</p> |
||
9925 | obado | 112 | <hr/> |
13714 | obado | 113 | <p><em>Optional:</em> You can optionally add a first line that will contain variables to insert a title, an image, sound. |
114 | (nb: you must be in a class or module to transfer these files).<br/> |
||
115 | In this case, it will be the second line (and not the first) that will represent the statement, the third one the feedback, and so on .... |
||
116 | </p> |
||
117 | Possible variables are: |
||
3452 | obado | 118 | <ul> |
13714 | obado | 119 | <li><code>Qtitle</code> : display a title at the beginning of the question. (for example to indicate the theme)</li> |
120 | <li><code>Qimage</code> : if an image file is specified, it will be displayed at the beginning of the question. |
||
121 | (only works in a module or class)</li> |
||
122 | <li><code>Qaudio</code> : if a sound file is indicated, it will be displayed at the beginning of the question. |
||
123 | (only works in a module or class, known bugs with Safari)</li> |
||
124 | </ul> |
||
9925 | obado | 125 | <div style="border-left:2px solid orange;width:45em;background-color:white;padding:1em .5em;">Exemple : <br/> |
13714 | obado | 126 | <pre>Qtitle="Title of the question #2" Qimage="image.jpg" Qaudio="sound.mp3" |
127 | Statement of question #2 |
||
128 | Feedback displayed if wrong answer to question #2 |
||
129 | Number(s) of the correct answer(s) |
||
130 | Choice #1 |
||
131 | Choice #2 |
||
132 | Choice #3</pre> |
||
133 | </div> |
||
134 | \text{data1=asis(In what year was the filament bulb invented? |
||
135 | It was invented in 1879 by the Englishman Joseph Swan before being improved by the work of the American Thomas Edison. |
||
3445 | bpr | 136 | 1 |
13714 | obado | 137 | 1879 |
138 | 1959 |
||
139 | 1919 |
||
140 | 1859)} |
||
3445 | bpr | 141 | |
3451 | obado | 142 | :Question 2 |
143 | |||
13714 | obado | 144 | \text{data2=asis(In 2016, what was the most populous city in the world? |
145 | It is Tokyo, the capital of Japan (38.14 million inhabitants), far ahead of the others (which have between 20 and 24 million inhabitants). <p class="right">Source<a href="https://www.infoplease.com/world/population-statistics/most-populous-cities-world" target="_blank">infoplease.com</a></p> |
||
9925 | obado | 146 | 7 |
147 | Beijing |
||
148 | Karachi |
||
149 | Manille |
||
3451 | obado | 150 | Mexico |
151 | New York |
||
9925 | obado | 152 | Shanghaï |
153 | Tokyo)} |
||
3451 | obado | 154 | |
155 | :Question 3 |
||
156 | |||
15044 | lemaire | 157 | \text{data3=asis(What's the name of this river? <div><img src="http://upload.wikimedia.org/wikipedia/commons/e/e4/Mekong_River_watershed.png"/></div> |
13714 | obado | 158 | About 70 million people live directly in the Mekong watershed. |
3451 | obado | 159 | 1 |
13714 | obado | 160 | The Mekong |
161 | The Yangzi Jiang |
||
162 | The Volga |
||
163 | The Danube)} |
||
3451 | obado | 164 | |
165 | :Question 4 |
||
166 | |||
13714 | obado | 167 | \text{data4=asis(Qtitle="Painting" |
168 | Among these different painters, which are part of the Impressionist movement? |
||
169 | Ingres is associated with the Romantic current, and Raphael with the Renaissance. |
||
3452 | obado | 170 | 1,3 |
171 | Edgar Degas |
||
172 | Dominique Ingres |
||
173 | Claude Monet |
||
13714 | obado | 174 | Raphael)} |
3451 | obado | 175 | |
176 | :Question 5 |
||
177 | |||
13714 | obado | 178 | \text{data5=asis(Qtitle="ANIMALS" |
179 | What is the cry of the camel? |
||
180 | The braying is the cry of the donkey, the bleating: that of sheep and goats. |
||
3451 | obado | 181 | 1 |
13714 | obado | 182 | The blatter |
183 | The braying |
||
184 | The bleating)} |
||
3451 | obado | 185 | |
186 | :Question 6 |
||
187 | |||
13714 | obado | 188 | \text{data6=asis(Qtitle="Chemistry" |
189 | What is the chemical formula of testosterone? |
||
190 | C<sub>8</sub>H<sub>10</sub>N<sub>4</sub>O<sub>2</sub> is caffeine, C<sub>3</sub>H<sub>5</sub>N<sub>3</sub>O<sub>9</sub> the nitroglycerin, and C<sub>17</sub>H<sub>19</sub>NO<sub>3</sub> the morphine |
||
3451 | obado | 191 | 4 |
192 | C<sub>8</sub>H<sub>10</sub>N<sub>4</sub>O<sub>2</sub> |
||
193 | C<sub>3</sub>H<sub>5</sub>N<sub>3</sub>O<sub>9</sub> |
||
194 | C<sub>17</sub>H<sub>19</sub>NO<sub>3</sub> |
||
9925 | obado | 195 | C<sub>19</sub>H<sub>28</sub>O<sub>2</sub>)} |
3451 | obado | 196 | |
197 | :Question 7 |
||
198 | |||
13714 | obado | 199 | \text{data7=asis(From which day is "Beaujolais Nouveau" available for sale in France? |
200 | The "Beaujolais Nouveau" is a wine of primeur, that is to say a wine of the same year, whose marketing is allowed immediately after the end of the vinification. |
||
3451 | obado | 201 | 3 |
13714 | obado | 202 | the first Thursday of November |
203 | the second Thursday of November |
||
204 | the third Thursday of November |
||
205 | the fourth Thursday of November |
||
206 | )} |
||
3451 | obado | 207 | |
208 | :Question 8 |
||
209 | |||
13714 | obado | 210 | \text{data8=asis(In the movie <i>"Rain Man"</i>, which actor has an autistic gifted brother? |
211 | <i>Rain Man</i> is an American film directed by Barry Levinson. |
||
3451 | obado | 212 | 2 |
213 | Bruce Willis |
||
214 | Tom Cruise |
||
9925 | obado | 215 | Woody Allen)} |
3451 | obado | 216 | |
217 | :Question 9 |
||
218 | |||
13714 | obado | 219 | \text{data9=asis(Water skiing has been an Olympic discipline since 1976. |
220 | The appearance of water skiing at the Olympic Games dates back to 2004. However, it had been a demonstration sport in 1972. |
||
3451 | obado | 221 | 2 |
15044 | lemaire | 222 | True |
223 | False)} |
||
3451 | obado | 224 | |
225 | :Question 10 |
||
226 | |||
13714 | obado | 227 | \text{data10=asis(Qtitle="Music" |
228 | What is the first ballet written by Tchaikovsky? |
||
229 | Swan Lake was written in 1875 and Nutcracker in 1891. |
||
3451 | obado | 230 | 1 |
13714 | obado | 231 | Swan Lake |
232 | Nutcracker)} |
||
3451 | obado | 233 | |
15044 | lemaire | 234 | :Answer type |
235 | Choose "checkbox" to let a user select several choices.<br/> |
||
236 | Choose "radio" if only one of the choices has to be selected. |
||
237 | \text{format=item(1, checkbox, radio)} |
||
238 | |||
3459 | bpr | 239 | : |
15044 | lemaire | 240 | \language{en} |
3445 | bpr | 241 | \computeanswer{no} |
242 | \format{html} |
||
243 | |||
244 | \text{paste=yes} |
||
9925 | obado | 245 | |
3445 | bpr | 246 | \text{option=} |
9925 | obado | 247 | |
9980 | obado | 248 | :%%%%%%%%%%%%%% Nothing to modify until statement %%%%%%%%%%%%%%%% |
15044 | lemaire | 249 | \text{givegood=slib(oef/env givegood)} |
250 | \text{givegood=\givegood issametext ? 1} |
||
251 | \text{answer_given=\givegood>0? yes} |
||
3445 | bpr | 252 | \text{data_q=\data1!= ? 1:} |
253 | \text{data_q=\data2!= ? wims(append item 2 to \data_q)} |
||
254 | \text{data_q=\data3!= ? wims(append item 3 to \data_q)} |
||
255 | \text{data_q=\data4!= ? wims(append item 4 to \data_q)} |
||
256 | \text{data_q=\data5!= ? wims(append item 5 to \data_q)} |
||
257 | \text{data_q=\data6!= ? wims(append item 6 to \data_q)} |
||
258 | \text{data_q=\data7!= ? wims(append item 7 to \data_q)} |
||
259 | \text{data_q=\data8!= ? wims(append item 8 to \data_q)} |
||
260 | \text{data_q=\data9!= ? wims(append item 9 to \data_q)} |
||
3451 | obado | 261 | \text{data_q=\data10!= ? wims(append item 10 to \data_q)} |
3445 | bpr | 262 | |
9980 | obado | 263 | \text{instruction=\accolade issametext yes ? wims(embraced randitem \instruction):\instruction} |
264 | |||
3445 | bpr | 265 | \integer{cnt_question=items(\data_q)} |
266 | |||
267 | \text{nopaste=\paste issametext no ? slib(utilities/nopaste )} |
||
268 | |||
15044 | lemaire | 269 | \text{style = <style> |
3452 | obado | 270 | .enonce{margin-bottom:0} |
9925 | obado | 271 | .qcm_prompt2{margin-top:.5em} |
272 | img{vertical-align:middle;} |
||
273 | .q_num, .panel .wims_title{ |
||
15044 | lemaire | 274 | font-size:120%;font-family:Impact, Charcoal, sans-serif; |
17142 | obado | 275 | color:#717171; |
9925 | obado | 276 | } |
15044 | lemaire | 277 | .feedback{border:1px dashed grey;padding:.5em;margin-top:.5em;} |
9925 | obado | 278 | .reponse { |
279 | margin: 0 1em; |
||
280 | padding: .5em; |
||
281 | border-radius:5px; |
||
282 | \style_reponse |
||
283 | } |
||
284 | .panel{ |
||
285 | padding:.5em 1em .5em 1em; |
||
286 | margin:.5em 0; |
||
287 | border:1px solid #d8d8d8; |
||
288 | border-radius:5px; |
||
289 | } |
||
290 | .panel.callout{ |
||
291 | border-color:#c5e5f3; |
||
292 | border-width:2px; |
||
293 | \style_question |
||
294 | } |
||
295 | .callout .q_num, .callout .wims_title{color:black;} |
||
7717 | bpr | 296 | |
9925 | obado | 297 | .panel .wims_title, .panel .wimscenter{margin-top:-1.2em;} |
15044 | lemaire | 298 | ol li{margin-bottom: .5em;list-style:upper-alpha;} |
299 | input[type='checkbox'] { font-size:120%; } |
||
9925 | obado | 300 | .strike{text-decoration:line-through;} |
301 | .oef_indpartial{color:navy;} |
||
3445 | bpr | 302 | </style> |
9925 | obado | 303 | } |
3445 | bpr | 304 | |
305 | \integer{N = min(\cnt_question,\N)} |
||
306 | \integer{MAX=min(\N*\MAX,\cnt_question)} |
||
9925 | obado | 307 | \text{battage=\alea issametext yes ? shuffle(\data_q,,) :\data_q} |
3445 | bpr | 308 | \text{battage=wims(nonempty items \battage)} |
7717 | bpr | 309 | |
3445 | bpr | 310 | \text{option=\option noanalyzeprint} |
311 | \matrix{question=} |
||
7717 | bpr | 312 | \matrix{explication=xxx} |
3445 | bpr | 313 | \matrix{rep=} |
314 | \text{CNT_choix= } |
||
315 | \matrix{CHOIX=} |
||
316 | \text{PRELIMINAIRE=} |
||
9925 | obado | 317 | |
3445 | bpr | 318 | \for{i= 1 to \MAX}{ |
9925 | obado | 319 | \matrix{QUEST=\battage[\i]=1? \data1} |
320 | \matrix{QUEST=\battage[\i]=2? \data2} |
||
321 | \matrix{QUEST=\battage[\i]=3? \data3} |
||
322 | \matrix{QUEST=\battage[\i]=4? \data4} |
||
323 | \matrix{QUEST=\battage[\i]=5? \data5} |
||
324 | \matrix{QUEST=\battage[\i]=6? \data6} |
||
325 | \matrix{QUEST=\battage[\i]=7? \data7} |
||
326 | \matrix{QUEST=\battage[\i]=8? \data8} |
||
327 | \matrix{QUEST=\battage[\i]=9? \data9} |
||
328 | \matrix{QUEST=\battage[\i]=10? \data10} |
||
7717 | bpr | 329 | |
3445 | bpr | 330 | \text{preliminaire_test=\QUEST} |
331 | \text{preliminaire_test=row(1,\preliminaire_test)} |
||
9925 | obado | 332 | \text{inst_audio=wims(getopt Qaudio in \preliminaire_test)} |
333 | \text{inst_image=wims(getopt Qimage in \preliminaire_test)} |
||
334 | \text{inst_title=wims(getopt Qtitle in \preliminaire_test)} |
||
335 | |||
3445 | bpr | 336 | \text{rab_inst=} |
9925 | obado | 337 | \text{rab_inst=\inst_title notsametext ?\rab_inst <h2 class="wims_title">\inst_title</h2>} |
338 | \text{rab_inst=\inst_image notsametext ?\rab_inst <div class="wimscenter"><img src="\imagedir/\inst_image" alt="" /></div>} |
||
3445 | bpr | 339 | \if{\inst_audio notsametext }{ |
9925 | obado | 340 | \text{rab_inst1= . isin \inst_audio ? |
341 | <audio controls> |
||
342 | <source src="\imagedir/\inst_audio" type="audio/mpeg"> |
||
13714 | obado | 343 | Sorry, your browser can't play audio files. |
9925 | obado | 344 | </audio>} |
345 | \text{rab_inst=\rab_inst <div class="wimscenter audio">\rab_inst1[1;1]</div>} |
||
346 | } |
||
347 | |||
348 | \integer{test_inst=\inst_audio\inst_image\inst_title notsametext ? 1 : 0} |
||
349 | \text{preliminaire=\test_inst=1 ? \rab_inst: } |
||
350 | \matrix{QUEST=\test_inst=1 ? \QUEST[2..-1;]} |
||
9980 | obado | 351 | \matrix{QUEST=\accolade issametext yes ?wims(embraced randitem \QUEST):\QUEST} |
9925 | obado | 352 | \matrix{question = \question |
353 | \QUEST[1;]} |
||
354 | \matrix{PRELIMINAIRE=\PRELIMINAIRE |
||
355 | \preliminaire} |
||
356 | |||
357 | \text{expl=\QUEST[2;]} |
||
358 | \text{ligne=wims(upper \expl)} |
||
359 | \text{ligne=wims(text select ABCDEFGHIJKLMNOPQRSTUVWXYZ in \ligne)} |
||
360 | \if{\ligne issametext and \expl notsametext }{ |
||
7717 | bpr | 361 | \matrix{explication = \explication;} |
3445 | bpr | 362 | \integer{debut = 2} |
363 | } |
||
364 | \if{\ligne issametext and \expl issametext }{ |
||
7717 | bpr | 365 | \matrix{explication = \explication;} |
3445 | bpr | 366 | \integer{debut = 3} |
367 | } |
||
368 | \if{\ligne notsametext}{ |
||
7717 | bpr | 369 | \matrix{explication = \explication;\expl} |
3445 | bpr | 370 | \integer{debut = 3} |
371 | } |
||
372 | \integer{cnt_choix=rows(\QUEST)-\debut} |
||
373 | \text{CNT_choix=\CNT_choix,\cnt_choix} |
||
374 | \text{Choix=} |
||
375 | \text{mix=shuffle(\cnt_choix)} |
||
15044 | lemaire | 376 | \for{j=\debut+1 to \cnt_choix + \debut+1}{ |
3445 | bpr | 377 | \text{choix= \QUEST[\j;]} |
378 | \text{choix=wims(replace internal , by , in \choix)} |
||
379 | \matrix{Choix = \Choix, \choix[1;]} |
||
380 | } |
||
381 | \text{Choix=wims(nonempty items \Choix)} |
||
382 | \text{Choix= \Choix[\mix]} |
||
383 | \matrix{CHOIX=\CHOIX |
||
384 | \Choix} |
||
385 | \text{H = wims(nospace \QUEST[\debut;])} |
||
386 | \text{cnt_c=items(\H)} |
||
387 | \text{Rep = } |
||
7717 | bpr | 388 | \for{ k = 1 to \cnt_c}{ |
3445 | bpr | 389 | \text{Rep = \Rep, position(\H[\k],\mix)} |
390 | } |
||
391 | \text{Rep = wims(sort items wims(nonempty items \Rep))} |
||
392 | \matrix{rep = \rep |
||
393 | \Rep} |
||
394 | } |
||
395 | |||
396 | \text{CNT_choix=wims(nonempty items \CNT_choix)} |
||
397 | |||
398 | \text{U = pari(divrem(\MAX,\N)~)} |
||
399 | \integer{cnt_step = \U[1] + 1} |
||
400 | \matrix{STEPS = } |
||
401 | \matrix{CNT = } |
||
402 | \text{CONDSTEP=} |
||
403 | \for{ u = 1 to \cnt_step -1}{ |
||
404 | \matrix{STEPS =\STEPS |
||
405 | wims(makelist r x for x = \N*\u -\N+1 to \N*\u)} |
||
406 | \matrix{CNT =\CNT |
||
407 | wims(makelist x for x = \N*\u -\N+1 to \N*\u)} |
||
408 | \text{condstep= wims(values \u+1 for x = (\u-1)*\N +1 to \u*\N)} |
||
409 | \text{CONDSTEP= wims(append item \condstep to \CONDSTEP)} |
||
410 | } |
||
411 | \matrix{STEPS = \STEPS |
||
15044 | lemaire | 412 | wims(makelist r x for x = \N*\cnt_step-\N+1 to \MAX) |
3445 | bpr | 413 | } |
414 | \matrix{CNT = \CNT |
||
15044 | lemaire | 415 | wims(makelist x for x = \N*\cnt_step-\N+1 to \MAX) |
3445 | bpr | 416 | } |
15044 | lemaire | 417 | \text{CONDSTEP=\CONDSTEP, wims(values \cnt_step+1 for x = \N*\cnt_step-\N+1 to \MAX)} |
3445 | bpr | 418 | |
419 | \text{nstep=\STEPS[1;]} |
||
420 | \text{TEST=} |
||
7717 | bpr | 421 | \text{explication=\explication[2..-1;]} |
422 | |||
3445 | bpr | 423 | text{testexp=wims(rows2lines \explication)} |
424 | text{testexp=wims(lines2items \testexp)} |
||
425 | text{testexp=wims(items2words \testexp)} |
||
426 | text{testexp=wims(nospace \testexp)} |
||
427 | \nextstep{\nstep} |
||
428 | \text{REP=} |
||
429 | \text{etape=wims(values x * \N for x = 1 to \cnt_step+1)} |
||
430 | \text{CONDITION = wims(makelist x for x = 1 to 2*\MAX)} |
||
431 | \text{CONDITION =wims(items2words \CONDITION)} |
||
432 | \conditions{\CONDITION} |
||
433 | \integer{cnt_juste=0} |
||
434 | \real{v = 10} |
||
15044 | lemaire | 435 | \integer{questioncnt=items(\question[;1])} |
436 | \text{latexsrc=} |
||
437 | \text{latexsol=} |
||
438 | \for{hh=1 to \questioncnt}{ |
||
439 | \text{prel=\PRELIMINAIRE[\hh;]!= and \PRELIMINAIRE[\hh;] notsametext ? \PRELIMINAIRE[\hh;] |
||
440 | \newline:} |
||
441 | \text{latexsrc=\latexsrc \item \prel \question[\hh;] |
||
442 | \begin{\format}} |
||
443 | \for{ss=1 to \CNT_choix[\hh]}{\text{latexsrc=\latexsrc\item \CHOIX[\hh;\ss]}} |
||
444 | \text{listsol=\CHOIX[\hh;\rep[\hh;]]} |
||
445 | \text{latexsol=\latexsol \item \listsol} |
||
446 | \text{latexsrc=\latexsrc |
||
447 | \end{\format}} |
||
448 | } |
||
9925 | obado | 449 | |
3445 | bpr | 450 | \statement{\nopaste |
9925 | obado | 451 | \style |
15044 | lemaire | 452 | <div class="instruction">\instruction</div> |
9925 | obado | 453 | |
454 | \for{h=1 to \etape[\step]}{ |
||
455 | |||
15044 | lemaire | 456 | \if{\question[\h;] notsametext }{ |
457 | \if{\h <= \etape[\step] - \N} |
||
17142 | obado | 458 | {<fieldset class="panel">} |
459 | {\if{r \h isitemof \nstep}{<fieldset class="panel callout">}} |
||
15044 | lemaire | 460 | } |
9925 | obado | 461 | |
3445 | bpr | 462 | \if{(\h <= \etape[\step] - \N or r \h isitemof \nstep) and \question[\h;] notsametext }{ |
6647 | bpr | 463 | <div class="enonce"> |
15044 | lemaire | 464 | \if{\cnt_step > 1 and \MAX > 1}{<span class="q_num">\h. </span>} |
465 | \if{\PRELIMINAIRE[\h;] notsametext and \PRELIMINAIRE[\h;] notsametext } |
||
466 | {<div class="preliminaire">\PRELIMINAIRE[\h;]</div>} |
||
467 | <span class="question">\question[\h;]</span> |
||
9925 | obado | 468 | </div> |
3445 | bpr | 469 | } |
9925 | obado | 470 | |
3445 | bpr | 471 | \if{\h <= \etape[\step] - \N and \question[\h;] notsametext}{ |
472 | <div class="reponse"> |
||
9925 | obado | 473 | <span class="qcm_prompt1">\qcm_prompt1</span> |
3445 | bpr | 474 | \for{ a in \REP[\h;]}{ |
15044 | lemaire | 475 | \if{\answer_given=yes}{ |
476 | \if{ \a isitemof \CHOIX[\h;\rep[\h;]]}{ |
||
477 | \if{\TEST[\h;2]>0 and \TEST[\h;3]=0}{ |
||
478 | <span class="oef_indpartial">\a</span>} |
||
479 | {<span class="oef_indgood">\a</span>} |
||
480 | }{ |
||
481 | <span class="oef_indbad strike">\a</span>} - } |
||
482 | {<span class="oef_indneutral">\a</span> -} |
||
3445 | bpr | 483 | } |
15044 | lemaire | 484 | \if{\answer_given=yes}{ |
485 | \if{\TEST[\h;2]>0 and \TEST[\h;3]=0} |
||
486 | {\incomplete_answer_text |
||
487 | \if{\givegood>0}{<br /> <span class="prompt">\qcm_prompt2</span> |
||
488 | <span class="oef_indgood">\CHOIX[\h;\rep[\h;]]</span>} |
||
489 | } |
||
490 | \if{\TEST[\h;3]>0} |
||
491 | {\bad_answer_text |
||
492 | \if{\givegood>0}{ |
||
493 | <br /> <span class="prompt">\qcm_prompt2</span> |
||
494 | <span class="oef_indgood">\CHOIX[\h;\rep[\h;]]</span>} |
||
9925 | obado | 495 | } |
15044 | lemaire | 496 | \if{\TEST[\h;3]=0 and \TEST[\h;2]=0} |
497 | {\good_answer_text} |
||
498 | } |
||
499 | \if{\givegood>0}{ |
||
500 | \if{\explication[\h;] notsametext }{<div class="feedback">\explication[\h;]</div>} |
||
501 | } |
||
3445 | bpr | 502 | </div> |
15044 | lemaire | 503 | }{ |
504 | \if{ r \h isitemof \nstep}{ |
||
3445 | bpr | 505 | <div class="question"> |
9925 | obado | 506 | <ol> |
507 | \for{s=1 to \CNT_choix[\h]}{ <li>\embed{reply \h , \s}</li> } |
||
508 | </ol> |
||
3445 | bpr | 509 | </div> |
510 | } |
||
511 | } |
||
15044 | lemaire | 512 | \if{\question[\h;] notsametext |
17142 | obado | 513 | and (\h <= \etape[\step] - \N or r \h isitemof \nstep)}{</fieldset>} |
3445 | bpr | 514 | } |
515 | } |
||
516 | \answer{}{\REP1;\CHOIX[1;]}{type=\format}{option=\option} |
||
517 | \answer{}{\REP2;\CHOIX[2;]}{type=\format}{option=\option} |
||
518 | \answer{}{\REP3;\CHOIX[3;]}{type=\format}{option=\option} |
||
519 | \answer{}{\REP4;\CHOIX[4;]}{type=\format}{option=\option} |
||
520 | \answer{}{\REP5;\CHOIX[5;]}{type=\format}{option=\option} |
||
521 | \answer{}{\REP6;\CHOIX[6;]}{type=\format}{option=\option} |
||
522 | \answer{}{\REP7;\CHOIX[7;]}{type=\format}{option=\option} |
||
523 | \answer{}{\REP8;\CHOIX[8;]}{type=\format}{option=\option} |
||
524 | \answer{}{\REP9;\CHOIX[9;]}{type=\format}{option=\option} |
||
525 | \answer{}{\REP10;\CHOIX[10;]}{type=\format}{option=\option} |
||
526 | |||
527 | \matrix{REP = \REP1 |
||
528 | \REP2 |
||
529 | \REP3 |
||
530 | \REP4 |
||
531 | \REP5 |
||
532 | \REP6 |
||
533 | \REP7 |
||
534 | \REP8 |
||
535 | \REP9 |
||
536 | \REP10} |
||
537 | \if{\format=radio}{ |
||
15044 | lemaire | 538 | \text{REP=wims(replace internal , by , in \REP)} |
3445 | bpr | 539 | } |
540 | \matrix{explication2 = \explication2} |
||
541 | |||
542 | \for{u = 1 to \N}{ |
||
543 | \text{H = \CNT[\step-1;\u]} |
||
544 | \text{test1 = wims(listuniq \REP[\H;],\CHOIX[\H;\rep[\H;]])} |
||
545 | \integer{test1 = items(\test1)-items(\CHOIX[\H;\rep[\H;]])} |
||
546 | \text{test2 = wims(listcomplement \REP[\H;] in \CHOIX[\H;\rep[\H;]])} |
||
547 | \text{test3 = wims(listcomplement \CHOIX[\H;\rep[\H;]] in \REP[\H;])} |
||
548 | %%% \integer{test4=items(\REP[\H;]) - items(\CHOIX[\H;])} |
||
7717 | bpr | 549 | \text{test_cnt=\test1, items(\test2),items(\test3)} |
3445 | bpr | 550 | \integer{cnt_juste= \test_cnt[1]+\test_cnt[2]+\test_cnt[3] =0 ? \cnt_juste + 1} |
551 | \matrix{TEST=\TEST |
||
552 | \test_cnt} |
||
553 | } |
||
554 | |||
13714 | obado | 555 | # test1 = 0 rep < juste |
556 | # test2 number of answers said to be right and in fact false |
||
557 | # test3 number of false and actually just answers |
||
3445 | bpr | 558 | |
13714 | obado | 559 | # totally right: test1=0, test2=0 test3=0 |
560 | # partially right : |
||
3445 | bpr | 561 | |
562 | \real{v=\cnt_juste/\CNT[\step-1;\N]} |
||
563 | |||
564 | \text{nstep = \v >= \percent ? \STEPS[\step;]:} |
||
565 | |||
566 | \condition{Question 1 : \REP1}{\TEST[1;3]=0}{option=hide} |
||
567 | \condition{Question 1 : \REP1}{\TEST[1;1]=0 and \TEST[1;2]=0 and \TEST[1;3]=0}{option=hide} |
||
568 | \condition{Question 2 : \REP2}{\TEST[2;3]=0 and \step >=\CONDSTEP[2]}{option=hide} |
||
569 | \condition{Question 2 : \REP2}{\TEST[2;1]=0 and \TEST[2;2]=0 and \TEST[2;3]=0 and \step >=\CONDSTEP[2]}{option=hide} |
||
570 | \condition{Question 3 : \REP3}{\TEST[3;3]=0 and \step >=\CONDSTEP[3]}{option=hide} |
||
571 | \condition{Question 3 : \REP3}{\TEST[3;1]=0 and \TEST[3;2]=0 and \TEST[3;3]=0 and \step >=\CONDSTEP[3]}{option=hide} |
||
572 | \condition{Question 4 : \REP4}{\TEST[4;3]=0 and \step >=\CONDSTEP[4]}{option=hide} |
||
573 | \condition{Question 4 : \REP4}{\TEST[4;1]=0 and \TEST[4;2]=0 and \TEST[4;3]=0 and \step >=\CONDSTEP[4]}{option=hide} |
||
574 | \condition{Question 5 : \REP5}{\TEST[5;3]=0 and \step >=\CONDSTEP[5]}{option=hide} |
||
575 | \condition{Question 5 : \REP5}{\TEST[5;1]=0 and \TEST[5;2]=0 and \TEST[5;3]=0 and \step >=\CONDSTEP[5]}{option=hide} |
||
576 | \condition{Question 6 : \REP6}{\TEST[6;3]=0 and \step >=\CONDSTEP[6]}{option=hide} |
||
577 | \condition{Question 6 : \REP6}{\TEST[6;1]=0 and \TEST[6;2]=0 and \TEST[6;3]=0 and \step >=\CONDSTEP[6]}{option=hide} |
||
578 | \condition{Question 7 : \REP7}{\TEST[7;3]=0 and \step >=\CONDSTEP[7]}{option=hide} |
||
579 | \condition{Question 7 : \REP7}{\TEST[7;1]=0 and \TEST[7;2]=0 and \TEST[7;3]=0 and \step >=\CONDSTEP[7]}{option=hide} |
||
580 | \condition{Question 8 : \REP8}{\TEST[8;3]=0 and \step >=\CONDSTEP[8]}{option=hide} |
||
581 | \condition{Question 8 : \REP8}{\TEST[8;1]=0 and \TEST[8;2]=0 and \TEST[8;3]=0 and \step >=\CONDSTEP[8]}{option=hide} |
||
582 | \condition{Question 9 : \REP9}{\TEST[9;3]=0 and \step >=\CONDSTEP[9]}{option=hide} |
||
583 | \condition{Question 9 : \REP9}{\TEST[9;1]=0 and \TEST[9;2]=0 and \TEST[9;3]=0 and \step >=\CONDSTEP[9]}{option=hide} |
||
584 | \condition{Question 10 : \REP10}{\TEST[10;3]=0 and \step >=\CONDSTEP[10]}{option=hide} |
||
585 | \condition{Question 10 : \REP10}{\TEST[10;1]=0 and \TEST[10;2]=0 and \TEST[10;3]=0 and \step >=\CONDSTEP[10]}{option=hide} |
||
586 | |||
587 | |||
588 | \text{test=wims(rows2lines \explication)} |
||
589 | \text{test=wims(lines2items \test)} |
||
590 | \text{test=wims(items2words \test)} |
||
591 | \text{test=wims(nospace \test)} |
||
7717 | bpr | 592 | feedback{1=1}{\explication |
3445 | bpr | 593 | \if{\test notsametext}{ |
594 | <div class="reponse"><ol> |
||
595 | \for{w = 1 to \MAX}{ |
||
596 | \if{\explication[\w;] notsametext } |
||
7097 | bpr | 597 | {<li style="list-style:decimal;" value="\w">\explication[\w;] </li>} |
3445 | bpr | 598 | } |
599 | </ol> |
||
600 | </div> |
||
601 | } |
||
602 | } |
||
603 | {<ol> |
||
604 | \for{ t = 1 to \N}{ |
||
605 | \if{\CNT[\step;\t] != }{ |
||
7097 | bpr | 606 | <li style="list-style:decimal;" value="\CNT[\step;\t]"> <b>\question[\N*(\step-1) + \t;]</b> |
3445 | bpr | 607 | <div class="question"><ol> |
608 | \for{s=1 to \CNT_choix[\N*(\step-1) + \t]}{ |
||
609 | <li>\embed{\STEPS[\step;\t] , \s }</li> |
||
610 | } |
||
611 | </ol> |
||
612 | </div> |
||
613 | </li>} |
||
614 | } |
||
615 | </ol> |
||
6647 | bpr | 616 | } |
15044 | lemaire | 617 | |
618 | \latex{ |
||
619 | \begin{statement} |
||
620 | \instruction |
||
621 | \begin{enumerate} |
||
622 | \latexsrc |
||
623 | \end{enumerate} |
||
624 | \end{statement} |
||
625 | \begin{solution}\ |
||
626 | \begin{enumerate} |
||
627 | \latexsol |
||
628 | \end{enumerate} |
||
629 | \end{solution} |
||
630 | } |