\embed{definition}{&nbsp;}
Dans le QCM suivant, les questions sont donnes une par une, 
 les rponses aux questions prcdentes s'affichent 
 mais le QCM s'arrte  la premire faute.  \link{fichierqcm2}




<pre class = "cc">
<div class = "variable">
\title{QCM : question une par une}
\text{N = <font color = "green"> 3</font>}
\text{data = <font color = "green">data1</font>}
\integer{cnt_question = \wims(\recordcnt \\data)}
\text{bat = \shuffle(\\cnt_question)}


\matrix{question = }
\matrix{rep = }
\text{CNT_choix = }
\matrix{CHOIX = }
<tt class="comm">\\for</tt>{i = 1 <tt class="w">to</tt> \\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)}
  <tt class="comm">\\for</tt>{ j = 3 <tt class="w">to</tt> \\cnt_choix + 2}{
     \text{choix = \\QUEST[\\j;]}
     \matrix{Choix = \\Choix, \\choix[1;]}
  }
  \text{Choix = \wims(\nonempty <tt class="w">items</tt> \\Choix)}
  \text{Choix = \\Choix[\\mix]}
  \matrix{CHOIX = \\CHOIX
     \\Choix}
  \text{H = \wims(\nospace \\QUEST[2;])}
  \text{pos = }
  <tt class="comm">\\for</tt>{r <tt class="w">in</tt> \\H}{ \text{pos = \\pos,\position(\\r,\\mix)} }
  \text{pos = \wims(\nonempty <tt class="w">items</tt> \\pos)}
  \matrix{rep = \\rep
    \\pos}
}

\text{CNT_choix = \wims(\nonempty <tt class="w">items</tt> \\CNT_choix)}

\text{STEP = \wims(\makelist r x <tt class="w">for</tt> x = 1 <tt class="w">to</tt> \\N)}
\text{STEP = \wims(\replace \internal , \by ; <tt class="w">in</tt> \\STEP)}
\steps{\\STEP}
</div>
</pre>
<div class = "aide">Ici <tt class = "c">STEP</tt> est de la forme
<tt class = "c"><tt class="reply">r1</tt>;<tt class="reply">r2</tt>;<tt class="reply">r3</tt></tt>,  chaque tape, il y a une question 
supplmentaire.
</div>
<pre class = "cc">
<div class = "statement">
\statement{Read the text above
then answer the questions.
 <tt class="comm">\\for</tt>{h = 1 <tt class="w">to</tt> \\step}{
  &lt;p>
  \\question[\\h;]
  <tt class="comm">\\if</tt>{\\h &lt; \\step}{
    &lt;font color = green>\\CHOIX[\\h;\\rep[\\h;]]&lt;/font>
 &lt;/p>}
  {&lt;/p>&lt;ol>
   <tt class="comm">\\for</tt>{s = 1 <tt class="w">to</tt> \\CNT_choix[\\h]}{
   &lt;li><tt class="comm">\\embed</tt>{reply \\h , \\s }&lt;/li>
   }
   &lt;/ol>&lt;/li>
  }
 }
}
</div>
<div class = "variable">
\answer{}{\\REP[1;];\\CHOIX[1;]}{<tt class="type">type=radio</tt>}
\answer{}{\\REP[2;];\\CHOIX[2;]}{<tt class="type">type=radio</tt>}
\answer{}{\\REP[3;];\\CHOIX[3;]}{<tt class="type">type=radio</tt>}
\answer{}{\\REP[4;];\\CHOIX[4;]}{<tt class="type">type=radio</tt>}
\answer{}{\\REP[5;];\\CHOIX[5;]}{<tt class="type">type=radio</tt>}
\answer{}{\\REP[6;];\\CHOIX[6;]}{<tt class="type">type=radio</tt>}
\answer{}{\\REP[7;];\\CHOIX[7;]}{<tt class="type">type=radio</tt>}
\answer{}{\\REP[8;];\\CHOIX[8;]}{<tt class="type">type=radio</tt>}
</div>
</pre>
