!set titb=Texte ŕ choix
!set keyw=
!set datm=20050425
!set prev=
!set next=
!set upbl=choix
!set dat1=19000101
!set dat2=24000101


!if $wims_read_parm!=$empty
 !goto $wims_read_parm
!endif
!exit

:content

!read primitives.phtml 1, embed, definition, &nbsp; 

<pre class="fichier">
<div class="variable">
$m_title{Texte ŕ trous avec choix}
$m_text{cnt_record= $m_wims($m_recordcnt data)}
$m_text{H=$m_randint(\cnt_record)}
$m_text{texte= $m_wims($m_record \H of data)}
<p>
$m_matrix{texte = $m_slib(text/cutchoices \texte)}
$m_text{cntrow = $m_rows(\texte)}
$m_integer{cntQ = \cntrow/2-1}
$m_text{trou = }
$m_text{rep = }
<tt class="comm">\for</tt>{i= 1 <tt class="w">to</tt> \cntQ}{
  $m_text{trou1 = \texte[2*\i;]}
  $m_text{cnt = $m_items(\trou1)}
  $m_text{mix = $m_shuffle(\cnt)}
  $m_matrix{trou = \trou
  \trou1[\mix]} 
  $m_text{rep = \rep,$m_position(1,$m_mix)}
 }
$m_text{rep = $m_wims($m_nonempty <tt class="w">items</tt> \rep)}
$m_text{STEP = $m_wims($m_makelist r x <tt class="w">for</tt> x = 1 <tt class="w">to</tt> \cntQ)}
$m_steps{\STEP}
</div>
<p>
<div class="statement">
$m_statement{ Compléter le texte &#58;  
<p>
&lt;p style="background-color &#58; #AAFFFF;
padding &#58; 1%;
margin &#58; 5% 15%;"> 
<tt class="comm">\for</tt>{k = 1 <tt class="w">to</tt> \cntQ}{
    \texte[2*\k-1;]  <tt class="comm">\embed</tt>{\STEP[\k]}
 }
\texte[2*\cntQ+1;]
&lt;/p>
}
</div>
<div class="variable">
$m_answer{}{\rep[1];\trou[1;]}{<tt class="type">type=menu</tt>}
$m_answer{}{\rep[2];\trou[2;]}{<tt class="type">type=menu</tt>}
$m_answer{}{\rep[3];\trou[3;]}{<tt class="type">type=menu</tt>}
$m_answer{}{\rep[4];\trou[4;]}{<tt class="type">type=menu</tt>}
$m_answer{}{\rep[5];\trou[5;]}{<tt class="type">type=menu</tt>}
$m_answer{}{\rep[6];\trou[6;]}{<tt class="type">type=menu</tt>}
$m_answer{}{\rep[7];\trou[7;]}{<tt class="type">type=menu</tt>}
$m_answer{}{\rep[8];\trou[8;]}{<tt class="type">type=menu</tt>}
$m_answer{}{\rep[9];\trou[9;]}{<tt class="type">type=menu</tt>}
$m_answer{}{\rep[10];\trou[10;]}{<tt class="type">type=menu</tt>}
$m_answer{}{\rep[11];\trou[11;]}{<tt class="type">type=menu</tt>}
$m_answer{}{\rep[12];\trou[12;]}{<tt class="type">type=menu</tt>}
$m_answer{}{\rep[13];\trou[13;]}{<tt class="type">type=menu</tt>}
$m_answer{}{\rep[14];\trou[14;]}{<tt class="type">type=menu</tt>}
$m_answer{}{\rep[15];\trou[15;]}{<tt class="type">type=menu</tt>}
$m_answer{}{\rep[16];\trou[16;]}{<tt class="type">type=menu</tt>}
$m_answer{}{\rep[17];\trou[17;]}{<tt class="type">type=menu</tt>}
$m_answer{}{\rep[18];\trou[18;]}{<tt class="type">type=menu</tt>}
$m_answer{}{\rep[19];\trou[19;]}{<tt class="type">type=menu</tt>}
$m_answer{}{\rep[20];\trou[20;]}{<tt class="type">type=menu</tt>}
</div>
</pre>

