!set title=Question word order compose
!if $wims_read_parm!=$empty
 !goto $wims_read_parm
!endif
oef2wims_version=3.22
author=Csilla Ducrocq
email=csilla.ducrocq@u-psud.fr
language=fr
computeanswer=no

ansorder=r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r
varcnt=94
prevarcnt=93
postvarcnt=0
replycnt=29
choicecnt=0
conditioncnt=0
feedbackcnt=0
format=html

val1=$imagedir
val2=$confparm1
val3=$confparm2
val4=$confparm3
val5=$confparm4

!if $testcondition=yes
 !goto test
!endif
!if $status=waiting
 !exit
!endif

val6=question_word_order_compose
!readproc slib/utilities/notepad Notepad,small 
tmp0=$slib_out
val7=$(tmp0)
tmp0=!nosubst Put the words in the correct order to form questions.

val8=$(tmp0)
tmp0=!nosubst 

val9=$(tmp0)
val10=
val11=
val12=no
val13=no
val14=no
val15=no
val16=yes
val17=10
val18=split
val19=1
val20=aucune de ces possibilités
val21=clickfill
val22=
val23=
val24=
val25=
val26=
val27=background-color: #99FFFF; margin: 2% 5%; padding: 2%;
val28=background-color: #FFCC99; color: black; margin: 2% 5%; padding: 2%;
val29=
val30=ol li {list-style: upper-alpha; }
val31=yes
val32=inside
val33=yes
val34=1
val35=
val36=
val37=
val38=---
tmp=!nonempty items $val6

tmp0=!randitem $tmp
val39=$(tmp0)
tmp0=!recordcnt $val39

val40=$[rint($(tmp0))]
val41=1
val42=1
val43=4

!ifval $val21 iswordof case 
val44= autocomplete=off
!endif
tmp0=!replace internal - by in $val38

val38=$(tmp0)
val45=$val22,$val23,$val24

!ifval $val25 = 
val25=++>
!endif

!ifval $val34 notwordof 0 
val34=$[rint( 1)]
!endif

!ifval $val26!=yes 
val46= noreaccent
!else
val46=
!endif

!ifval $val31 issametext no 
!readproc slib/utilities/nopaste  
tmp0=$slib_out
val47= $(tmp0)
!endif

!ifval $val8 issametext 
tmp0=!getdef instruction in $val39

val8= $(tmp0)
!endif

!ifval $val9 issametext 
tmp0=!getdef instruction2 in $val39

val9= $(tmp0)
!endif

!ifval $val17 issametext 
tmp0=!getdef size in $val39

val17= $(tmp0)
!endif

!ifval $val13 issametext 
tmp0=!getdef reading_file in $val39

val13= $(tmp0)
!endif
tmp0=!record 0 of $val13

val48=$(tmp0)

!ifval $val12 issametext 
tmp0=!getdef audio_file in $val39

val12= $(tmp0)
!endif

!ifval $val12 notsametext  and  $val12 notsametext no
!readproc slib/media/audio $val1/$val12,player=$val38 
tmp0=$slib_out
val49= 	<p align="center">$(tmp0)</p>
!endif

!ifval $val14 issametext 
tmp0=!getdef image_file in $val39

val14= $(tmp0)
!endif

!ifval $val14 notsametext  and  $val14 notsametext no
tmp0=!makelist <img src=$val1/x> for x in $val14

val50= 	$(tmp0)
!endif

!ifval $val15 issametext 
tmp0=!getdef video_file in $val39

val15= $(tmp0)
!endif
!if $val15 notsametext  and  $val15 notsametext no 

!ifval http notin $val15 
val15= $val1/$val15
!endif

!ifval $val15 notsametext 
val51= <a wims_target=external href="$val15">[video] </a></p>
!endif
!endif

!ifval $val10 issametext 
tmp0=!getdef choice in $val39

val52= $(tmp0)
!else
val52=$val10
!endif
val53=<style type="text/css">	 .question {$val27}	 .reponse {$val28}	 .oefstatement{$val29}	 $val30	 </style>	 

!ifval $val36 notwordof 1 2 3 4 5 6 7 8 9 10 
val36= 1
!endif

!ifval $val21 iswordof dragfill clickfill 
val17= $val17 x 1
!endif
val42=$[rint(min($val40,$val42))]
val41=$[rint(min($val42*$val41,$val40))]

!ifval $val16 issametext yes 
tmp0=!shuffle $val40

val54= $(tmp0) 
!else
tmp1=!makelist x for x = 1 to $val40

val54=	$(tmp1)
!endif
tmp=!trim 
val55=!translate internal $	\
$ to ;; in $tmp
tmp=!trim 
val56=!translate internal $	\
$ to ;; in $tmp
!for val57 =1 to $val41 
tmp=!nonempty items $val6

tmp0=!randitem $tmp
tmp1=!randrecord $(tmp0)

val58=$(tmp1)
tmp0=!embraced randitem $val58

val58=$(tmp0)
val59=$val58
tmp=!translate internal $	$ to ; in $val58

tmp=!row 1 of $tmp
tmp0=!translate internal $\
$ to ; in $tmp
val59=$(tmp0)
tmp0=!getopt audio in $val59

