DocAide QCM personnalisés

Introduction

Bien que WIMS puisse faire des exercices beaucoup plus sophistiqués, il peut aussi faire des exercices du type QCM ou exercices à trous. Cela est très utile dans les disciplines non scientifiques. Par contre, il n'y a pas d'outil permettant de créer ces exercices sans "rien voir de la technique".
Pour aider les utilisateurs, nous donnons ici quelques exemples en expliquant le code. On peut d'abord les utiliser tels quels, puis en comprenant le code les adapter à son utilisation personnelle. En effet, une fois passée la difficulté de compréhension du code, il est possible de créer sa variante adaptée à son type de données, de feedback.
La présentation que nous donnons ici ainsi que les sources nécessite d'avoir un compte Modtool ( DocAide Modules d'exercices OEF ). Il serait possible de faire ces exercices à partir d'une classe (vous pouvez aussi utiliser les modèles préparés que l'on trouve dans Createxo), mais si vous avez beaucoup de questions ou d'exigences, cela sera beaucoup plus simple à partir d'un compte Modtool. Aussi avons-nous pris ce parti.
Sauf erreur de notre part, vous pouvez recopier le fichier source, le mettre dans votre module sous un nom du type src/toto.oef, créer un fichier data dans le module selon la description qui en est faite dans chacun des exemples et ... obtenir un exercice ....

QCM version facile

 


Dans l'exercice décrit dans la suite, toutes les questions du fichier sont affichées dans l'ordre où elles ont été écrites. Le nombre de choix peut être différent selon les questions.
Le fichier de données data1 doit être de la forme
:texte de la question 1
numéro de la réponse
choix1
choix2
choix3

:texte de la question 2 numéro de la réponse choix1 choix2 choix3
Vous pouvez recopier Source QCM 1 dans src/qcm.oef et sauf erreur de ma part, votre qcm devrait fonctionner. Vous pouvez/devez le nombre de questions, le nom du fichier de données, le type de réponses : checkbox au lieu de radio:
Voici quelques explications sur le code :
\title{QCM sans feedback (toutes les questions)}
\text{N = 3}
Nom du fichier
\text{data = data1}
\integer{cnt_question = wims(recordcnt \data)}

\text{bat = shuffle(\cnt_question)}
\matrix{question = } \matrix{rep = } \text{CNT_choix = } \matrix{CHOIX = } \for{i = 1 to \N }{ \matrix{QUEST = wims(record \bat[\i] of \data)} \matrix{question = \question \QUEST[1;]}
Construit la matrice des questions
  \integer{cnt_choix = rows(\QUEST)-2}
  \text{CNT_choix = \CNT_choix,\cnt_choix}
  \text{Choix = }
  \text{mix = shuffle(\cnt_choix)}
   \for{ j = 3 to \cnt_choix + 2}{
     \text{choix = \QUEST[\j;]}
     \matrix{Choix = \Choix, \choix[1;]}
   }
   \text{Choix = wims(nonempty items \Choix)}
   \text{Choix = \Choix[\mix]}
 
Mélange les choix pour chacune des questions
   \matrix{CHOIX = \CHOIX
     \Choix}
   \text{H = wims(nospace \QUEST[2;])}
   \text{pos = }
   \for{r in \H}{ \text{pos = \pos,position(\r,\mix)} }
   \text{pos = wims(nonempty items \pos)}
   \matrix{rep = \rep
   \pos}
   \matrix{rep = \rep
   position(\H,\mix)}
}
     
Construit la matrice des réponses
\text{CNT_choix = wims(nonempty items \CNT_choix)}
\text{STEP = wims(makelist r x for x = 1 to \N)}
\steps{\STEP}
\statement{
Répondre aux questions
<ol>
 \for{h = 1 to \N}{
   <li>\question[\h;]
     <ul>
     \for{s=1 to \CNT_choix[\h]}{
        <li>
        \embed{reply \h , \s }
        </li>
      }
     </ul>
   </li>
  }
 </ol>
}
\answer{}{\rep[1;];\CHOIX[1;]}{type=radio}
\answer{}{\rep[2;];\CHOIX[2;]}{type=radio}
\answer{}{\rep[3;];\CHOIX[3;]}{type=radio}
\answer{}{\rep[4;];\CHOIX[4;]}{type=radio}
\answer{}{\rep[5;];\CHOIX[5;]}{type=radio}
\answer{}{\rep[6;];\CHOIX[6;]}{type=radio}
\answer{}{\rep[7;];\CHOIX[7;]}{type=radio}
\answer{}{\rep[8;];\CHOIX[8;]}{type=radio}
\answer{}{\rep[9;];\CHOIX[9;]}{type=radio}
\answer{}{\rep[10;];\CHOIX[10;]}{type=radio}
\answer{}{\rep[11;];\CHOIX[11;]}{type=radio}
\answer{}{\rep[12;];\CHOIX[12;]}{type=radio}
\answer{}{\rep[13;];\CHOIX[13;]}{type=radio}

