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 67... Line 67...
67
 
67
 
68
\text{style_question=background-color: #F2F9FC;}
68
\text{style_question=background-color: #F2F9FC;}
69
 
69
 
70
:Estil CSS per a les  respostes
70
:Estil CSS per a les  respostes
71
 
71
 
72
\text{style_reponse=background-color: #FFCC99;}
72
\text{style_reponse=color:#555;font-size:90%;}
73
 
73
 
74
:Percentatge d'èxit necessari per passar a la següent etapa (si el nombre màxim d'etapes > 1)
74
:Percentatge d'èxit necessari per passar a la següent etapa (si el nombre màxim d'etapes > 1)
75
 
75
 
76
\text{percent=0}
76
\text{percent=0}
77
 
77
 
78
:S'accepta text aleatori posat entre claus
78
:S'accepta text aleatori posat entre claus
79
$embraced_randitem
79
$embraced_randitem
80
\text{accolade=item(2, sí, no)}
80
\text{accolade=item(2, sí, no)}
81
 
81
 
82
:Mostrar les respostes correctes
82
:Affichage de l'analyse des réponses
-
 
83
Dans le cas où l'exercice est utilisé avec le paramétrage
-
 
84
"Ne jamais afficher les bonnes réponses" :
-
 
85
<ul><li>si vous choisissez "si" alors, après chaque question, il sera
-
 
86
indiqué si les choix sélectionnés sont justes ou faux.
-
 
87
</li><li>si vous choisissez "no" alors, après chaque question, les choix
-
 
88
 sélectionnés seront affichés sans indication.
-
 
89
</li></ul>
-
 
90
Dans les autres cas, après chaque question, il sera indiqué si les choix
83
Si poseu sí, les respostes correctes es mostraran una vegada l'alumne respongui les preguntes.
91
 sélectionnés sont justes ou faux et en cas d'erreur, la liste des bons
-
 
92
 choix sera affichée.
-
 
93
 
84
\text{answer_given=item(1, sí, no)}
94
\text{answer_given=item(1, sí, no)}
85
 
95
 
86
:Pregunta
96
:Pregunta
87
<p>Introduïu aquí la pregunta que voleu fer, d'acord amb el següent format:</p>
97
<p>Introduïu aquí la pregunta que voleu fer, d'acord amb el següent format:</p>
88
<ol>
98
<ol>
Line 227... Line 237...
227
\text{paste=yes}
237
\text{paste=yes}
228
 
238
 
229
\text{option=}
239
\text{option=}
230
 
240
 
231
:%%%%%%%%%%%%%% Rien à modifier jusqu'à l'énoncé %%%%%%%%%%%%%%%%
241
:%%%%%%%%%%%%%% Rien à modifier jusqu'à l'énoncé %%%%%%%%%%%%%%%%
232
 
-
 
-
 
242
\text{givegood=slib(oef/env givegood)}
-
 
243
\text{givegood=\givegood issametext ? 1}
-
 
244
\text{answer_given=\givegood>0? yes}
233
\text{data_q=\data1!= ? 1:}
245
\text{data_q=\data1!= ? 1:}
234
\text{data_q=\data2!= ? wims(append item 2 to \data_q)}
246
\text{data_q=\data2!= ? wims(append item 2 to \data_q)}
235
\text{data_q=\data3!= ? wims(append item 3 to \data_q)}
247
\text{data_q=\data3!= ? wims(append item 3 to \data_q)}
236
\text{data_q=\data4!= ? wims(append item 4 to \data_q)}
248
\text{data_q=\data4!= ? wims(append item 4 to \data_q)}
237
\text{data_q=\data5!= ? wims(append item 5 to \data_q)}
249
\text{data_q=\data5!= ? wims(append item 5 to \data_q)}
Line 250... Line 262...
250
\text{style = <style>
262
\text{style = <style>
251
 .enonce{margin-bottom:0}
263
 .enonce{margin-bottom:0}
252
 .qcm_prompt2{margin-top:.5em}
264
 .qcm_prompt2{margin-top:.5em}
253
 img{vertical-align:middle;}
265
 img{vertical-align:middle;}
254
 .q_num, .panel .wims_title{
266
 .q_num, .panel .wims_title{
255
 font-size:150%;font-family:Impact, Charcoal, sans-serif;
267
 font-size:120%;font-family:Impact, Charcoal, sans-serif;
256
 color:#777;
268
 color:#777;
257
 }
269
 }
258
 .feedback{border:1px dashed grey;padding:0.5em;margin:0;}
270
 .feedback{border:1px dashed grey;padding:.5em;margin-top:.5em;}
259
 .reponse {
271
 .reponse {
260
   margin: 0 1em;
272
   margin: 0 1em;
261
   padding: .5em;
273
   padding: .5em;
262
   border-radius:5px;
274
   border-radius:5px;
263
   \style_reponse
275
   \style_reponse
Line 275... Line 287...
275
    \style_question
287
    \style_question
276
 }
288
 }
277
 .callout .q_num, .callout .wims_title{color:black;}
289
 .callout .q_num, .callout .wims_title{color:black;}
278
 
290
 
279
 .panel .wims_title, .panel .wimscenter{margin-top:-1.2em;}
291
 .panel .wims_title, .panel .wimscenter{margin-top:-1.2em;}
280
 ol li{margin-bottom: .5em;list-style: upper-alpha;}
292
 ol li{margin-bottom: .5em;list-style:upper-alpha;}
281
 input[type='checkbox'] { font-size:150%; }
293
 input[type='checkbox'] { font-size:120%; }
282
 .strike{text-decoration:line-through;}
294
 .strike{text-decoration:line-through;}
283
 .oef_indpartial{color:navy;}
295
 .oef_indpartial{color:navy;}
284
 </style>
296
 </style>
285
}
297
}
286
 
298
 
Line 328... Line 340...
328
 }
340
 }
