Subversion Repositories wimsdev

Rev

Rev 15043 | Rev 15179 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 15043 Rev 15044
Line 33... Line 33...
33
\text{alea=item(1, yes, no)}
33
\text{alea=item(1, yes, no)}
34
 
34
 
35
:Maximum questions by step
35
:Maximum questions by step
36
WIMS will automatically separate your exercise into steps
36
WIMS will automatically separate your exercise into steps
37
based on the total number of questions and the number of questions by steps.
37
based on the total number of questions and the number of questions by steps.
38
\text{N=4}
38
\text{N=3}
39
 
39
 
40
:Maximum steps
40
:Maximum steps
41
Maximum amount of steps to produce
41
Maximum amount of steps to produce
42
\text{MAX=2}
42
\text{MAX=2}
43
 
43
 
Line 65... Line 65...
65
 
65
 
66
\text{style_question=background-color: #F2F9FC;}
66
\text{style_question=background-color: #F2F9FC;}
67
 
67
 
68
:CSS for responses
68
:CSS for responses
69
 
69
 
70
\text{style_reponse=background-color: #FFCC99;}
70
\text{style_reponse=color:#555;font-size:90%;}
71
 
71
 
72
:Percentage of success required to proceed to the next step (if Maximum steps> 1)
72
:Percentage of success required to proceed to the next step (if Maximum steps> 1)
73
 
73
 
74
\text{percent=0}
74
\text{percent=0}
75
 
75
 
76
:Embraced Randitem
76
:Embraced Randitem
77
$embraced_randitem
77
$embraced_randitem
78
\text{accolade=item(2, yes, no)}
78
\text{accolade=item(2, yes, no)}
79
 
79
 
80
:Display good answers
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
81
If yes, good answers will be displayed when learner fails.
87
 will be displayed without any indication.
-
 
88
</li></ul>
-
 
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, 
-
 
91
the list of correct choices will be displayed.
-
 
92
 
82
\text{answer_given=item(1, yes, no)}
93
\text{answer_given=item(1, yes, no)}
83
 
94
 
84
:Questions
95
:Questions
85
<p>Enter here the question to ask, according to the following format:</p>
96
<p>Enter here the question to ask, according to the following format:</p>
86
<ol>
97
<ol>
Line 141... Line 152...
141
Shanghaï
152
Shanghaï
142
Tokyo)}
153
Tokyo)}
143
 
154
 
144
:Question 3
155
:Question 3
145
 
156
 
146
\text{data3=asis(What's the name of this river: <img src="http://upload.wikimedia.org/wikipedia/commons/e/e4/Mekong_River_watershed.png"/>
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>
147
About 70 million people live directly in the Mekong watershed.
158
About 70 million people live directly in the Mekong watershed.
148
1
159
1
149
The Mekong
160
The Mekong
150
The Yangzi Jiang
161
The Yangzi Jiang
151
The Volga
162
The Volga
Line 191... Line 202...
191
the first Thursday of November
202
the first Thursday of November
192
the second Thursday of November
203
the second Thursday of November
193
the third Thursday of November
204
the third Thursday of November
194
the fourth Thursday of November
205
the fourth Thursday of November
195
)}
206
)}
196
 
207
 
197
:Question 8
208
:Question 8
198
 
209
 
199
\text{data8=asis(In the movie <i>"Rain Man"</i>, which actor has an autistic gifted brother?
210
\text{data8=asis(In the movie <i>"Rain Man"</i>, which actor has an autistic gifted brother?
200
<i>Rain Man</i> is an American film directed by Barry Levinson.
211
<i>Rain Man</i> is an American film directed by Barry Levinson.
201
2
212
2
202
Bruce Willis
213
Bruce Willis
203
Tom Cruise
214
Tom Cruise
204
Woody Allen)}
215
Woody Allen)}
205
 
216
 
206
:Question 9
217
:Question 9
207
 
218
 
208
\text{data9=asis(Water skiing has been an Olympic discipline since 1976.
219
\text{data9=asis(Water skiing has been an Olympic discipline since 1976.
209
The appearance of water skiing at the Olympic Games dates back to 2004. However, it had been a demonstration sport in 1972.
220
The appearance of water skiing at the Olympic Games dates back to 2004. However, it had been a demonstration sport in 1972.
210
2
221
2
211
Vrai
222
True
212
Faux)}
223
False)}
213
 