Remarques

Dans ce type de QCM, il n'est pas possible de mettre des variables aléatoires dans les questions. Si vous désirez le faire, il faut alors mettre les questions dans le fichier src/xxx.oef dans une variable \matrix{A = ...}
On peut remplacer radio par checkbox si plusieurs réponses sont possibles.

Source QCM 1

 


\title{QCM sans feedback (toutes les questions en même temps)}
nombre de questions
\text{N = 3}

Nom du fichier appelé \text{data = data1}
\integer{cnt_question = wims(recordcnt \data)} \text{bat = shuffle()}
\matrix{question = } \matrix{rep = } \text{CNT_choix = } \matrix{CHOIX = } \for{i = 1 to \N }{ \matrix{QUEST = wims(record \bat[\i] of \data)} \matrix{question = \question \QUEST[1;]} \integer{cnt_choix = rows(\QUEST)-2} \text{CNT_choix = \CNT_choix,\cnt_choix} \text{Choix = } \text{mix = shuffle(\cnt_choix)} \for{ j = 3 to \cnt_choix + 2}{ \text{choix = \QUEST[\j;]} \matrix{Choix = \Choix, \choix[1;]} } \text{Choix = wims(nonempty items \Choix)} \text{Choix = \Choix[\mix]} \matrix{CHOIX = \CHOIX \Choix} \text{H = wims(nospace \QUEST[2;])} \text{pos = } \for{r in \H}{ \text{pos = \pos,position(\r,\mix)} } \text{pos = wims(nonempty items \pos)} \matrix{rep = \rep \pos} }
\text{CNT_choix = wims(nonempty items \CNT_choix)}
\text{STEP = wims(makelist r x for x = 1 to \N)} \steps{\STEP}
\statement{
Répondre aux questions
<ol>
 \for{h = 1 to \N}{
   <li>\question[\h;]
     <ul>
     \for{s = 1 to \CNT_choix[\h]}{
        <li>
        \embed{reply \h , \s }
        </li>
      }
     </ul>
   </li>
  }
 </ol>
}
\answer{}{\rep[1;];\CHOIX[1;]}{type=radio}
\answer{}{\rep[2;];\CHOIX[2;]}{type=radio}
\answer{}{\rep[3;];\CHOIX[3;]}{type=radio}
\answer{}{\rep[4;];\CHOIX[4;]}{type=radio}
\answer{}{\rep[5;];\CHOIX[5;]}{type=radio}
\answer{}{\rep[6;];\CHOIX[6;]}{type=radio}
\answer{}{\rep[7;];\CHOIX[7;]}{type=radio}
\answer{}{\rep[8;];\CHOIX[8;]}{type=radio}
\answer{}{\rep[9;];\CHOIX[9;]}{type=radio}
\answer{}{\rep[10;];\CHOIX[10;]}{type=radio}
\answer{}{\rep[11;];\CHOIX[11;]}{type=radio}
\answer{}{\rep[12;];\CHOIX[12;]}{type=radio}
\answer{}{\rep[13;];\CHOIX[13;]}{type=radio}

QCM à questions successives

 


Dans le QCM suivant, les questions sont données une par une, les réponses aux questions précédentes s'affichent mais le QCM s'arrête à la première faute. Source QCM 2
\title{QCM : question une par une}
\text{N =  3}
\text{data = data1}
\integer{cnt_question = wims(recordcnt \data)}
\text{bat = shuffle(\cnt_question)}

