!set titb=Source OEF 2
!set keyw=
!set datm=20050425
!set prev=
!set next=
!set upbl=trou
!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 (dictée)}
<p>
$m_text{data = <font color="green">data</font>}
$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)}
$m_text{bande = $m_wims($m_word 1 of \texte)}
$m_text{texte = $m_wims($m_replace $m_internal \bande $m_by in \texte)}
$m_text{test = $m_wims($m_nospace \texte)}
$m_text{first = $m_wims($m_replace $m_internal ? $m_by | in $m_wims($m_char 1 of \test))}
$m_text{u = \first issametext | ? 1 &#58; 0}
$m_text{u1 = \u = 0 ? -1&#58;1} 
<p>
$m_matrix{texte = $m_slib(text/cutchoices \texte)}
$m_text{cntrow = $m_rows(\texte)}
$m_integer{cntQ = (\cntrow+\u1*\cntrow%2)/2}
$m_text{trou = }
<tt class="comm">\for</tt>{i = 1 to \cntQ}{
  $m_text{trou1 = \texte[2*\i-\u;]}
  $m_text{trou = \trou, \trou1} 
 }
$m_text{trou = $m_wims($m_nonempty <tt class="w">items</tt> \trou)}
<p>
$m_text{audio = $m_slib(media/audio \bande)}
$m_text{STEP = $m_wims($m_makelist r x for x = 1 to \cntQ)}
<p>
$m_steps{\STEP}
</div>
<div class="statement">
$m_statement{ Ecouter \audio et 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 to \cntQ}{
    \texte[2*\k-1 -\u;]  <tt class="comm">\embed</tt>{\STEP[\k], 10}
 }
\texte[2*\cntQ+1-\u;]
&lt;/p>
}
</div>
<div class="variable">
$m_answer{}{\trou[1]}{<tt class="type">type=case</tt>}
$m_answer{}{\trou[2]}{<tt class="type">type=case</tt>}
$m_answer{}{\trou[3]}{<tt class="type">type=case</tt>}
$m_answer{}{\trou[4]}{<tt class="type">type=case</tt>}
$m_answer{}{\trou[5]}{<tt class="type">type=case</tt>}
$m_answer{}{\trou[6]}{<tt class="type">type=case</tt>}
$m_answer{}{\trou[7]}{<tt class="type">type=case</tt>}
$m_answer{}{\trou[8]}{<tt class="type">type=case</tt>}
$m_answer{}{\trou[9]}{<tt class="type">type=case</tt>}
$m_answer{}{\trou[10]}{<tt class="type">type=case</tt>}
$m_answer{}{\trou[11]}{<tt class="type">type=case</tt>}
$m_answer{}{\trou[12]}{<tt class="type">type=case</tt>}
$m_answer{}{\trou[13]}{<tt class="type">type=case</tt>}
$m_answer{}{\trou[14]}{<tt class="type">type=case</tt>}
$m_answer{}{\trou[15]}{<tt class="type">type=case</tt>}
$m_answer{}{\trou[16]}{<tt class="type">type=case</tt>}
$m_answer{}{\trou[17]}{<tt class="type">type=case</tt>}
$m_answer{}{\trou[18]}{<tt class="type">type=case</tt>}
$m_answer{}{\trou[19]}{<tt class="type">type=case</tt>}
$m_answer{}{\trou[20]}{<tt class="type">type=case</tt>}
</div>
</pre>