329
 
341
 
330
 \integer{test_inst=\inst_audio\inst_image\inst_title notsametext ? 1 : 0}
342
 \integer{test_inst=\inst_audio\inst_image\inst_title notsametext ? 1 : 0}
331
 \text{preliminaire=\test_inst=1 ? \rab_inst:&nbsp;}
343
 \text{preliminaire=\test_inst=1 ? \rab_inst:&nbsp;}
332
 \matrix{QUEST=\test_inst=1 ? \QUEST[2..-1;]}
344
 \matrix{QUEST=\test_inst=1 ? \QUEST[2..-1;]}
333
 \matrix{QUEST=\accolade issametext oui ?wims(embraced randitem \QUEST):\QUEST}
345
 \matrix{QUEST=\accolade issametext si ?wims(embraced randitem \QUEST):\QUEST}
334
 \matrix{question = \question
346
 \matrix{question = \question
335
\QUEST[1;]}
347
\QUEST[1;]}
336
 \matrix{PRELIMINAIRE=\PRELIMINAIRE
348
 \matrix{PRELIMINAIRE=\PRELIMINAIRE
337
\preliminaire}
349
\preliminaire}
338
 
350
 
Line 353... Line 365...
353
 }
365
 }
354
  \integer{cnt_choix=rows(\QUEST)-\debut}
366
  \integer{cnt_choix=rows(\QUEST)-\debut}
355
  \text{CNT_choix=\CNT_choix,\cnt_choix}
367
  \text{CNT_choix=\CNT_choix,\cnt_choix}
356
   \text{Choix=}
368
   \text{Choix=}
357
   \text{mix=shuffle(\cnt_choix)}
369
   \text{mix=shuffle(\cnt_choix)}
358
   \for{ j=\debut+1 to \cnt_choix + \debut+1}{
370
   \for{j=\debut+1 to \cnt_choix + \debut+1}{
359
     \text{choix= \QUEST[\j;]}
371
     \text{choix= \QUEST[\j;]}
360
     \text{choix=wims(replace internal , by  &#44; in \choix)}
372
     \text{choix=wims(replace internal , by  &#44; in \choix)}
361
     \matrix{Choix = \Choix, \choix[1;]}
373
     \matrix{Choix = \Choix, \choix[1;]}
362
   }
374
   }
363
   \text{Choix=wims(nonempty items \Choix)}
375
   \text{Choix=wims(nonempty items \Choix)}
Line 371... Line 383...
371
     \text{Rep = \Rep, position(\H[\k],\mix)}
383
     \text{Rep = \Rep, position(\H[\k],\mix)}
372
   }
384
   }
373
   \text{Rep = wims(sort items wims(nonempty items \Rep))}
385
   \text{Rep = wims(sort items wims(nonempty items \Rep))}
374
   \matrix{rep = \rep
386
   \matrix{rep = \rep
375
    \Rep}
387
    \Rep}
376
}
388
}
377
 