\matrix{question = } \matrix{rep = } \text{CNT_choix = } \matrix{CHOIX = } \for{i = 1 to \N }{ \matrix{QUEST = wims(record \bat[\i] of \data)} \matrix{question = \question \QUEST[1;]} \integer{cnt_choix = rows(\QUEST)-2} \text{CNT_choix = \CNT_choix,\cnt_choix} \text{Choix = } \text{mix = shuffle(\cnt_choix)} \for{ j = 3 to \cnt_choix + 2}{ \text{choix = \QUEST[\j;]} \matrix{Choix = \Choix, \choix[1;]} } \text{Choix = wims(nonempty items \Choix)} \text{Choix = \Choix[\mix]} \matrix{CHOIX = \CHOIX \Choix} \text{H = wims(nospace \QUEST[2;])} \text{pos = } \for{r in \H}{ \text{pos = \pos,position(\r,\mix)} } \text{pos = wims(nonempty items \pos)} \matrix{rep = \rep \pos} }
\text{CNT_choix = wims(nonempty items \CNT_choix)}
\text{STEP = wims(makelist r x for x = 1 to \N)} \text{STEP = wims(replace internal , by ; in \STEP)} \steps{\STEP}
Ici STEP est de la forme r1;r2;r3, à chaque étape, il y a une question supplémentaire.
\statement{Read the text above then answer the questions.
 \for{h = 1 to \step}{
  <p>
  \question[\h;]
  \if{\h < \step}{
    <span style="color:green">\CHOIX[\h;\rep[\h;]]</span>
 </p>}
  {</p><ol>
   \for{s = 1 to \CNT_choix[\h]}{
   <li>\embed{reply \h , \s }</li>
   }
   </ol>
  }
 }
}
\answer{}{\REP[1;];\CHOIX[1;]}{type=radio}
\answer{}{\REP[2;];\CHOIX[2;]}{type=radio}
\answer{}{\REP[3;];\CHOIX[3;]}{type=radio}
\answer{}{\REP[4;];\CHOIX[4;]}{type=radio}
\answer{}{\REP[5;];\CHOIX[5;]}{type=radio}
\answer{}{\REP[6;];\CHOIX[6;]}{type=radio}
\answer{}{\REP[7;];\CHOIX[7;]}{type=radio}
\answer{}{\REP[8;];\CHOIX[8;]}{type=radio}

Source QCM 2

 


\title{QCM : question une par une}
\text{N = 3}
\text{data = data1}
\integer{cnt_question = wims(recordcnt \data)}
\matrix{question = }
\matrix{rep = }
\text{CNT_choix = }
\matrix{CHOIX = }
\for{i = 1 to \N  }{
  \matrix{QUEST = wims(record \i of \data)}
  \matrix{question = \question
  \QUEST[1;]}
  \integer{cnt_choix = rows(\QUEST)-2}
  \text{CNT_choix = \CNT_choix,\cnt_choix}
   \text{Choix = }
   \text{mix = shuffle(\cnt_choix)}
   \for{ j = 3 to \cnt_choix + 2}{
     \text{choix = \QUEST[\j;]}
     \matrix{Choix = \Choix, \choix[1;]}
   }
   \text{Choix = wims(nonempty items \Choix)}
   \text{Choix = \Choix[\mix]}
   \matrix{CHOIX = \CHOIX
     \Choix}
   \text{H = wims(nospace \QUEST[2;])}
   \text{pos = }
   \for{r in \H}{ \text{pos = \pos,position(\r,\mix)} }
   \text{pos = wims(nonempty items \pos)}
   \matrix{rep = \rep
   \pos}
}

\text{CNT_choix = wims(nonempty items \CNT_choix)}
\text{STEP = wims(makelist r x for x = 1 to \N)} \text{STEP = wims(replace internal , by ; in \STEP)} \steps{\STEP}
\statement{Répondre aux questions :
 \for{h = 1 to \step}{
  <p>
  \question[\h;]
  \if{\h < \step}{
    <span style="color:green">\CHOIX[\h;\rep[\h;]]</span>
 </p>}
  {</p><ol>
   \for{s = 1 to \CNT_choix[\h]}{
   <li>\embed{reply \h , \s }</li>
   }
   </ol>
  }
 }
}
\answer{}{\rep[1;];\CHOIX[1;]}{type=radio}
\answer{}{\rep[2;];\CHOIX[2;]}{type=radio}
\answer{}{\rep[3;];\CHOIX[3;]}{type=radio}
\answer{}{\rep[4;];\CHOIX[4;]}{type=radio}
\answer{}{\rep[5;];\CHOIX[5;]}{type=radio}
\answer{}{\rep[6;];\CHOIX[6;]}{type=radio}
\answer{}{\rep[7;];\CHOIX[7;]}{type=radio}
\answer{}{\rep[8;];\CHOIX[8;]}{type=radio}

QCM à questions successives ne s'arrêtant pas

 