224
 
214
:Question 10
225
:Question 10
215
 
226
 
216
\text{data10=asis(Qtitle="Music"
227
\text{data10=asis(Qtitle="Music"
217
What is the first ballet written by Tchaikovsky?
228
What is the first ballet written by Tchaikovsky?
218
Swan Lake was written in 1875 and Nutcracker in 1891.
229
Swan Lake was written in 1875 and Nutcracker in 1891.
219
1
230
1
220
Swan Lake
231
Swan Lake
221
Nutcracker)}
232
Nutcracker)}
-
 
233
 
-
 
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)}
222
 
238
 
223
:
239
:
224
\language{fr}
240
\language{en}
225
\computeanswer{no}
241
\computeanswer{no}
226
\format{html}
242
\format{html}
227
 
-
 
228
\text{format=checkbox}
-
 
229
 
243
 
230
\text{paste=yes}
244
\text{paste=yes}
231
 
245
 
232
\text{option=}
246
\text{option=}
233
 
247
 
234
:%%%%%%%%%%%%%% Nothing to modify until statement %%%%%%%%%%%%%%%%
248
:%%%%%%%%%%%%%% Nothing to modify until statement %%%%%%%%%%%%%%%%
235
 
-
 
-
 
249
\text{givegood=slib(oef/env givegood)}
-
 
250
\text{givegood=\givegood issametext ? 1}
-
 
251
\text{answer_given=\givegood>0? yes}
236
\text{data_q=\data1!= ? 1:}
252
\text{data_q=\data1!= ? 1:}
237
\text{data_q=\data2!= ? wims(append item 2 to \data_q)}
253
\text{data_q=\data2!= ? wims(append item 2 to \data_q)}
238
\text{data_q=\data3!= ? wims(append item 3 to \data_q)}
254
\text{data_q=\data3!= ? wims(append item 3 to \data_q)}
239
\text{data_q=\data4!= ? wims(append item 4 to \data_q)}
255
\text{data_q=\data4!= ? wims(append item 4 to \data_q)}
240
\text{data_q=\data5!= ? wims(append item 5 to \data_q)}
256
\text{data_q=\data5!= ? wims(append item 5 to \data_q)}
Line 248... Line 264...
248
 
264
 
249
\integer{cnt_question=items(\data_q)}
265
\integer{cnt_question=items(\data_q)}
250
 
266
 
251
\text{nopaste=\paste issametext no ? slib(utilities/nopaste )}
267
\text{nopaste=\paste issametext no ? slib(utilities/nopaste )}
252
 
268
 
253
\text{style=<style>
269
\text{style = <style>
254
 .enonce{margin-bottom:0}
270
 .enonce{margin-bottom:0}
255
 .qcm_prompt2{margin-top:.5em}
271
 .qcm_prompt2{margin-top:.5em}
256
 img{vertical-align:middle;}
272
 img{vertical-align:middle;}
257
 .q_num, .panel .wims_title{
273
 .q_num, .panel .wims_title{
258
 font-size:150%;font-family:Impact, Charcoal, sans-serif;
274
 font-size:120%;font-family:Impact, Charcoal, sans-serif;
259
 color:#777;
275
 color:#777;
260
 }
276
 }
261
 .feedback{border:1px dashed grey;padding:0.5em;margin:0;}
277
 .feedback{border:1px dashed grey;padding:.5em;margin-top:.5em;}
262
 .reponse {
278
 .reponse {
263
   margin: 0 1em;
279
   margin: 0 1em;
264
   padding: .5em;
280
   padding: .5em;
265
   border-radius:5px;
281
   border-radius:5px;
266
   \style_reponse
282
   \style_reponse
Line 268... Line 284...
268
 .panel{
284
 .panel{
269
    padding:.5em 1em .5em 1em;
285
    padding:.5em 1em .5em 1em;
270
    margin:.5em 0;
286
    margin:.5em 0;
271
    border:1px solid #d8d8d8;
287
    border:1px solid #d8d8d8;
272
    border-radius:5px;
288
    border-radius:5px;
273
    background-color: #f2f2f2;
-
 
274
 }
289
 }
275
 .panel.callout{
290
 .panel.callout{
276
    border-color:#c5e5f3;
291
    border-color:#c5e5f3;
277
    border-width:2px;
292
    border-width:2px;
278
    \style_question
293
    \style_question
279
 }
294
 }
280
 .callout .q_num, .callout .wims_title{color:black;}
295
 .callout .q_num, .callout .wims_title{color:black;}
281
 
296
 
282
 .panel .wims_title, .panel .wimscenter{margin-top:-1.2em;}
297
 .panel .wims_title, .panel .wimscenter{margin-top:-1.2em;}
283
 ol li{margin-bottom: .5em;list-style: upper-alpha;}
298
 ol li{margin-bottom: .5em;list-style:upper-alpha;}
284
 input[type='checkbox'] { font-size:150%; }
299
 input[type='checkbox'] { font-size:120%; }
285
 .strike{text-decoration:line-through;}
300
 .strike{text-decoration:line-through;}
286
 .oef_indpartial{color:navy;}
301
 .oef_indpartial{color:navy;}
287
 </style>
302
 </style>
288
}
303
}
289
 
304
 
Line 356... Line 371...
356
 }
371
 }