389
 
378
\text{CNT_choix=wims(nonempty items \CNT_choix)}
390
\text{CNT_choix=wims(nonempty items \CNT_choix)}
379
 
391
 
380
\text{U = pari(divrem(\MAX,\N)~)}
392
\text{U = pari(divrem(\MAX,\N)~)}
381
\integer{cnt_step = \U[1] + 1}
393
\integer{cnt_step = \U[1] + 1}
Line 395... Line 407...
395
}
407
}
396
\matrix{CNT = \CNT
408
\matrix{CNT = \CNT
397
 wims(makelist x for x = \N*\cnt_step-\N+1 to \MAX)
409
 wims(makelist x for x = \N*\cnt_step-\N+1 to \MAX)
398
}
410
}
399
\text{CONDSTEP=\CONDSTEP, wims(values \cnt_step+1 for x = \N*\cnt_step-\N+1 to \MAX)}
411
\text{CONDSTEP=\CONDSTEP, wims(values \cnt_step+1 for x = \N*\cnt_step-\N+1 to \MAX)}
400
 
412
 
401
\text{nstep=\STEPS[1;]}
413
\text{nstep=\STEPS[1;]}
402
\text{TEST=}
414
\text{TEST=}
403
\text{explication=\explication[2..-1;]}
415
\text{explication=\explication[2..-1;]}
404
 
416
 
405
text{testexp=wims(rows2lines \explication)}
417
text{testexp=wims(rows2lines \explication)}
Line 412... Line 424...
412
\text{CONDITION = wims(makelist x for x = 1 to 2*\MAX)}
424
\text{CONDITION = wims(makelist x for x = 1 to 2*\MAX)}
413
\text{CONDITION =wims(items2words \CONDITION)}
425
\text{CONDITION =wims(items2words \CONDITION)}
414
\conditions{\CONDITION}
426
\conditions{\CONDITION}
415
\integer{cnt_juste=0}
427
\integer{cnt_juste=0}
416
\real{v = 10}
428
\real{v = 10}
-
 
429
\integer{questioncnt=items(\question[;1])}
-
 
430
\text{latexsrc=}
-
 
431
\text{latexsol=}
-
 
432
\for{hh=1 to \questioncnt}{
-
 
433
  \text{prel=\PRELIMINAIRE[\hh;]!= and \PRELIMINAIRE[\hh;] notsametext &nbsp;? \PRELIMINAIRE[\hh;]
-
 
434
\newline:}
-
 
435
  \text{latexsrc=\latexsrc \item \prel \question[\hh;]
-
 
436
\begin{\format}}
-
 
437
  \for{ss=1 to \CNT_choix[\hh]}{\text{latexsrc=\latexsrc\item \CHOIX[\hh;\ss]}}
-
 
438
  \text{listsol=\CHOIX[\hh;\rep[\hh;]]}
-
 
439
  \text{latexsol=\latexsol \item \listsol}
-
 
440
  \text{latexsrc=\latexsrc
-
 
441
\end{\format}}
-
 
442
}
417
 
443
 