Voici un QCM où les réponses sont analysées à la fin de toutes les questions. Le nombre de questions peut être variable (N), seules les conditions utiles servent. Le fichier de données correspondant est le même que pour les deux types de QCM précédents
\title{QCM : question une par une}
\text{N = 3}
\text{data = data1}
\integer{cnt_question = wims(recordcnt ) }
\text{bat = shuffle()}
\matrix{question = }
\matrix{rep = }
\text{CNT_choix = }
\matrix{CHOIX = }
\for{i = 1 to \N }{
  \matrix{QUEST = wims(record \bat[\i] of )}
  \matrix{question = \question
  \QUEST[1;]}
  \integer{cnt_choix = rows(\QUEST)-2}
  \text{CNT_choix = \CNT_choix,\cnt_choix}
   \text{Choix = }
   \text{mix = shuffle(\cnt_choix)}
   \for{ j = 3 to \cnt_choix + 2}{
     \text{choix = \QUEST[\j;]}
     \matrix{Choix = \Choix, \choix[1;]}
   }
   \text{Choix = wims(nonempty items \Choix)}
   \text{Choix = \Choix[\mix]}
   \matrix{CHOIX = \CHOIX
     \Choix}
   \text{H = wims(nospace \QUEST[2;])}
   \text{pos = }
   \for{r in \H}{ \text{pos = \pos,position(\r,\mix)} }
   \text{pos = wims(nonempty items \pos)}
   \matrix{rep = \rep
   \pos}
}

\text{CNT_choix = wims(nonempty items \CNT_choix)}
\text{STEP = wims(makelist r x for x = 1 to \N)} \text{STEP = wims(replace internal , by ; in \STEP)} \text{CONDITION = wims(makelist x for x = 1 to \cnt_question)} \steps{\STEP} \conditions{\CONDITION}
Ici STEP est de la forme r1;r2;r3, à chaque étape, il y a une question supplémentaire. La réponse est analysée grâce aux conditions (il y en a une par question)
\statement{
 \for{h = 1 to \step}{
  <p>
  \question[\h;]
  \if{\h < \step}{
    <span style="color:green">\CHOIX[\h;\rep[\h;]]</span>
 </p>}
  {</p><ol>
   \for{s = 1 to \CNT_choix[\h]}{
   <li>\embed{reply \h , \s }</li>
   }
   </ul></li>
 }
</ol>
 }
}
\answer{}{\REP1;\CHOIX[1;]}{type=radio}
\answer{}{\REP2;\CHOIX[2;]}{type=radio}
\answer{}{\REP3;\CHOIX[3;]}{type=radio}
\answer{}{\REP4;\CHOIX[4;]}{type=radio}
\answer{}{\REP5;\CHOIX[5;]}{type=radio}
\answer{}{\REP6;\CHOIX[6;]}{type=radio}
\answer{}{\REP7;\CHOIX[7;]}{type=radio}
\answer{}{\REP8;\CHOIX[8;]}{type=radio}
\answer{}{\REP9;\CHOIX[9;]}{type=radio}
\answer{}{\REP10;\CHOIX[10;]}{type=radio}

\condition{Question 1 : \REP1}{\REP1 issametext \CHOIX[1;\rep[1;]]} \condition{Question 2 : \REP2}{\REP2 issametext \CHOIX[2;\rep[2;]]} \condition{Question 3 : \REP3}{\REP3 issametext \CHOIX[3;\rep[3;]]} \condition{Question 4 : \REP4}{\REP4 issametext \CHOIX[4;\rep[4;]]} \condition{Question 5 : \REP5}{\REP5 issametext \CHOIX[5;\rep[5;]]} \condition{Question 6 : \REP6}{\REP6 issametext \CHOIX[6;\rep[6;]]} \condition{Question 7 : \REP7}{\REP7 issametext \CHOIX[7;\rep[7;]]} \condition{Question 8 : \REP8}{\REP8 issametext \CHOIX[8;\rep[8;]]} \condition{Question 9 : \REP9}{\REP9 issametext \CHOIX[9;\rep[9;]]} \condition{Question 10 : \REP10}{\REP10 issametext \CHOIX[10;\rep[10;]]}

QCM avec des variables

 


Si l'on désire que les questions du QCM contiennent des variables, on ne peut pas mettre les questions dans un fichier à part
Deux possibilités quand même

Un QCM avec feedback

 