val60=$(tmp0)
tmp0=!getopt image in $val59

val61=$(tmp0)
tmp0=!getopt title in $val59

val62=$(tmp0)
tmp0=!getopt intro in $val59

val63=$(tmp0)

!ifval $val60$val61$val62$val63  notsametext 
val64= 1 
!else
val64= 0
!endif
val65=

!ifval $val62 notsametext 
val65=$val65<p align="center">$val62</p>
!endif

!ifval $val63 notsametext 
val65=$val65 $val63
!endif

!ifval $val61 notsametext 
val65= $val65 <p align="center"><img src=$val1/$val61></p>
!endif

!ifval $val60 notsametext 
!readproc slib/media/audio $val1/$val60,player=$val38 
tmp0=$slib_out
val65= $val65<p align="center">$(tmp0)</p>
!endif

!ifval $val64=1  
val66= $val65
!else
val66=
!endif

!ifval $val64=1 
tmp0=!line 2 of $val58

val58= $(tmp0)
!endif
tmp0=!replace internal / by , in  $val58

val58=$(tmp0)
tmp=!trim $val55	 $val58
val55=!translate internal $	\
$ to ;; in $tmp
tmp=!trim $val56	 $val66
val56=!translate internal $	\
$ to ;; in $tmp
!next
tmp0=!makelist r x for x = 1 to $val41

val67=$(tmp0)
t_=!replace internal \( by ( in divrem($val41,$val42)~
tmp0=!exec pari $t_

val68=$(tmp0)
val69=$[rint($(val68[1]) + 1)]
tmp=!trim 
val70=!translate internal $	\
$ to ;; in $tmp
!for val71  = 1 to $val69 -1 
tmp0=!makelist r x for x = ($val71 -1)*$val42 +1 to $val42*$val71

tmp=!trim $val70	$(tmp0)
val70=!translate internal $	\
$ to ;; in $tmp
!next
tmp0=!makelist r x  for x = $val42*($val69-1)+1 to $val41

tmp=!trim $val70	 $(tmp0)
val70=!translate internal $	\
$ to ;; in $tmp
oefsteps=$val70 
nextstep=!nosubst $val70 
!readproc oef/steps.proc
replytype1=compose
replyname1=
replygood1=$(val55[1;])
replytype2=compose
replyname2=
replygood2=$(val55[2;])
replytype3=compose
replyname3=
replygood3=$(val55[3;])
replytype4=compose
replyname4=
replygood4=$(val55[4;])
replytype5=compose
replyname5=
replygood5=$(val55[5;])
replytype6=compose
replyname6=
replygood6=$(val55[6;])
replytype7=compose
replyname7=
replygood7=$(val55[7;])
replytype8=compose
replyname8=
replygood8=$(val55[8;])
replytype9=compose
replyname9=
replygood9=$(val55[9;])
replytype10=compose
replyname10=
replygood10=$(val55[10;])
replytype11=compose
replyname11=
replygood11=$(val55[11;])
replytype12=compose
replyname12=
replygood12=$(val55[12;])
replytype13=compose
replyname13=
replygood13=$(val55[13;])
replytype14=compose
replyname14=
replygood14=$(val55[14;])
replytype15=compose
replyname15=
replygood15=$(val55[15;])
replytype16=compose
replyname16=
replygood16=$(val55[16;])
replytype17=compose
replyname17=
replygood17=$(val55[17;])
replytype18=compose
replyname18=
replygood18=$(val55[18;])
replytype19=compose
replyname19=
replygood19=$(val55[19;])
replytype20=compose
replyname20=
replygood20=$(val55[20;])
replytype21=compose
replyname21=
replygood21=$(val55[21;])
replytype22=compose
replyname22=
replygood22=$(val55[22;])
replytype23=compose
replyname23=
replygood23=$(val55[23;])
replytype24=compose
replyname24=
replygood24=$(val55[24;])
replytype25=compose
replyname25=
replygood25=$(val55[25;])
replytype26=compose
replyname26=
replygood26=$(val55[26;])
replytype27=compose
replyname27=
replygood27=$(val55[27;])
replytype28=compose
replyname28=
replygood28=$(val55[28;])
replytype29=compose
replyname29=
replygood29=$(val55[29;])
question=__EXECUTED_1692754_EXERCISE__

!goto stat

!exit

:question
$()$val47$val53 $val8  	   
!if $val48 notsametext  
$() 
!read oef/special.phtml help reading,[à lire] 
$() 
!endif
$()	   
!if $val50 notsametext  
$() 
!read oef/special.phtml help image,[à regarder] 
$() 
!endif
$()	  $val49$val51	   
!for m_h = 1 to  $val42 
$()	   
!if $(val56[$m_h;]) notsametext 
$()<div class="reponse">$(val56[$m_h;])</div> 
!endif
$()	  	  <div class="question">  
!read oef/embed.phtml reply $(val70[$m_step; $m_h]),$val17 
$() </div>		   
!next
$()	
$()
!exit

:hint
$()
$()
!exit

:help
$()
$()
!exit

:solution
$()
$()
!exit

:latex
$()
$()
!exit

:feedback

!exit

:test

!exit

:stat
vsavelist=8,17,42,47,48,49,50,51,53,56,70
embedcnt=3