357
  \integer{cnt_choix=rows(\QUEST)-\debut}
372
  \integer{cnt_choix=rows(\QUEST)-\debut}
358
  \text{CNT_choix=\CNT_choix,\cnt_choix}
373
  \text{CNT_choix=\CNT_choix,\cnt_choix}
359
   \text{Choix=}
374
   \text{Choix=}
360
   \text{mix=shuffle(\cnt_choix)}
375
   \text{mix=shuffle(\cnt_choix)}
361
   \for{ j=\debut+1 to \cnt_choix + \debut+1}{
376
   \for{j=\debut+1 to \cnt_choix + \debut+1}{
362
     \text{choix= \QUEST[\j;]}
377
     \text{choix= \QUEST[\j;]}
363
     \text{choix=wims(replace internal , by  &#44; in \choix)}
378
     \text{choix=wims(replace internal , by  &#44; in \choix)}
364
     \matrix{Choix = \Choix, \choix[1;]}
379
     \matrix{Choix = \Choix, \choix[1;]}
365
   }
380
   }
366
   \text{Choix=wims(nonempty items \Choix)}
381
   \text{Choix=wims(nonempty items \Choix)}
Line 392... Line 407...
392
wims(makelist x for x = \N*\u -\N+1 to \N*\u)}
407
wims(makelist x for x = \N*\u -\N+1 to \N*\u)}
393
   \text{condstep= wims(values \u+1 for x = (\u-1)*\N +1 to \u*\N)}
408
   \text{condstep= wims(values \u+1 for x = (\u-1)*\N +1 to \u*\N)}
394
   \text{CONDSTEP= wims(append item \condstep to \CONDSTEP)}
409
   \text{CONDSTEP= wims(append item \condstep to \CONDSTEP)}
395
}
410
}
396
 \matrix{STEPS = \STEPS
411
 \matrix{STEPS = \STEPS
397
 wims(makelist r x  for x = \N*\cnt_step-\N+1 to \MAX)
412
 wims(makelist r x for x = \N*\cnt_step-\N+1 to \MAX)
398
}
413
}
399
\matrix{CNT = \CNT
414
\matrix{CNT = \CNT
400
 wims(makelist x  for x = \N*\cnt_step-\N+1 to \MAX)
415
 wims(makelist x for x = \N*\cnt_step-\N+1 to \MAX)
401
}
416
}
402
\text{CONDSTEP=\CONDSTEP, wims(values \cnt_step+1  for x = \N*\cnt_step-\N+1 to \MAX)}
417
\text{CONDSTEP=\CONDSTEP, wims(values \cnt_step+1 for x = \N*\cnt_step-\N+1 to \MAX)}
403
 
418
 
404
\text{nstep=\STEPS[1;]}
419
\text{nstep=\STEPS[1;]}
405
\text{TEST=}
420
\text{TEST=}
406
\text{explication=\explication[2..-1;]}
421
\text{explication=\explication[2..-1;]}
407
 
422
 
Line 415... Line 430...
415
\text{CONDITION = wims(makelist x for x = 1 to 2*\MAX)}
430
\text{CONDITION = wims(makelist x for x = 1 to 2*\MAX)}
416
\text{CONDITION =wims(items2words \CONDITION)}
431
\text{CONDITION =wims(items2words \CONDITION)}
417
\conditions{\CONDITION}
432
\conditions{\CONDITION}
418
\integer{cnt_juste=0}
433
\integer{cnt_juste=0}
419
\real{v = 10}
434
\real{v = 10}
-
 
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 &nbsp;? \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
}
420
 