A partir de ce qu'on a vu précédemment, on peut imaginer d'autres manières de rentrer les données, envisager de mettre des feedback selon les questions et les réponses. Le tout est d'organiser ces données de manière systématique selon vos besoins et le type d'informations.
Donnons un exemple : il y aura un nombre variable de réponses, plusieurs réponses possibles, un feedback pour certaines réponses fausses :
On peut par exemple avoir un fichier dataqcm de la forme suivante
question
nombre de questions
numero des bons choix
choix1
choix2
...
feedback1
feedback2
...
le fichier source de l'exercice OEF pourrait être par exemple
\title{QCM avec feedback}
\language{fr}
\author{E.Durand}
\format{html}

\matrix{Q = wims(randrecord dataqcm)} \text{enonce = \Q[1;]} \text{n = \Q[2;]} \text{reponse = \Q[3;]} \text{choixetfeed = \Q[4..-1;]} \text{choix = \choixetfeed[1..\n;]} \text{verite = \choix[\reponse;]} \text{choix = wims(replace internal ; by , in \choix)} \text{feed = \choixetfeed[\n+1..-1;]} \text{feed = wims(replace internal ; by , in \feed)}
\text{verite1 = <ul><li>wims(replace internal ; by </li><li> in \verite)</li></ul>}
\statement{<b>\enonce : </b></p>
<ul>
\for{i = 1 to \n}{ <li Type="A"> \embed{reply1,\i} </li>}
</ul>
}
\answer{Question 1}{\reponse;\choix}{type=checkbox}
\solution{\verite1}
\text{commentaire = REMARQUES : <br />}
\for{i = 1 to \n}{
    \text{commentaire = \commentaire <b>item(\i,A,B,C,D,E) - \choix[\i] :</b>}
    \if{ (\choix[\i] isin \reply1) and \i isitemof \reponse }
        { \text{ajout = <i>vrai en effet</i><br />} }
        { \if{ (\choix[\i] isin \reply1 or \i isitemof \reponse)}
          {\text{ajout = \feed[\i] <br />}}
          {\text{ajout = <i>faux en effet</i><br />}}
        }
    \text{commentaire = \commentaire \ajout }
}
\feedback{1 = 1}{\commentaire }

Dictée à trous

 


Nous donnons ici un exemple de programmes permettant de créer un texte à trous à compléter par exemple à l'écoute d'un texte. Beaucoup de variantes sont possibles.
Il s'agit d'une version très simple.
\title{Texte à trous (dictée)}
\text{cnt_record = wims(recordcnt data)}
\text{H = randint(\cnt_record)}
\text{texte = wims(record \H of data)}
On choisit au hasard un des textes du fichier data.
\text{bande = wims(word 1 of \texte)}
\text{texte = wims(replace internal \bande by in \texte)}
Le premier mot du texte doit être le nom du fichier audio.
\matrix{texte = slib(text/cutchoices \texte)}
\text{cntrow = rows(\texte)}
\integer{cntQ = \cntrow/2-1}
\text{trou = }
\for{i = 1 to \cntQ}{
  \text{trou1 = \texte[2*\i;]}
  \text{trou = \trou, \trou1}
 }
\text{trou = wims(nonempty items \trou)}
Crée la liste des réponses
\text{audio = slib(media/audio /\bande )}
Crée le code html pour la lecture du matériel audio. Attention, ce script slib n'existe qu'à partir de la version 3.50. Sinon, vous devez vous même vous le fabriquer.
\text{STEP = wims(makelist r x for x = 1 to \cntQ)}
\steps{\STEP}
Ceci contrôle le nombre de questions, c'est-à-dire le nombre de trous dans le texte
\statement{ Ecouter \audio et compléter le texte:

<div style="background-color:#AAFFFF; padding:1%; margin:5% 15%;"> \for{k = 1 to \cntQ}{ \texte[2*\k-1;] \embed{\STEP[\k], 10} } </div> }
\answer{}{\trou[1]}{type=case}
\answer{}{\trou[2]}{type=case}
\answer{}{\trou[3]}{type=case}
\answer{}{\trou[4]}{type=case}
\answer{}{\trou[5]}{type=case}
\answer{}{\trou[6]}{type=case}
\answer{}{\trou[7]}{type=case}
\answer{}{\trou[8]}{type=case}
\answer{}{\trou[9]}{type=case}
\answer{}{\trou[10]}{type=case}
\answer{}{\trou[11]}{type=case}
\answer{}{\trou[12]}{type=case}
\answer{}{\trou[13]}{type=case}
\answer{}{\trou[14]}{type=case}
\answer{}{\trou[15]}{type=case}
\answer{}{\trou[16]}{type=case}
\answer{}{\trou[17]}{type=case}
\answer{}{\trou[18]}{type=case}
\answer{}{\trou[19]}{type=case}
\answer{}{\trou[20]}{type=case}
Ici au plus 20 trous à remplir. Mais on peut augmenter ...

