Rev 6946 | Rev 9980 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
type=first
textarea="data1 data2 data3 data4 data5 data6 data7 data8 data9 data10"
:Questions à choix multiples
<p>Cet exercice présente des questions à choix multiples.</p>
<p>Le nombre de questions est limité à 10. On choisit le nombre de questions
à présenter à chaque exercice. Ces questions seront pris au hasard ou pas.</p>
<p>Auteur du modèle : Bernadette Perrin-Riou <bpr@math.u-psud.fr></p>
:%%%%%%%%%%%%%%%%% ATTENTION %%%%%%%%%%%%%%%%%%%%
Enlevez l'en-tête ci-dessus si vous détruisez les balises pour le modèle !
(Ce sont les lignes qui commencent par un ':'.)
Sinon l'exercice risque de ne pas pouvoir repasser sous Createxo.
:%%%%%%%% Paramètres d'exemples à redéfinir %%%%%%%%%%%%%%%%%
:\title{QCM à la suite}
:\author{Bernadette, Perrin-Riou}
:\email{bpr@math.u-psud.fr}
:\credits{}
:Instruction Globale
Tapez ici une instruction commune à toutes les questions de l'exercice
\text{instruction=Instruction globale : Répondez à chaque question d'une première série, validez, puis répondez aux questions de la seconde série.}
:Ordre aléatoire
Tapez "yes" pour activer le tirage au sort des questions.
Tapez "no" pour les présenter dans l'ordre où elles sont rentrées
\text{alea=yes}
:Nombre maximum de questions par étape
WIMS divisera automatiquement votre exercice en étapes en fonction du nombre total de questions définies et du nombre de questions par étapes.
\text{N=4}
:Nombre maximum d'étapes
WIMS divisera automatiquement votre exercice en étapes en fonction du nombre total de questions définies et du nombre de questions par étapes.
\text{MAX=2}
:textes pour le feedback "Réponse donnée"
\text{qcm_prompt1=Votre réponse :}
:textes pour le feedback "La bonne réponse"
\text{qcm_prompt2=La bonne réponse :}
:textes pour le feedback "Réponse correcte"
\text{good_answer_text=Bonne réponse}
:textes pour le feedback "Réponse incorrecte"
\text{bad_answer_text=Mauvaise réponse}
:textes pour le feedback "Réponse incomplète"
\text{incomplete_answer_text=Réponse incomplète}
:Style css pour la question
\text{style_question=background-color: #FFFFCC;
color:black;
margin: 0 1em 0.5em 1em;
padding: 0.2em;}
:Style css pour la réponse
\text{style_reponse=background-color: #FFCC99;
color: black;
margin: 0 1em;
padding: 0.2em;}
:Pourcentage de réussite demandée pour passer à l'étape suivante (si MAX >1)
\text{percent=0}
:Mise en aléatoire par des accolades emboitables
$embraced_randitem
\text{accolade=item(1,1 oui,
2 non)}
:Question
<p>Entrez ici la question à poser, selon le format suivant : </p>
<ul>
<li>La première ligne est le texte général.</li>
<li>La ligne suivante représente un feedback, qui sera affiché après validation des réponses
(elle peut être laissée vide).</li>
<li>Entrez ensuite la liste des numéros des bonnes réponses, séparées par des virgules.</li>
<li>Les lignes suivantes sont formées des différentes propositions de réponses.</li></ul>
<p style="border-left:2px solid orange;width:45em;background-color:white;padding-left:1em;">Exemple : <br/><code>Titre de la Question n°1<br/>
explication pour le feedback affiché en cas de mauvaise réponse à la question n°1<br/>
Numéro de la bonne réponse<br/>
Proposition n°1<br/>
Proposition n°2<br/>
Proposition n°3</code></p>
<p>Attention : les point-virgules sont interdits ici.</p>
\text{data1=En quelle année eut lieu la bataille de Marignan ?
Marignan fut la première victoire du jeune roi François Ier, la première année de son règne.
1
1515
1414
1313
1616}
:Question 2
\text{data2=En 2010, quelle est la ville la plus peuplée au monde ?
C'est Tokyo, la capitale du Japon (35 millions d'habitants), loin devant Mexico et New York (19 millions d'habitants chacune).
1
Tokyo
Mexico
New York
Beijing}
:Question 3
\text{data3=Quel est le nom de ce fleuve : <img src="http://upload.wikimedia.org/wikipedia/commons/e/e4/Mekong_River_watershed.png"/>
Environ 70 millions d'habitants vivent directement dans le bassin versant du Mékong.
1
Le Mékong
Le Yangzi Jiang
La Volga
Le Danube}
:Question 4
\text{data4=Parmi ces différents peintres, lesquels font partie du mouvement impressionniste ?
Ingres est associé au courant Romantique, et Raphaël à la Renaissance.
1,3
Edgar Degas
Dominique Ingres
Claude Monet
Raphaël}
:Question 5
\text{data5=Quel est le cri du chameau ?
Le brairement est le cri de l'âne, le bêlement : celui des moutons et des chèvres.
1
Le blatèrement
Le brairement
Le bêlement}
:Question 6
\text{data6=Quelle est la formule chimique de la testostérone ?
C<sub>8</sub>H<sub>10</sub>N<sub>4</sub>O<sub>2</sub> correspond à la caféine, C<sub>3</sub>H<sub>5</sub>N<sub>3</sub>O<sub>9</sub> à la nitroglycérine, et C<sub>17</sub>H<sub>19</sub>NO<sub>3</sub> la morphine
4
C<sub>8</sub>H<sub>10</sub>N<sub>4</sub>O<sub>2</sub>
C<sub>3</sub>H<sub>5</sub>N<sub>3</sub>O<sub>9</sub>
C<sub>17</sub>H<sub>19</sub>NO<sub>3</sub>
C<sub>19</sub>H<sub>28</sub>O<sub>2</sub>}
:Question 7
\text{data7=À partir de quel jour le beaujolais nouveau est-il disponible en vente ?
Le beaujolais nouveau est un vin de primeur, c'est-à-dire un vin de l'année même, dont la commercialisation est autorisée immédiatement après la fin de la vinification.
3
le premier jeudi de Novembre
le deuxième jeudi de Novembre
le troisième jeudi de Novembre
le quatrième jeudi de Novembre}
:Question 8
\text{data8=Dans le film <i>"Rain Man"</i>, quel acteur a un frère autiste surdoué ?
<i>Rain Man</i> est un film américain réalisé par Barry Levinson, sorti en 1989 en France.
2
Bruce Willis
Tom Cruise
Woody Allen}
:Question 9
\text{data9=Le ski nautique est une discipline olympique depuis 1976.
L'apparition du ski nautique aux jeux olympiques ne date que de 2004. Toutefois, il avait été sport de démonstration en 1972.
2
Vrai
Faux}
:Question 10
\text{data10=Quel est le premier ballet écrit par Tchaïkovski ?
Le Lac des cygnes a été écrit en 1875 et Casse-noisette en 1891.
1
Le Lac des cygnes
Casse-noisette}
:
\text{accolade=wims(word 1 of \accolade)}
\language{fr}
\computeanswer{no}
\format{html}
\text{notepad=slib(utilities/notepad Notepad,small)}
\text{audio_file=no}
\text{reading_file=no}
\text{image_file=no}
\text{video_file=no}
\text{format=checkbox}
\text{style_oef=}
\text{style_css=ol li {list-style: upper-alpha; }}
\text{paste=yes}
\text{pos_rep=inside}
\text{second_step=yes}
\text{first_step=1}
\text{answer_given=yes}
\text{option=}
\text{packs=}
\text{player=---}
\text{player_option= autostart="false" loop="false"}
#####################
\text{data_q=\data1!= ? 1:}
\text{data_q=\data2!= ? wims(append item 2 to \data_q)}
\text{data_q=\data3!= ? wims(append item 3 to \data_q)}
\text{data_q=\data4!= ? wims(append item 4 to \data_q)}
\text{data_q=\data5!= ? wims(append item 5 to \data_q)}
\text{data_q=\data6!= ? wims(append item 6 to \data_q)}
\text{data_q=\data7!= ? wims(append item 7 to \data_q)}
\text{data_q=\data8!= ? wims(append item 8 to \data_q)}
\text{data_q=\data9!= ? wims(append item 9 to \data_q)}
\text{data_q=\data10!= ? wims(append item 10 to \data_q)}
\integer{cnt_question=items(\data_q)}
\text{autocompletion=\format iswordof case ? autocomplete="off"}
\text{player=wims(replace internal - by in \player)}
\integer{first_step=\first_step notwordof 0 ? 1}
\text{option_reaccent=\reaccent!=yes ? noreaccent:}
\text{nopaste=\paste issametext no ? slib(utilities/nopaste )}
\text{audio=\audio_file notsametext and \audio_file notsametext no?
<div class="wimscenter">slib(media/audio \imagedir/\audio_file,\player_option,player=\player)</div>}
\text{image=\image_file notsametext and \image_file notsametext no?
wims(makelist <img src="\imagedir/x " alt="" /> for x in \image_file)}
\if{\video_file notsametext and \video_file notsametext no}{
\text{video_file=http notin \video_file ? \imagedir/\video_file}
\text{video=\video_file notsametext ? <a target="wims_external" href="\video_file">[video] </a>}
}
\text{style = <style type="text/css">
.enonce{margin-bottom:0}
.feedback{border:1px dashed grey;padding:0.5em;margin:0;}
.question {\style_question}
.question ol{padding:0px 0em 0px 1.5em;margin:0}
.reponse {\style_reponse}
.oefstatement{\style_oef}
.highlight_false{color:red;font-weight:bold;text-decoration:line-through;}
.highlight{font-weight:bold;}
.true{color:green;}
.incomplete{color:navy;}
\style_css
</style>
}
\integer{N = min(\cnt_question,\N)}
\integer{MAX=min(\N*\MAX,\cnt_question)}
\text{battage=\alea issametext yes ? shuffle(\data_q,,) :
\data_q}
\text{battage=wims(nonempty items \battage)}
\text{qcm_prompt1=Votre réponse :}
\text{qcm_prompt2=La(les) bonne(s) réponse(s) :}
\text{good_answer_text=Bonne réponse}
\text{bad_answer_text=Mauvaise réponse}
\text{incomplete_answer_text=Réponse incomplète}
\text{option=\option noanalyzeprint}
\matrix{question=}
\matrix{explication=}
\matrix{rep=}
\text{CNT_choix= }
\matrix{CHOIX=}
\text{PRELIMINAIRE=}
\for{i= 1 to \MAX}{
\text{QUEST=\battage[\i]=1? \data1}
\text{QUEST=\battage[\i]=2? \data2}
\text{QUEST=\battage[\i]=3? \data3}
\text{QUEST=\battage[\i]=4? \data4}
\text{QUEST=\battage[\i]=5? \data5}
\text{QUEST=\battage[\i]=6? \data6}
\text{QUEST=\battage[\i]=7? \data7}
\text{QUEST=\battage[\i]=8? \data8}
\text{QUEST=\battage[\i]=9? \data9}
\text{QUEST=\battage[\i]=10? \data10}
\text{preliminaire_test=\QUEST}
\text{preliminaire_test=row(1,\preliminaire_test)}
\text{inst_audio=wims(getopt audio in \preliminaire_test)}
\text{inst_image=wims(getopt image in \preliminaire_test)}
\text{inst_title=wims(getopt title in \preliminaire_test)}
\text{inst_intro=wims(getopt intro in \preliminaire_test)}
\text{test_inst=\inst_audio\inst_image\inst_title\inst_intro notsametext ? 1 : 0}
\text{rab_inst=}
\text{rab_inst=\inst_title notsametext ?\rab_inst<div class="wimscenter">\inst_title</div>}
\text{rab_inst=\inst_intro notsametext ?\rab_inst \inst_intro}
\text{rab_inst=\inst_image notsametext ? \rab_inst <div class="wimscenter"><img src="\imagedir/\inst_image" alt="" /></div>}
\if{\inst_audio notsametext }{
\text{rab_inst1= . isin \inst_audio or \packs= ?
slib(media/audio \imagedir/\inst_audio,\player_option,player=\player):slib(lang/swac \inst_audio,\packs,player=\player,\player_option)}
\text{rab_inst=\rab_inst <div class="wimscenter">\rab_inst1[1;1]</div>}
}
\text{preliminaire=\test_inst=1 ? \rab_inst: }
\text{QUEST=\test_inst=1 ? wims(line 2 to -1 of \QUEST)}
\matrix{QUEST=\accolade=1 ?wims(embraced randitem \QUEST):\QUEST}
\matrix{question = \question
\QUEST[1;]}
\matrix{PRELIMINAIRE=\PRELIMINAIRE
\preliminaire}
\text{expl=\QUEST[2;]}
\text{ligne=wims(upper \expl)}
\text{ligne=wims(text select ABCDEFGHIJKLMNOPQRSTUVWXYZ in \ligne)}
\if{\ligne issametext and \expl notsametext }{
\matrix{explication = \explication ;
}
\integer{debut = 2}
}
\if{\ligne issametext and \expl issametext }{
\matrix{explication = \explication ;
}
\integer{debut = 3}
}
\if{\ligne notsametext}{
\matrix{explication = \explication
\expl}
\integer{debut = 3}
}
\integer{cnt_choix=rows(\QUEST)-\debut}
\text{CNT_choix=\CNT_choix,\cnt_choix}
\text{Choix=}
\text{mix=shuffle(\cnt_choix)}
\for{ j=\debut+1 to \cnt_choix + \debut+1}{
\text{choix= \QUEST[\j;]}
\text{choix=wims(replace internal , by , in \choix)}
\matrix{Choix = \Choix, \choix[1;]}
}
\text{Choix=wims(nonempty items \Choix)}
\text{Choix= \Choix[\mix]}
\matrix{CHOIX=\CHOIX
\Choix}
\text{H = wims(nospace \QUEST[\debut;])}
\text{cnt_c=items(\H)}
\text{Rep = }
\for{ k = 1 to \cnt_c}{
\text{Rep = \Rep, position(\H[\k],\mix)}
}
\text{Rep = wims(sort items wims(nonempty items \Rep))}
\matrix{rep = \rep
\Rep}
}
\text{CNT_choix=wims(nonempty items \CNT_choix)}
\text{U = pari(divrem(\MAX,\N)~)}
\integer{cnt_step = \U[1] + 1}
\matrix{STEPS = }
\matrix{CNT = }
\text{CONDSTEP=}
\for{ u = 1 to \cnt_step -1}{
\matrix{STEPS =\STEPS
wims(makelist r x for x = \N*\u -\N+1 to \N*\u)}
\matrix{CNT =\CNT
wims(makelist x for x = \N*\u -\N+1 to \N*\u)}
\text{condstep= wims(values \u+1 for x = (\u-1)*\N +1 to \u*\N)}
\text{CONDSTEP= wims(append item \condstep to \CONDSTEP)}
}
\matrix{STEPS = \STEPS
wims(makelist r x for x = \N*\cnt_step-\N+1 to \MAX)
}
\matrix{CNT = \CNT
wims(makelist x for x = \N*\cnt_step-\N+1 to \MAX)
}
\text{CONDSTEP=\CONDSTEP, wims(values \cnt_step+1 for x = \N*\cnt_step-\N+1 to \MAX)}
\text{nstep=\STEPS[1;]}
\text{TEST=}
text{testexp=wims(rows2lines \explication)}
text{testexp=wims(lines2items \testexp)}
text{testexp=wims(items2words \testexp)}
text{testexp=wims(nospace \testexp)}
\nextstep{\nstep}
\text{REP=}
\text{etape=wims(values x * \N for x = 1 to \cnt_step+1)}
\text{CONDITION = wims(makelist x for x = 1 to 2*\MAX)}
\text{CONDITION =wims(items2words \CONDITION)}
\conditions{\CONDITION}
\integer{cnt_juste=0}
\real{v = 10}
\statement{\nopaste
\style\instruction
\if{\reading notsametext }{\special{help reading,[à lire]}}
\if{\image notsametext }{\special{help image,[à regarder]}}
\audio\video
\for{h=1 to \etape[\step]}{
\if{(\h <= \etape[\step] - \N or r \h isitemof \nstep) and \question[\h;] notsametext }{
<div class="enonce">
\if{\cnt_step > 1 and \MAX > 1}{\h : } \PRELIMINAIRE[\h;]
\question[\h;]</div>
}
\if{\h <= \etape[\step] - \N and \question[\h;] notsametext}{
<div class="reponse">
\qcm_prompt1
\for{ a in \REP[\h;]}{
\if{ \a isitemof \CHOIX[\h;\rep[\h;]]}{
\if{\TEST[\h;2]>0 and \TEST[\h;3]=0}{
<span class="highlight incomplete">\a</span>}
{<span class="highlight true">\a</span>}
}
{
<span class="highlight_false">\a</span>} - }
\if{\TEST[\h;2]>0 and \TEST[\h;3]=0}{
<span class="incomplete">\incomplete_answer_text
</span>}
\if{\TEST[\h;3]>0}{<span style="color:red">\bad_answer_text</span>}
\if{\TEST[\h;3]=0 and \TEST[\h;2]=0}{<span class="true">\good_answer_text</span>}
\if{\answer_given=yes}{
<br/> \qcm_prompt2
<ul class="highlight true">
\for{s=1 to \CNT_choix[\h]}{
\if{\s isitemof \rep[\h;]}{ <li>\CHOIX[\h;\s]</li>}
}
</ul>
}
\if{\explication[\h;] notsametext }{<div class="feedback">\explication[\h;]</div>}
</div>
}
{ \if{ r \h isitemof \nstep}{
<div class="question">
<ol>
\for{s=1 to \CNT_choix[\h]}{ <li><label>\embed{reply \h , \s}</label></li> }
</ol>
</div>
}
}
</ol>
}
}
\answer{}{\REP1;\CHOIX[1;]}{type=\format}{option=\option}
\answer{}{\REP2;\CHOIX[2;]}{type=\format}{option=\option}
\answer{}{\REP3;\CHOIX[3;]}{type=\format}{option=\option}
\answer{}{\REP4;\CHOIX[4;]}{type=\format}{option=\option}
\answer{}{\REP5;\CHOIX[5;]}{type=\format}{option=\option}
\answer{}{\REP6;\CHOIX[6;]}{type=\format}{option=\option}
\answer{}{\REP7;\CHOIX[7;]}{type=\format}{option=\option}
\answer{}{\REP8;\CHOIX[8;]}{type=\format}{option=\option}
\answer{}{\REP9;\CHOIX[9;]}{type=\format}{option=\option}
\answer{}{\REP10;\CHOIX[10;]}{type=\format}{option=\option}
\matrix{REP = \REP1
\REP2
\REP3
\REP4
\REP5
\REP6
\REP7
\REP8
\REP9
\REP10}
\if{\format=radio}{
\text{REP=wims(replace internal , by , in \REP)}
}
\matrix{explication2 = \explication2}
\for{u = 1 to \N}{
\text{H = \CNT[\step-1;\u]}
\text{test1 = wims(listuniq \REP[\H;],\CHOIX[\H;\rep[\H;]])}
\integer{test1 = items(\test1)-items(\CHOIX[\H;\rep[\H;]])}
\text{test2 = wims(listcomplement \REP[\H;] in \CHOIX[\H;\rep[\H;]])}
\text{test3 = wims(listcomplement \CHOIX[\H;\rep[\H;]] in \REP[\H;])}
%%% \integer{test4=items(\REP[\H;]) - items(\CHOIX[\H;])}
\text{test_cnt=\test1, items(\test2),items(\test3)}
\integer{cnt_juste= \test_cnt[1]+\test_cnt[2]+\test_cnt[3] =0 ? \cnt_juste + 1}
\matrix{TEST=\TEST
\test_cnt}
}
test1 = 0 rep < juste
test2 nombre de réponses dites justes et en fait fausses
test3 nombre de réponses dites fausses et en fait justes
totalement justes : test1=0, test2=0 test3=0
partiellement justes :
\real{v=\cnt_juste/\CNT[\step-1;\N]}
\text{nstep = \v >= \percent ? \STEPS[\step;]:}
\condition{Question 1 : \REP1}{\TEST[1;3]=0}{option=hide}
\condition{Question 1 : \REP1}{\TEST[1;1]=0 and \TEST[1;2]=0 and \TEST[1;3]=0}{option=hide}
\condition{Question 2 : \REP2}{\TEST[2;3]=0 and \step >=\CONDSTEP[2]}{option=hide}
\condition{Question 2 : \REP2}{\TEST[2;1]=0 and \TEST[2;2]=0 and \TEST[2;3]=0 and \step >=\CONDSTEP[2]}{option=hide}
\condition{Question 3 : \REP3}{\TEST[3;3]=0 and \step >=\CONDSTEP[3]}{option=hide}
\condition{Question 3 : \REP3}{\TEST[3;1]=0 and \TEST[3;2]=0 and \TEST[3;3]=0 and \step >=\CONDSTEP[3]}{option=hide}
\condition{Question 4 : \REP4}{\TEST[4;3]=0 and \step >=\CONDSTEP[4]}{option=hide}
\condition{Question 4 : \REP4}{\TEST[4;1]=0 and \TEST[4;2]=0 and \TEST[4;3]=0 and \step >=\CONDSTEP[4]}{option=hide}
\condition{Question 5 : \REP5}{\TEST[5;3]=0 and \step >=\CONDSTEP[5]}{option=hide}
\condition{Question 5 : \REP5}{\TEST[5;1]=0 and \TEST[5;2]=0 and \TEST[5;3]=0 and \step >=\CONDSTEP[5]}{option=hide}
\condition{Question 6 : \REP6}{\TEST[6;3]=0 and \step >=\CONDSTEP[6]}{option=hide}
\condition{Question 6 : \REP6}{\TEST[6;1]=0 and \TEST[6;2]=0 and \TEST[6;3]=0 and \step >=\CONDSTEP[6]}{option=hide}
\condition{Question 7 : \REP7}{\TEST[7;3]=0 and \step >=\CONDSTEP[7]}{option=hide}
\condition{Question 7 : \REP7}{\TEST[7;1]=0 and \TEST[7;2]=0 and \TEST[7;3]=0 and \step >=\CONDSTEP[7]}{option=hide}
\condition{Question 8 : \REP8}{\TEST[8;3]=0 and \step >=\CONDSTEP[8]}{option=hide}
\condition{Question 8 : \REP8}{\TEST[8;1]=0 and \TEST[8;2]=0 and \TEST[8;3]=0 and \step >=\CONDSTEP[8]}{option=hide}
\condition{Question 9 : \REP9}{\TEST[9;3]=0 and \step >=\CONDSTEP[9]}{option=hide}
\condition{Question 9 : \REP9}{\TEST[9;1]=0 and \TEST[9;2]=0 and \TEST[9;3]=0 and \step >=\CONDSTEP[9]}{option=hide}
\condition{Question 10 : \REP10}{\TEST[10;3]=0 and \step >=\CONDSTEP[10]}{option=hide}
\condition{Question 10 : \REP10}{\TEST[10;1]=0 and \TEST[10;2]=0 and \TEST[10;3]=0 and \step >=\CONDSTEP[10]}{option=hide}
\text{test=wims(rows2lines \explication)}
\text{test=wims(lines2items \test)}
\text{test=wims(items2words \test)}
\text{test=wims(nospace \test)}
feedback{1=1}{\explication
\if{\test notsametext}{
<div class="reponse"><ol>
\for{w = 1 to \MAX}{
\if{\explication[\w;] notsametext }
{<li style="list-style:decimal;" value="\w">\explication[\w;] </li>}
}
</ol>
</div>
}
}
{<ol>
\for{ t = 1 to \N}{
\if{\CNT[\step;\t] != }{
<li style="list-style:decimal;" value="\CNT[\step;\t]"> <b>\question[\N*(\step-1) + \t;]</b>
<div class="question"><ol>
\for{s=1 to \CNT_choix[\N*(\step-1) + \t]}{
<li>\embed{\STEPS[\step;\t] , \s }</li>
}
</ol>
</div>
</li>}
}
</ol>
}