%Le source de cet exercice a été créé à l'aide de Quicktool.
%Le type de l'exercice est SELECTWORDA.
% Vous pouvez le modifier si vous désirez l'adapter.

\title{Temps sans marquer les verbes d'abord}
\author{Bernadette Perrin-Riou}
\email{bpr@math.u-psud.fr}
\language{fr}
\computeanswer{no}
\format{html}
\text{file=temps}
\text{file0=randitem(\file)}
\text{instruction=asis(Donner le temps des verbes marqués.)}
\text{instruction2=asis()}
\text{choice=}
\text{audio_file=no}
\text{reading_file=no}
\text{image_file=no}
\text{video_file=}
\text{style_question=background-color: #FFFFCC;	margin: 2% 5%;	padding: 2%;}
\text{style_reponse=background-color: #FFCC99;	color: black;	margin: 2% 5%;	padding: 2%;}
\text{style_oef=}
\text{style_css=ol li {list-style: upper-alpha; }}

\text{alea=yes}
\text{size=8}
\text{partialscore=}
\text{percent=1}
\text{instruction=\instruction issametext ? wims(getdef instruction in \file0)}
\text{instruction2=\instruction2 issametext ? wims(getdef instruction2 in \file0)}
\text{size=\size issametext ? wims(getdef size in \file0)}
\text{reading_file=\reading_file issametext ? wims(getdef reading_file in \file0)}
\text{reading = wims(record 0 of \reading_file)}
\text{aucune=aucune de ces possibilités}
\text{audio_file = \audio_file issametext ? wims(getdef audio_file in \file0)}
\text{audio=\audio_file notsametext  and  \audio_file notsametext no? 
<p align="center">slib(media/audio \imagedir/\audio_file)</p>}

\text{image_file=\image_file issametext ? wims(getdef image_file in \file0)}
\text{image=\image_file notsametext  and  \image_file notsametext no? 
wims(makelist <img src=\imagedir/x> for x in \image_file)}

\text{video_file=\video_file issametext ? wims(getdef video_file in \file0)}
\text{video=\video_file notsametext  and  \video_file notsametext no? 
<a wims_target=external href="\imagedir/\video_file">[video] </a></p>}

peut ne servir à rien : 
\text{choix=\choice issametext ? wims(getdef choice in \file0):\choice}


\text{style = <style type="text/css">
 .question {\style_question}
 .reponse {\style_reponse}
 .oefstatement{\style_oef}
 \style_css
 </style>
 }
\text{format=case}
\text{common=}
\text{pos_rep=outside}
\text{second_step=}
\text{answer_given=}
\text{try=}
\text{try =\try notwordof 1 2 3 4 5 6 7 8 9 10 ? 1}

\integer{cnt_question= wims(recordcnt \file0)}
\text{MAX=1}
\text{N=1}
\text{M=3}
\integer{N = min(\cnt_question,\N)}
\integer{MAX=min(\N*\MAX,\cnt_question)}

\text{battage=\alea issametext yes ? shuffle(\cnt_question) :
wims(makelist x for x = 1 to \cnt_question)}
     \matrix{question=}
\matrix{explication=}
\text{juste=}
\matrix{numero=}
\matrix{analyse=}
\text{cnt=}
\text{texte=}
\for{i= 1 to \N}{
  \text{texte = \texte <p>  wims(record \battage[\i] of \file0)</p>}
}

\text{texte=wims(embraced randitem \texte)}
\matrix{texte=slib(text/markgroup \texte)}
\matrix{numero=\texte[1..-4;]}
\text{traduction=\texte[-2;]}
\matrix{traduction=wims(items2lines \traduction)}
\matrix{traduction=wims(replace internal &#44; by , in \traduction)}
\text{cnt_mot = rows(\numero)}
\text{Numero = wims(rows2lines \numero)}
\text{Numero = wims(lines2items \Numero)}
\text{prem_numero=wims(column 1 of \numero)}
\text{texte = \texte[-3;]}
\text{cnt = items(\texte)}
\text{Texte=wims(items2words \texte)}

    
\text{rep_compose = }
\for{ i = 1 to \cnt_mot}{
 \text{nom_compose= \texte[\numero[\i;]]}
 \text{nom_compose =wims(items2words \nom_compose)}
\text{rep_compose = \rep_compose,\nom_compose}
}
\text{rep_compose= wims(nonempty items \rep_compose)}
\text{STEP = wims(makelist r x for x = 1 to \cnt_mot)}
\text{position=}
\integer{a=0}
\for{t = 1 to \cnt}{
  \if{\t isitemof \prem_numero}{
    \integer{a =\a+1}
    \text{position=\position,\a}
  }{
    \text{position=\position,0}   
  }
 }
\text{position=wims(nonempty items \position)}
\text{STEP1=wims(items2lines \STEP)}
\steps{\STEP1}

%%%%%%%%%%%

\statement{\style <p>\instruction</p>
  \if{\reading notsametext }{\special{help reading,[à lire]}}
  \if{\image notsametext }{\special{help image,[à regarder]}}
  \audio\video
   \if{\pos_rep=outside}{
     <div class="reponse">
     \for{s = 1 to \cnt}{
      \if{\s notitemof \Numero}{\texte[\s]}{
        \if{\s isitemof \prem_numero}{
           \if{\position[\s] = \step}{<font size=+1 color=blue>\rep_compose[\position[\s]]</font>}
           \if{\position[\s] < \step}{<font size=+1 color=green>\rep_compose[\position[\s]]</font>}
           \if{\position[\s] > \step}{\rep_compose[\position[\s]]}
      }
     }
    }
    </div>
     <div class="question">
   \for{s = 1 to \cnt_mot}{
        \if{\s < \step}{<br> \rep_compose[\s] : <font color=green><b>  \traduction[\s;]</b></font>}
        \if{\s = \step}{
         <br> \rep_compose[\s] : \embed{reply \STEP[\s],\size}
      }
   }
  }
 {
    <div class="question">
    \for{s = 1 to \cnt}{
      \if{\s notitemof \Numero or \position[\s] > \step}{\texte[\s]}{
          \if{\s isitemof \Numero}{
           \if{\position[\s] = \step}{
              \embed{\STEP[\position[\s]], \size}
              <font size=-1 color=red>\texte[\s]</font>
            }{
           <font color=green><b> \traduction[\position[\s];]</b></font>}
       }
    }
   }
   </div>
  }
}
\answer{\rep_compose[1]}{\traduction[1;]}{type=\format}{option=nopunct noparenthesis}
\answer{\rep_compose[2]}{\traduction[2;]}{type=\format}{option=nopunct noparenthesis}
\answer{\rep_compose[3]}{\traduction[3;]}{type=\format}{option=nopunct noparenthesis}
\answer{\rep_compose[4]}{\traduction[4;]}{type=\format}{option=nopunct noparenthesis}
\answer{\rep_compose[5]}{\traduction[5;]}{type=\format}{option=nopunct noparenthesis}
\answer{\rep_compose[6]}{\traduction[6;]}{type=\format}{option=nopunct noparenthesis}
\answer{\rep_compose[7]}{\traduction[7;]}{type=\format}{option=nopunct noparenthesis}
\answer{\rep_compose[8]}{\traduction[8;]}{type=\format}{option=nopunct noparenthesis}
\answer{\rep_compose[9]}{\traduction[9;]}{type=\format}{option=nopunct noparenthesis}
\answer{\rep_compose[10]}{\traduction[10;]}{type=\format}{option=nopunct noparenthesis}
\answer{\rep_compose[11]}{\traduction[11;]}{type=\format}{option=nopunct noparenthesis}
\answer{\rep_compose[12]}{\traduction[12;]}{type=\format}{option=nopunct noparenthesis}
\answer{\rep_compose[13]}{\traduction[13;]}{type=\format}{option=nopunct noparenthesis}
\answer{\rep_compose[14]}{\traduction[14;]}{type=\format}{option=nopunct noparenthesis}
\answer{\rep_compose[15]}{\traduction[15;]}{type=\format}{option=nopunct noparenthesis}
\answer{\rep_compose[16]}{\traduction[16;]}{type=\format}{option=nopunct noparenthesis}
\answer{\rep_compose[17]}{\traduction[17;]}{type=\format}{option=nopunct noparenthesis}
\answer{\rep_compose[18]}{\traduction[18;]}{type=\format}{option=nopunct noparenthesis}
\answer{\rep_compose[19]}{\traduction[19;]}{type=\format}{option=nopunct noparenthesis}
\answer{\rep_compose[20]}{\traduction[20;]}{type=\format}{option=nopunct noparenthesis}
\answer{\rep_compose[21]}{\traduction[21;]}{type=\format}{option=nopunct noparenthesis}
\answer{\rep_compose[22]}{\traduction[22;]}{type=\format}{option=nopunct noparenthesis}
\answer{\rep_compose[23]}{\traduction[23;]}{type=\format}{option=nopunct noparenthesis}
\answer{\rep_compose[24]}{\traduction[24;]}{type=\format}{option=nopunct noparenthesis}
\answer{\rep_compose[25]}{\traduction[25;]}{type=\format}{option=nopunct noparenthesis}
\answer{\rep_compose[26]}{\traduction[26;]}{type=\format}{option=nopunct noparenthesis}
\answer{\rep_compose[27]}{\traduction[27;]}{type=\format}{option=nopunct noparenthesis}
\answer{\rep_compose[28]}{\traduction[28;]}{type=\format}{option=nopunct noparenthesis}
\answer{\rep_compose[29]}{\traduction[29;]}{type=\format}{option=nopunct noparenthesis}
\answer{\rep_compose[30]}{\traduction[30;]}{type=\format}{option=nopunct noparenthesis}
\answer{\rep_compose[31]}{\traduction[31;]}{type=\format}{option=nopunct noparenthesis}
\answer{\rep_compose[32]}{\traduction[32;]}{type=\format}{option=nopunct noparenthesis}
\answer{\rep_compose[33]}{\traduction[33;]}{type=\format}{option=nopunct noparenthesis}
\answer{\rep_compose[34]}{\traduction[34;]}{type=\format}{option=nopunct noparenthesis}
\answer{\rep_compose[35]}{\traduction[35;]}{type=\format}{option=nopunct noparenthesis}
\answer{\rep_compose[36]}{\traduction[36;]}{type=\format}{option=nopunct noparenthesis}
\answer{\rep_compose[37]}{\traduction[37;]}{type=\format}{option=nopunct noparenthesis}
\answer{\rep_compose[38]}{\traduction[38;]}{type=\format}{option=nopunct noparenthesis}
\answer{\rep_compose[39]}{\traduction[39;]}{type=\format}{option=nopunct noparenthesis}
\answer{\rep_compose[40]}{\traduction[40;]}{type=\format}{option=nopunct noparenthesis}    
\help{\if{\help_subject issametext reading or
\help_subject issametext image
or  \help_subject issametext }{
\reading 
\image}
}