Données

 


Pour être adapté au texte de l'exercice Source oef , le fichier de données doit satisfaire les règles suivantes Donnons un exemple :
 :dictee1.mp3
 Un ??chasseur?? sachant ??chasser?? doit ??savoir?? chasser
 sans son ??chien?? .

:dictee2.mp3 Voici ??son?? chien et ??son?? chat qui ??se?? battent.

Source oef

 


\title{Texte à trous (dictée)}

\text{cnt_record = wims(recordcnt data)} \text{H = randint(\cnt_record)} \text{texte = wims(record \H of data)} \text{bande = wims(word 1 of \texte)} \text{texte = wims(replace internal \bande by in \texte)}
\matrix{texte = slib(text/cutchoices \texte)} \text{cntrow = rows(\texte)} \integer{cntQ = \cntrow/2-1} \text{trou = } \for{i = 1 to \cntQ}{ \text{trou1 = \texte[2*\i;]} \text{trou = \trou, \trou1} } \text{trou = wims(nonempty items \trou)}
\text{audio = (media/audio \bande )} \text{STEP = wims(makelist r x for x = 1 to \cntQ)}
\steps{\STEP}
\statement{ Ecouter \audio et compléter le texte:

<div style="background-color : #AAFFFF; padding : 1%; margin : 5% 15%;"> \for{k = 1 to \cntQ}{ \texte[2*\k-1;] \embed{\STEP[\k], 10} } \texte[2*\cntQ+1;] </div> }
\answer{}{\trou[1]}{type=case}
\answer{}{\trou[2]}{type=case}
\answer{}{\trou[3]}{type=case}
\answer{}{\trou[4]}{type=case}
\answer{}{\trou[5]}{type=case}
\answer{}{\trou[6]}{type=case}
\answer{}{\trou[7]}{type=case}
\answer{}{\trou[8]}{type=case}
\answer{}{\trou[9]}{type=case}
\answer{}{\trou[10]}{type=case}
\answer{}{\trou[11]}{type=case}
\answer{}{\trou[12]}{type=case}
\answer{}{\trou[13]}{type=case}
\answer{}{\trou[14]}{type=case}
\answer{}{\trou[15]}{type=case}
\answer{}{\trou[16]}{type=case}
\answer{}{\trou[17]}{type=case}
\answer{}{\trou[18]}{type=case}
\answer{}{\trou[19]}{type=case}
\answer{}{\trou[20]}{type=case}

Texte à choix

 


On désire faire un exercice présentant un texte avec des mots à trouver parmi une liste proposée (par exemple par un menu à choix). Il peut donc ici ne pas y avoir forcément de fichiers audio.
\title{Texte à trous avec choix}
\text{cnt_record= wims(recordcnt data)}
\text{H=randint(\cnt_record)}
\text{texte= wims(record \H of data)}
On choisit au hasard un des textes du fichier data.
\matrix{texte = slib(text/cutchoices \texte)}
\text{cntrow=rows(\texte)}
\integer{cntQ=\cntrow/2-1}
\text{trou =}
\text{rep = }
\for{i= 1 to \cntQ}{
  \text{trou1=\texte[2*\i;]}
  \text{cnt = items(\trou1)}
  \text{mix = shuffle(\cnt)}
  \matrix{trou=\trou
  \trou1[\mix]}
  \text{rep = \rep,position(1,)}
 }
 \text{rep =wims(nonempty items \rep)}
