Rev 15179 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
11360 | bpr | 1 | type=question first |
13716 | obado | 2 | textarea="datatrue datafalse explain" |
3 | iEdit="explain" |
||
8515 | obado | 4 | asis="datatrue datafalse explain" |
23 | reyssat | 5 | |
3426 | bpr | 6 | :Une question à choix multiples avec permutation aléatoire des choix. |
23 | reyssat | 7 | |
7718 | bpr | 8 | Voici un modèle de question à choix multiples. L'ordre des choix est aléatoire, |
5112 | bpr | 9 | ainsi que les choix s'il y en a suffisamment qui sont définis. |
10 | Quand il y a plusieurs bons choix, il suffit d'en choisir un, peu importe lequel. |
||
11 | |||
8515 | obado | 12 | <p>Le texte n'est pas aléatoire. Un autre modèle <b>QCM à la suite</b> |
13 | permet d'avoir aussi un texte aléatoire.</p> |
||
5112 | bpr | 14 | |
15179 | lemaire | 15 | <p class="wims_credits">Auteur du modèle : <a href="mailto:qualite@wimsedu.info">Gang Xiao</a></p> |
5131 | bpr | 16 | |
23 | reyssat | 17 | :%%%%%%%%%%%%%%%%% ATTENTION %%%%%%%%%%%%%%%%%%%% |
18 | |||
2880 | bpr | 19 | Enlevez l'en-tête ci-dessus si vous détruisez les balises pour le modèle ! |
23 | reyssat | 20 | (Ce sont les lignes qui commencent par un ':'.) |
21 | Sinon l'exercice risque de ne pas pouvoir repasser sous Createxo. |
||
22 | |||
23 | :%%%%%%%% Paramètres d'exemples à redéfinir %%%%%%%%%%%%%%%%% |
||
24 | |||
25 | :\title{Choix multiple} |
||
5147 | bpr | 26 | :\author{XIAO, Gang} |
8002 | bpr | 27 | :\email{qualite@wimsedu.info} |
5724 | bpr | 28 | :\credits{} |
23 | reyssat | 29 | |
30 | :Nombre de choix à présenter. Au plus 10. |
||
3108 | obado | 31 | Vous devez définir suffisamment de choix. Sinon l'exercice affichera seulement ce qui est disponible. |
23 | reyssat | 32 | \integer{tot=5} |
33 | |||
8336 | bpr | 34 | :Le nombre de bons choix dans chaque exercice. Ne doit pas dépasser le total. |
23 | reyssat | 35 | \integer{givetrue=2} |
36 | |||
37 | :Nombre de mauvais choix "obligatoires". |
||
3108 | obado | 38 | Par exemple si ce nombre est 2, les deux premiers mauvais choix dans la liste seront toujours présentés dans les exercices générés. |
13488 | obado | 39 | <p>Dans le doute, mettez 0.</p> |
23 | reyssat | 40 | \integer{minfalse=0} |
41 | |||
42 | :Le texte qui explique ce qu'il faut faire. |
||
43 | $embraced_randitem |
||
8515 | obado | 44 | \text{explain=Voici un modèle de question à choix multiples. L'ordre des choix est aléatoire, ainsi que les choix s'il y en a suffisamment qui sont définis. |
17172 | bpr | 45 | Changez les textes, et vous aurez votre question à choix multiples.<br> |
46 | Prenez le bon choix.<br> |
||
3108 | obado | 47 | Quand il y a plusieurs bons choix, il suffit d'en choisir un, peu importe lequel. |
23 | reyssat | 48 | } |
49 | |||
50 | :Le(s) bon(s) choix, un par ligne. |
||
51 | On peut en placer plusieurs (un par ligne) pour tirer au hasard. |
||
52 | Evitez les phrases trop longues ! Aucun point-virgule dans la phrase. |
||
5815 | bpr | 53 | |
23 | reyssat | 54 | $embraced_randitem |
8515 | obado | 55 | \matrix{datatrue=Bon choix n°1 |
56 | Bon choix n°2 |
||
57 | Bon choix n°3 |
||
58 | Bon choix n°4 |
||
23 | reyssat | 59 | } |
60 | |||
61 | :Les mauvais choix, un par ligne. |
||
62 | Vous pouvez en donner plus que ce qu'il faut tirer au hasard. |
||
63 | Evitez les phrases trop longues ! Aucun point-virgule dans la phrase. |
||
64 | $embraced_randitem |
||
8515 | obado | 65 | \matrix{datafalse=Mauvais choix n°1 |
66 | Mauvais choix n°2 |
||
67 | Mauvais choix n°3 |
||
68 | Mauvais choix n°4 |
||
69 | Mauvais choix n°5 |
||
70 | Mauvais choix n°6 |
||
71 | Mauvais choix n°7 |
||
72 | Mauvais choix n°8 |
||
23 | reyssat | 73 | } |
74 | |||
13542 | bpr | 75 | :Mots d'option : <span class="tt wims_code_words">checkbox</span> <span class="tt wims_code_words">split</span>. |
13544 | bpr | 76 | Par défaut, l'élève ne pourra sélectionner qu'un seul choix. |
13542 | bpr | 77 | Mettre le mot <span class="tt wims_code_words">checkbox</span> s'il y a plusieurs bonnes réponses |
78 | et si l'élève doit choisir toutes les bonnes réponses (au lieu d'une seule). |
||
79 | Dans ce cas, si on veut de plus que l'élève obtienne une partie des points lorsque |
||
80 | sa réponse est partiellement bonne, ajouter le mot <span class="tt wims_code_words">split</span>. |
||
23 | reyssat | 81 | \text{option=} |
82 | |||
3396 | bpr | 83 | :Feedback Général |
84 | Ce texte s'affichera après la réponse de l'apprenant, qu'elle soit juste ou fausse. |
||
3108 | obado | 85 | \text{feedback_general=} |
86 | |||
3396 | bpr | 87 | :Feedback en cas de bonne réponse |
88 | Ce texte s'affichera après la réponse de l'apprenant, en cas de bonne reponse ou de reponse partielle. |
||
3108 | obado | 89 | \text{feedback_bon=} |
90 | |||
3396 | bpr | 91 | :Feedback en cas de mauvaise réponse |
92 | Ce texte s'affichera après la réponse de l'apprenant, s'il a coché au moins une mauvaise réponse. |
||
3108 | obado | 93 | \text{feedback_mauvais=} |
94 | |||
11653 | obado | 95 | :Indication |
96 | Un texte qui peut aider l'apprenant à trouver la bonne réponse |
||
97 | \text{exo_hint=} |
||
98 | |||
5797 | bpr | 99 | :Mise en aléatoire par des accolades emboitables |
100 | $embraced_randitem |
||
101 | \text{accolade=item(1,1 oui, |
||
102 | 2 non)} |
||
103 | |||
104 | |||
23 | reyssat | 105 | :%%%%%%%%%%%%%% Rien à modifier avant l'énoncé %%%%%%%%%%%%%%%% |
5797 | bpr | 106 | \text{accolade=wims(word 1 of \accolade)} |
23 | reyssat | 107 | |
3108 | obado | 108 | \text{empty=} |
109 | \if{\feedback_general != \empty}{ |
||
110 | \text{feedback_general=<p class="feedback">\feedback_general</p>} |
||
111 | } |
||
112 | \if{\feedback_bon != \empty}{ |
||
113 | \text{feedback_bon=<p class="feedback good_answer">\feedback_bon</p>} |
||
114 | } |
||
115 | \if{\feedback_mauvais != \empty}{ |
||
116 | \text{feedback_mauvais=<p class="feedback bad_answer">\feedback_mauvais</p>} |
||
117 | } |
||
11653 | obado | 118 | \if{\exo_hint != \empty}{ |
119 | \hint{\exo_hint} |
||
120 | } |
||
3108 | obado | 121 | |
23 | reyssat | 122 | \text{datatrue=wims(nonempty rows \datatrue)} |
123 | \text{datafalse=wims(nonempty rows \datafalse)} |
||
124 | \integer{truecnt=rows(\datatrue)} |
||
125 | \integer{falsecnt=rows(\datafalse)} |
||
126 | \integer{givetrue=\givetrue<1?1} |
||
127 | \integer{givetrue=\givetrue>\truecnt?\truecnt} |
||
128 | \integer{tot=\tot > \falsecnt+\givetrue?\falsecnt+\givetrue} |
||
129 | \integer{givetrue=\givetrue>\tot-1?\tot-1} |
||
130 | \integer{minfalse=\minfalse>\tot-\givetrue?\tot-\givetrue} |
||
131 | \text{tsh=shuffle(\truecnt)} |
||
132 | \text{true=row(\tsh,\datatrue)} |
||
133 | \if{\minfalse>0}{ |
||
134 | \text{false1=row(1..\minfalse,\datafalse);} |
||
135 | \text{false2=row(\minfalse+1..\falsecnt,\datafalse)} |
||
136 | }{ |
||
137 | \integer{minfalse=0} |
||
138 | \text{false1=} |
||
139 | \text{false2=\datafalse} |
||
140 | } |
||
141 | \text{fsh=shuffle(\falsecnt)} |
||
142 | \text{false2=row(\fsh,\false2)} |
||
143 | \text{pick=row(1..\givetrue,\true);\false1 row(1..\tot-\givetrue-\minfalse,\false2)} |
||
144 | \text{ind=wims(makelist 1 for x=1 to \givetrue),wims(makelist 0 for x=1 to \tot-\givetrue)} |
||
145 | |||
146 | \text{sh=shuffle(\tot)} |
||
147 | \text{ind=item(\sh,\ind)} |
||
148 | \text{pick=row(\sh,\pick)} |
||
5797 | bpr | 149 | \text{pick=\accolade=1 ? wims(embraced randitem \pick)} |
150 | \text{explain=\accolade=1 ? wims(embraced randitem \explain)} |
||
23 | reyssat | 151 | \text{ans=positionof(1,\ind)} |
152 | \text{list=item(1..\tot,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z)} |
||
13542 | bpr | 153 | \text{option=wims(items2words \option)} |
23 | reyssat | 154 | \text{anstype=checkbox iswordof \option?checkbox:radio} |
155 | |||
13491 | bpr | 156 | %%% for latex print |
157 | \text{latextext=} |
||
158 | \for{ll=1 to \tot}{ |
||
159 | \text{latextext=\latextext |
||
160 | \item \list[\ll] : \pick[\ll;]} |
||
161 | } |
||
162 | %%% |
||
163 | |||
23 | reyssat | 164 | :%%%%%%%%%%%%% Maintenant l'énoncé en code html. %%%%%%%%%%%%%%%%%%%% |
165 | |||
166 | ::Vous n'avez pas besoin de modifier ceci en général. |
||
167 | |||
1362 | obado | 168 | \statement{ |
9924 | obado | 169 | <div class="oef_explain">\explain</div> |
170 | \for{i=1 to \tot} |
||
12208 | obado | 171 | {<div class="oefreply">\embed{reply 1,\i, \list[\i] : \pick[\i;]}</div>} |
23 | reyssat | 172 | } |
173 | |||
174 | :%%%%%%%%%%%%% Rien à modifier ci-après. %%%%%%%%%%%%%%%%%5 |
||
175 | |||
176 | \answer{La réponse}{\ans;\list}{type=\anstype}{option=\option} |
||
177 | |||
3108 | obado | 178 | \feedback{1=1}{\feedback_general} |
179 | \feedback{\reply1 isitemof \list[\ans]}{\feedback_bon} |
||
180 | \feedback{\reply1 notitemof \list[\ans]}{\feedback_mauvais} |
||
13491 | bpr | 181 | :%%%%%%%%%%%%% Maintenant l'énoncé en latex. %%%%%%%%%%%%%%%%%%%% |
182 | \latex{ |
||
13511 | bpr | 183 | \begin{statement} |
184 | \explain |
||
13542 | bpr | 185 | \begin{\anstype} |
13533 | bpr | 186 | \latextext |
13542 | bpr | 187 | \end{\anstype} |
13511 | bpr | 188 | \end{statement} |
13491 | bpr | 189 | } |