449
 
421
\statement{\nopaste
450
\statement{\nopaste
422
  \style
451
  \style
423
  <div class="instructions">\instruction</div>
452
  <div class="instruction">\instruction</div>
424
 
453
 
425
  \for{h=1 to \etape[\step]}{
454
  \for{h=1 to \etape[\step]}{
426
 
455
 
427
   \if{\question[\h;] notsametext }{
456
    \if{\question[\h;] notsametext }{
428
     \if{\h <= \etape[\step] - \N}
457
      \if{\h <= \etape[\step] - \N}
429
       {<div class="panel">}
458
        {<div class="panel">}
430
       {<div class="panel callout">}
459
        {\if{r \h isitemof \nstep}{<div class="panel callout">}}
431
    }
460
      }
432
 
461
 
433
   \if{(\h <= \etape[\step] - \N or r \h isitemof \nstep) and \question[\h;] notsametext }{
462
   \if{(\h <= \etape[\step] - \N or r \h isitemof \nstep) and \question[\h;] notsametext }{
434
     <div class="enonce">
463
     <div class="enonce">
435
       \if{\cnt_step > 1  and \MAX > 1}{<span class="q_num">\h :</span>}
464
       \if{\cnt_step > 1 and \MAX > 1}{<span class="q_num">\h. </span>}
-
 
465
       \if{\PRELIMINAIRE[\h;] notsametext and \PRELIMINAIRE[\h;] notsametext &nbsp;}
436
       <div class="preliminaire">\PRELIMINAIRE[\h;]</div>
466
       {<div class="preliminaire">\PRELIMINAIRE[\h;]</div>}
437
       <span class="question">\question[\h;]</span>
467
        <span class="question">\question[\h;]</span>
438
     </div>
468
     </div>
439
   }
469
   }
440
 
470
 
441
   \if{\h <= \etape[\step] - \N and \question[\h;] notsametext}{
471
   \if{\h <= \etape[\step] - \N and \question[\h;] notsametext}{
442
    <div class="reponse">
472
    <div class="reponse">
443
      <span class="qcm_prompt1">\qcm_prompt1</span>
473
      <span class="qcm_prompt1">\qcm_prompt1</span>
444
       \for{ a in \REP[\h;]}{
474
       \for{ a in \REP[\h;]}{
-
 
475
         \if{\answer_given=yes}{
445
         \if{ \a  isitemof \CHOIX[\h;\rep[\h;]]}{
476
           \if{ \a isitemof \CHOIX[\h;\rep[\h;]]}{
446
           \if{\TEST[\h;2]>0 and \TEST[\h;3]=0}{
477
             \if{\TEST[\h;2]>0 and \TEST[\h;3]=0}{
447
           <span class="oef_indpartial">\a</span>}
478
                 <span class="oef_indpartial">\a</span>}
448
           {<span class="oef_indgood">\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> -}
449
           }
483
           }
450
         {
-
 
451
         <span class="oef_indbad strike">\a</span>} - }
484
         \if{\answer_given=yes}{
452
         \if{\TEST[\h;2]>0 and \TEST[\h;3]=0}
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>
453
           {<span class="oef_indpartial">\incomplete_answer_text</span>}
488
                  <span class="oef_indgood">\CHOIX[\h;\rep[\h;]]</span>}
-
 
489
              }
454
         \if{\TEST[\h;3]>0}
490
           \if{\TEST[\h;3]>0}
455
           {<span class="oef_indbad">\bad_answer_text</span>}
491
             {\bad_answer_text
456
         \if{\TEST[\h;3]=0 and \TEST[\h;2]=0}
492
              \if{\givegood>0}{
-
 
493
                 <br /> <span class="prompt">\qcm_prompt2</span>
457
           {<span class="oef_indgood">\good_answer_text</span>}
494
                 <span class="oef_indgood">\CHOIX[\h;\rep[\h;]]</span>}
458
         \if{\answer_given issametext yes}{
495
             }
459
           <p class="qcm_prompt2"> \qcm_prompt2</p>
496
           \if{\TEST[\h;3]=0 and \TEST[\h;2]=0}
460
           <ul class="oef_indgood">
497
             {\good_answer_text}
-
 
498
            }
461
             \for{s=1 to \CNT_choix[\h]}{
499
           \if{\givegood>0}{
462
               \if{\s isitemof \rep[\h;]}{ <li>\CHOIX[\h;\s]</li>}
500
             \if{\explication[\h;] notsametext }{<div class="feedback">\explication[\h;]</div>}
463
             }
501
             }
464
           </ul>
-
 
465
         }
-
 
466
         \if{\explication[\h;] notsametext }{<div class="feedback">\explication[\h;]</div>}
-
 
467
     </div>
502
     </div>
468
   }
503
     }{
469
   { \if{ r \h isitemof \nstep}{
504
      \if{ r \h isitemof \nstep}{
470
      <div class="question">
505
      <div class="question">
471
        <ol>
506
        <ol>
472
          \for{s=1 to \CNT_choix[\h]}{ <li>\embed{reply \h , \s}</li> }
507
          \for{s=1 to \CNT_choix[\h]}{ <li>\embed{reply \h , \s}</li> }
473
        </ol>
508
        </ol>
474
      </div>
509
      </div>
475
      }
510
      }
476
   }
511
   }
477
 
-
 
478
   \if{\question[\h;] notsametext }{</div>}
512
   \if{\question[\h;] notsametext
-
 
513
    and (\h <= \etape[\step] - \N or r \h isitemof \nstep)}{</div>}
479
  }
514
  }
480
 }
515
 }