Crée la liste des réponses et des choix
\text{STEP = wims(makelist r x for x=1 to \cntQ)}
\steps{\STEP}
Ceci contrôle le nombre de questions, c'est-à-dire le nombre de trous dans le texte
\statement{ Compléter le texte :
<div style="background-color:#AAFFFF;
padding:1%;
margin:5% 15%;">
\for{k = 1 to \cntQ}{
    \texte[2*\k-1;] \embed{\STEP[\k]}
 }
\texte[2*\cntQ+1;]
</div>
}
\answer{}{\rep[1];\trou[1;]}{type=menu}
\answer{}{\rep[2];\trou[2;]}{type=menu}
\answer{}{\rep[3];\trou[3;]}{type=menu}
\answer{}{\rep[4];\trou[4;]}{type=menu}
\answer{}{\rep[5];\trou[5;]}{type=menu}
\answer{}{\rep[6];\trou[6;]}{type=menu}
\answer{}{\rep[7];\trou[7;]}{type=menu}
\answer{}{\rep[8];\trou[8;]}{type=menu}
\answer{}{\rep[9];\trou[9;]}{type=menu}
\answer{}{\rep[10];\trou[10;]}{type=menu}
\answer{}{\rep[11];\trou[11;]}{type=menu}
\answer{}{\rep[12];\trou[12;]}{type=menu}
\answer{}{\rep[13];\trou[13;]}{type=menu}
\answer{}{\rep[14];\trou[14;]}{type=menu}
\answer{}{\rep[15];\trou[15;]}{type=menu}
\answer{}{\rep[16];\trou[16;]}{type=menu}
\answer{}{\rep[17];\trou[17;]}{type=menu}
\answer{}{\rep[18];\trou[18;]}{type=menu}
\answer{}{\rep[19];\trou[19;]}{type=menu}
\answer{}{\rep[20];\trou[20;]}{type=menu}
Ici au plus 20 trous à remplir. Mais on peut augmenter ...

Données pour choix

 


Pour être adapté au texte de l'exercice Texte à choix , le fichier de données doit satisfaire les règles suivantes Donnons un exemple :
 :
 Un ??chasseur,chaceur?? sachant ??chasser,chassé?? doit ??savoir?? chasser
 sans ??son,sont ??chien.

: Voici ??son,sont,con?? chien et ??son,sont,con?? chat qui ??se,ce,ceux?? battent.

Texte à choix

 


\title{Texte à trous avec choix}
\text{cnt_record= wims(recordcnt data)}
\text{H=randint(\cnt_record)}
\text{texte= wims(record \H of data)}
\matrix{texte = slib(text/cutchoices \texte)}
\text{cntrow = rows(\texte)}
\integer{cntQ = \cntrow/2-1}
\text{trou = }
\text{rep = }
\for{i= 1 to \cntQ}{
  \text{trou1 = \texte[2*\i;]}
  \text{cnt = items(\trou1)}
  \text{mix = shuffle(\cnt)}
  \matrix{trou = \trou
  \trou1[\mix]}
  \text{rep = \rep,position(1,)}
 }
\text{rep = wims(nonempty items \rep)}
\text{STEP = wims(makelist r x for x = 1 to \cntQ)}
\steps{\STEP}
\statement{ Compléter le texte :

<div style="background-color:#AAFFFF; padding:1%; margin:5% 15%;"> \for{k = 1 to \cntQ}{ \texte[2*\k-1;] \embed{\STEP[\k]} } \texte[2*\cntQ+1;] </div> }
\answer{}{\rep[1];\trou[1;]}{type=menu}
\answer{}{\rep[2];\trou[2;]}{type=menu}
\answer{}{\rep[3];\trou[3;]}{type=menu}
\answer{}{\rep[4];\trou[4;]}{type=menu}
\answer{}{\rep[5];\trou[5;]}{type=menu}
\answer{}{\rep[6];\trou[6;]}{type=menu}
\answer{}{\rep[7];\trou[7;]}{type=menu}
\answer{}{\rep[8];\trou[8;]}{type=menu}
\answer{}{\rep[9];\trou[9;]}{type=menu}
\answer{}{\rep[10];\trou[10;]}{type=menu}
\answer{}{\rep[11];\trou[11;]}{type=menu}
\answer{}{\rep[12];\trou[12;]}{type=menu}
\answer{}{\rep[13];\trou[13;]}{type=menu}
\answer{}{\rep[14];\trou[14;]}{type=menu}
\answer{}{\rep[15];\trou[15;]}{type=menu}
\answer{}{\rep[16];\trou[16;]}{type=menu}
\answer{}{\rep[17];\trou[17;]}{type=menu}
\answer{}{\rep[18];\trou[18;]}{type=menu}
\answer{}{\rep[19];\trou[19;]}{type=menu}
\answer{}{\rep[20];\trou[20;]}{type=menu}

Marquer des mots d'un texte

 