418
\statement{\nopaste
444
\statement{\nopaste
419
  \style
445
  \style
420
  <div class="instructions">\instruction</div>
446
  <div class="instruction">\instruction</div>
421
 
447
 
422
  \for{h=1 to \etape[\step]}{
448
  \for{h=1 to \etape[\step]}{
423
 
449
 
424
   \if{\question[\h;] notsametext }{
450
    \if{\question[\h;] notsametext }{
425
     \if{\h <= \etape[\step] - \N}
451
      \if{\h <= \etape[\step] - \N}
426
       {<div class="panel">}
452
        {<div class="panel">}
427
       {<div class="panel callout">}
453
        {\if{r \h isitemof \nstep}{<div class="panel callout">}}
428
    }
454
      }
429
 
455
 
430
   \if{(\h <= \etape[\step] - \N or r \h isitemof \nstep) and \question[\h;] notsametext }{
456
   \if{(\h <= \etape[\step] - \N or r \h isitemof \nstep) and \question[\h;] notsametext }{
431
     <div class="enonce">
457
     <div class="enonce">
432
       \if{\cnt_step > 1 and \MAX > 1}{<span class="q_num">\h :</span>}
458
       \if{\cnt_step > 1 and \MAX > 1}{<span class="q_num">\h. </span>}
-
 
459
       \if{\PRELIMINAIRE[\h;] notsametext and \PRELIMINAIRE[\h;] notsametext &nbsp;}
433
       <div class="preliminaire">\PRELIMINAIRE[\h;]</div>
460
       {<div class="preliminaire">\PRELIMINAIRE[\h;]</div>}
434
       <span class="question">\question[\h;]</span>
461
        <span class="question">\question[\h;]</span>
435
     </div>
462
     </div>
436
   }
463
   }
437
 
464
 
438
   \if{\h <= \etape[\step] - \N and \question[\h;] notsametext}{
465
   \if{\h <= \etape[\step] - \N and \question[\h;] notsametext}{
439
    <div class="reponse">
466
    <div class="reponse">
440
      <span class="qcm_prompt1">\qcm_prompt1</span>
467
      <span class="qcm_prompt1">\qcm_prompt1</span>
441
       \for{ a in \REP[\h;]}{
468
       \for{ a in \REP[\h;]}{
-
 
469
         \if{\answer_given=si}{
442
         \if{ \a isitemof \CHOIX[\h;\rep[\h;]]}{
470
           \if{ \a isitemof \CHOIX[\h;\rep[\h;]]}{
443
           \if{\TEST[\h;2]>0 and \TEST[\h;3]=0}{
471
             \if{\TEST[\h;2]>0 and \TEST[\h;3]=0}{
444
           <span class="oef_indpartial">\a</span>}
472
                 <span class="oef_indpartial">\a</span>}
445
           {<span class="oef_indgood">\a</span>}
473
                {<span class="oef_indgood">\a</span>}
-
 
474
                }{
-
 
475
                 <span class="oef_indbad strike">\a</span>} - }
-
 
476
             {<span class="oef_indneutral">\a</span> -}
446
           }
477
           }
447
         {
-
 
448
         <span class="oef_indbad strike">\a</span>} - }
478
         \if{\answer_given=si}{
449
         \if{\TEST[\h;2]>0 and \TEST[\h;3]=0}
479
           \if{\TEST[\h;2]>0 and \TEST[\h;3]=0}
-
 
480
              {\incomplete_answer_text
-
 
481
               \if{\givegood>0}{<br /> <span class="prompt">\qcm_prompt2</span>
450
           {<span class="oef_indpartial">\incomplete_answer_text</span>}
482
                  <span class="oef_indgood">\CHOIX[\h;\rep[\h;]]</span>}
-
 
483
              }
451
         \if{\TEST[\h;3]>0}
484
           \if{\TEST[\h;3]>0}
452
           {<span class="oef_indbad">\bad_answer_text</span>}
485
             {\bad_answer_text
453
         \if{\TEST[\h;3]=0 and \TEST[\h;2]=0}
486
              \if{\givegood>0}{
-
 
487
                 <br /> <span class="prompt">\qcm_prompt2</span>
454
           {<span class="oef_indgood">\good_answer_text</span>}
488
                 <span class="oef_indgood">\CHOIX[\h;\rep[\h;]]</span>}
455
         \if{\answer_given issametext }{
489
             }
456
           <p class="qcm_prompt2"> \qcm_prompt2</p>
490
           \if{\TEST[\h;3]=0 and \TEST[\h;2]=0}
457
           <ul class="oef_indgood">
491
             {\good_answer_text}
-
 
492
            }
458
             \for{s=1 to \CNT_choix[\h]}{
493
           \if{\givegood>0}{
459
               \if{\s isitemof \rep[\h;]}{ <li>\CHOIX[\h;\s]</li>}
494
             \if{\explication[\h;] notsametext }{<div class="feedback">\explication[\h;]</div>}
460
             }
495
             }
461
           </ul>
-
 
462
         }
-
 
463
         \if{\explication[\h;] notsametext }{<div class="feedback">\explication[\h;]</div>}
-
 
464
     </div>
496
     </div>
465
   }
497
     }{
466
   { \if{ r \h isitemof \nstep}{
498
      \if{ r \h isitemof \nstep}{
467
      <div class="question">
499
      <div class="question">
468
        <ol>
500
        <ol>
469
          \for{s=1 to \CNT_choix[\h]}{ <li>\embed{reply \h , \s}</li> }
501
          \for{s=1 to \CNT_choix[\h]}{ <li>\embed{reply \h , \s}</li> }
470
        </ol>
502
        </ol>
471
      </div>
503
      </div>
472
      }
504
      }
473
   }
505
   }
474
 
-
 
475
   \if{\question[\h;] notsametext }{</div>}
506
   \if{\question[\h;] notsametext
-
 
507
    and (\h <= \etape[\step] - \N or r \h isitemof \nstep)}{</div>}
476
  }
508
  }
477
 }
509
 }