481
\answer{}{\REP1;\CHOIX[1;]}{type=\format}{option=\option}
516
\answer{}{\REP1;\CHOIX[1;]}{type=\format}{option=\option}
482
\answer{}{\REP2;\CHOIX[2;]}{type=\format}{option=\option}
517
\answer{}{\REP2;\CHOIX[2;]}{type=\format}{option=\option}
483
\answer{}{\REP3;\CHOIX[3;]}{type=\format}{option=\option}
518
\answer{}{\REP3;\CHOIX[3;]}{type=\format}{option=\option}
Line 498... Line 533...
498
\REP7
533
\REP7
499
\REP8
534
\REP8
500
\REP9
535
\REP9
501
\REP10}
536
\REP10}
502
\if{\format=radio}{
537
\if{\format=radio}{
503
 \text{REP=wims(replace internal , by  &#44; in \REP)}
538
  \text{REP=wims(replace internal , by &#44; in \REP)}
504
}
539
}
505
\matrix{explication2 = \explication2}
540
\matrix{explication2 = \explication2}
506
 
541
 
507
\for{u = 1 to \N}{
542
\for{u = 1 to \N}{
508
   \text{H = \CNT[\step-1;\u]}
543
   \text{H = \CNT[\step-1;\u]}
Line 546... Line 581...
546
\condition{Question 8 : \REP8}{\TEST[8;1]=0 and \TEST[8;2]=0 and \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}
547
\condition{Question 9 : \REP9}{\TEST[9;3]=0 and \step >=\CONDSTEP[9]}{option=hide}
582
\condition{Question 9 : \REP9}{\TEST[9;3]=0 and \step >=\CONDSTEP[9]}{option=hide}
548
\condition{Question 9 : \REP9}{\TEST[9;1]=0 and \TEST[9;2]=0 and \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}
549
\condition{Question 10 : \REP10}{\TEST[10;3]=0 and \step >=\CONDSTEP[10]}{option=hide}
584
\condition{Question 10 : \REP10}{\TEST[10;3]=0 and \step >=\CONDSTEP[10]}{option=hide}
550
\condition{Question 10 : \REP10}{\TEST[10;1]=0 and \TEST[10;2]=0 and \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}
551
 
-
 
552
 
586
 
553
 
587
 
554
\text{test=wims(rows2lines \explication)}
588
\text{test=wims(rows2lines \explication)}
555
\text{test=wims(lines2items \test)}
589
\text{test=wims(lines2items \test)}
556
\text{test=wims(items2words \test)}
590
\text{test=wims(items2words \test)}
Line 577... Line 611...
577
   </ol>
611
   </ol>
578
   </div>
612
   </div>
579
   </li>}
613
   </li>}
580
 }
614
 }
581
</ol>
615
</ol>
-
 
616
}
-
 
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}
582
}
630
}