Bien qu'on s'éloigne de plus en plus des qcm, on ne résiste pas à l'envie de vous proposer un autre type d'exercices qui consistent à faire marquer certains mots.
Par exemple, vous désirez faire un exercice demandant de marquer tous les articles définis d'une phrase. Pour cela, on peut utiliser le type de réponses mark Ce type comme checkbox demande de connaître :
la position des items sur lesquels on doit cliquer ; les items en question
Par exemple :
1,4;le,chien,et,le,chat
Le fichier de données datamark adapté à l'exercice qui suit est de la forme :
:??le?? chien et ??le?? chat
??La?? montagne lui plaît

:??un??village et ??une?? ville
\title{Marquer les articles}
\text{cnt_record= wims(recordcnt datamark)}
\text{H=randint(\cnt_record)}
\matrix{texte=randtow( wims(record 0 of datamark))}
\matrix{texte = slib(text/marktext \texte)}
\text{cnt = \texte[3;]}
\matrix{texte=\texte[1,2;]}
On utilise ici un script qui calcule la position des mots sur lesquels il faut cliquer et transforme la phrase en mots séparés par des virgules comme le demande le type mark.
\statement{
<div style="padding:1%;margin:5% 15%;">
\for{s = 1 to \cnt}{\embed{reply1,\s} }
}
\answer{}{\texte}{type=mark}
Vous pouvez voir ce qu'il y a derrière le script. Regardez-le si vous désirez l'adapter. Exemple de source sans slib
On peut aussi imaginer plutôt que ?? des indicateurs plus précis comme <ART> <GN> etc adaptés à l'analyse grammaticale ... A vous de voir et de proposer !
Mais nous nous éloignons du sujet.

Exemple de source sans slib

 


\title{Marquer les articles}
\text{cnt_record = wims(recordcnt datamark)}
\text{H = randint(\cnt_record)}
\text{texte = randtow(wims(record 0 of datamark))}
\text{texte = wims(embraced randitem \texte)}
\text{test = wims( 1 to 2 of wims(replace internal ?? by || in \texte))}
\text{u = \test issametext || ? 1: 0}
\matrix{texte = slib(text/cutchoices \texte)}
\text{cntrow = rows(\texte)}
\text{TEXTE = }
\text{rep = }
\text{cnt = 0}
\text{texte = wims(replace internal , by XXX in \texte)}
\for{i = 1 to \cntrow}{
  \text{H = \texte[\i;]}
  \text{cnt_w=wims(wordcnt \H)}
  \text{j = \i%2}
  \text{rep = \j = \u ? \rep, wims(values \cnt + x for x = 1 to \cnt_w)}
  \integer{cnt = \cnt+\cnt_w}
  \text{TEXTE = \TEXTE, wims( \H)}
}
Ce qui précède remplace les mots du texte par des item, et calcule la position des mots qu'il sera demandé de sélectionner, c'est-à-dire des mots se trouvant entre les points d'interrogation
\text{TEXTE = wims(nonempty items \TEXTE)}
\text{TEXTE1 = wims(replace internal XXX by  in \TEXTE)}
\text{rep = wims(nonempty items \rep)}
\statement{
<div style="background-color:#AAFFFF;
padding:1%;
margin:5% 15%;">
\for{k = 1 to \cnt}{
   \if{XXX isin \TEXTE[\k]}{
       \embed{reply1,\k},
       }{\embed{reply1,\k}
       }
   }
   </div>
}
\answer{}{\rep;\TEXTE1}{type=mark}{option=split}

document d'aide à la création de QCM.
: qcm,modtool,wimshelp, wims, mathematics, mathematical, math, maths, interactive mathematics, interactive math, interactive maths, mathematic, online, calculator, graphing, exercise, exercice, puzzle, calculus, K-12, algebra, mathématique, interactive, interactive mathematics, interactive mathematical, interactive math, interactive maths, mathematical education, enseignement mathématique, mathematics teaching, teaching mathematics, algebra, geometry, calculus, function, curve, surface, graphing, virtual class, virtual classes, virtual classroom, virtual classrooms, interactive documents, interactive document


Cette page n'est pas dans son apparence habituelle parce que WIMS n'a pas pu reconnaître votre navigateur web.
Afin de tester le navigateur que vous utilisez, veuillez taper le mot wims ici : puis appuyez sur ``Entrer''.

Veuillez noter que les pages WIMS sont générées interactivement; elles ne sont pas des fichiers HTML ordinaires. Elles doivent être utilisées interactivement EN LIGNE. Il est inutile pour vous de les ramasser par un programme robot.