478
\answer{}{\REP1;\CHOIX[1;]}{type=\format}{option=\option}
510
\answer{}{\REP1;\CHOIX[1;]}{type=\format}{option=\option}
479
\answer{}{\REP2;\CHOIX[2;]}{type=\format}{option=\option}
511
\answer{}{\REP2;\CHOIX[2;]}{type=\format}{option=\option}
480
\answer{}{\REP3;\CHOIX[3;]}{type=\format}{option=\option}
512
\answer{}{\REP3;\CHOIX[3;]}{type=\format}{option=\option}
Line 495... Line 527...
495
\REP7
527
\REP7
496
\REP8
528
\REP8
497
\REP9
529
\REP9
498
\REP10}
530
\REP10}
499
\if{\format=radio}{
531
\if{\format=radio}{
500
 \text{REP=wims(replace internal , by &#44; in \REP)}
532
  \text{REP=wims(replace internal , by &#44; in \REP)}
501
}
533
}
502
\matrix{explication2 = \explication2}
534
\matrix{explication2 = \explication2}
503
 
535
 
504
\for{u = 1 to \N}{
536
\for{u = 1 to \N}{
505
   \text{H = \CNT[\step-1;\u]}
537
   \text{H = \CNT[\step-1;\u]}
Line 543... Line 575...
543
\condition{Question 8 : \REP8}{\TEST[8;1]=0 and \TEST[8;2]=0 and \TEST[8;3]=0 and \step >=\CONDSTEP[8]}{option=hide}
575
\condition{Question 8 : \REP8}{\TEST[8;1]=0 and \TEST[8;2]=0 and \TEST[8;3]=0 and \step >=\CONDSTEP[8]}{option=hide}
544
\condition{Question 9 : \REP9}{\TEST[9;3]=0 and \step >=\CONDSTEP[9]}{option=hide}
576
\condition{Question 9 : \REP9}{\TEST[9;3]=0 and \step >=\CONDSTEP[9]}{option=hide}
545
\condition{Question 9 : \REP9}{\TEST[9;1]=0 and \TEST[9;2]=0 and \TEST[9;3]=0 and \step >=\CONDSTEP[9]}{option=hide}
577
\condition{Question 9 : \REP9}{\TEST[9;1]=0 and \TEST[9;2]=0 and \TEST[9;3]=0 and \step >=\CONDSTEP[9]}{option=hide}
546
\condition{Question 10 : \REP10}{\TEST[10;3]=0 and \step >=\CONDSTEP[10]}{option=hide}
578
\condition{Question 10 : \REP10}{\TEST[10;3]=0 and \step >=\CONDSTEP[10]}{option=hide}
547
\condition{Question 10 : \REP10}{\TEST[10;1]=0 and \TEST[10;2]=0 and \TEST[10;3]=0 and \step >=\CONDSTEP[10]}{option=hide}
579
\condition{Question 10 : \REP10}{\TEST[10;1]=0 and \TEST[10;2]=0 and \TEST[10;3]=0 and \step >=\CONDSTEP[10]}{option=hide}
548
 
-
 
549
 
580
 
550
 
581
 
551
\text{test=wims(rows2lines \explication)}
582
\text{test=wims(rows2lines \explication)}
552
\text{test=wims(lines2items \test)}
583
\text{test=wims(lines2items \test)}
553
\text{test=wims(items2words \test)}
584
\text{test=wims(items2words \test)}
Line 574... Line 605...
574
   </ol>
605
   </ol>
575
   </div>
606
   </div>
576
   </li>}
607
   </li>}
577
 }
608
 }
578
</ol>
609
</ol>
-
 
610
}
-
 
611
 
-
 
612
\latex{
-
 
613
\begin{statement}
-
 
614
\instruction
-
 
615
\begin{enumerate}
-
 
616
\latexsrc
-
 
617
\end{enumerate}
-
 
618
\end{statement}
-
 
619
\begin{solution}\
-
 
620
\begin{enumerate}
-
 
621
\latexsol
-
 
622
\end{enumerate}
-
 
623
\end{solution}
579
}
624
}