!set title=Family with swac
!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
varcnt=110
prevarcnt=109
postvarcnt=0
replycnt=1
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=swac_corresp
!readproc slib/utilities/notepad Notepad,small 
tmp0=$slib_out
val7=$(tmp0)
tmp0=!nosubst Match the words.

val8=$(tmp0)
tmp0=!nosubst 

val9=$(tmp0)
val10=
val11=
val12=no
val13=no
val14=no
val15=no
val16=yes
val17=50x150x200
val18=split
val19=1
val20=aucune de ces possibilités
val21=clickfill
val22=
val23=
val24=
val25=
val26=
val27=background-color: #FFFFCC;
val28=background-color: #FFCC99;
val29=
val30=ol li {list-style: upper-alpha; }
val31=yes
val32=inside
val33=yes
val34=1
val35=
val36=
val37=eng
val38=dewplayer
val39=width="150" height="50"
tmp=!nonempty items $val6

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

val41=$[rint($(tmp0))]
val42=1
val43=1
val44=5

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

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

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

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

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

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

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

val8= $(tmp0)
!endif

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

val9= $(tmp0)
!endif

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

val17= $(tmp0)
!endif

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

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

val49=$(tmp0)

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

val12= $(tmp0)
!endif

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

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

val14= $(tmp0)
!endif

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

val51= 	$(tmp0)
!endif

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

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

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

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

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

val53= $(tmp0)
!else
val53=$val10
!endif
val54=<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
val43=$[rint(min($val41,$val43))]
val42=$[rint(min($val43*$val42,$val41))]

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

val55= $(tmp0) 
!else
tmp1=!makelist x for x = 1 to $val41

val55=	$(tmp1)
!endif
tmp0=!randrecord $val6

val56=$(tmp0)
tmp0=!embraced randitem $val56

val56=$(tmp0)
val57=$val56
tmp=!translate internal $	$ to ; in $val57

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

val58=$(tmp0)
tmp0=!getopt image in $val57

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

val60=$(tmp0)
tmp0=!getopt intro in $val57

val61=$(tmp0)

!ifval $val58$val59$val60$val61  notsametext 
val62=$[rint( 1 )]
!else
val62=$[rint( 0)]
!endif
val63=

!ifval $val60 notsametext 
val63=$val63<p align="center">$val60</p>
!endif

!ifval $val61 notsametext 
val63=$val63 $val61
!endif

!ifval $val59 notsametext 
val63= $val63 <p align="center"><img src=$val1/$val59></p>
!endif
!if $val58 notsametext  

!ifval . isin $val58 or $val37= 
!readproc slib/media/audio $val1/$val58,$val39,player=$val38 
tmp0=$slib_out
val64= 	       $(tmp0)
!else
!readproc slib/lang/swac $val58,$val37,player=$val38,$val39 
tmp1=$slib_out
val64=$(tmp1)
!endif
val63=$val63 <p align="center">$(val64[1;1])</p>
!endif

!ifval $val62=1  
val65= $val63
!else
val65=&nbsp;
!endif
!else
val62=$[rint(2)]
!endif

!ifval $val62=1 or $val62=2 
tmp0=!line 2 to -1 of $val56

tmp=!trim  $(tmp0)
val56=!translate internal $	\
$ to ;; in $tmp
!else
tmp=!trim $val56
val56=!translate internal $	\
$ to ;; in $tmp
!endif
tmp=!translate internal $	$ to ; in $val56

tmp0=!rowcnt $tmp
val66=$[rint($(tmp0))]

!ifval $val44 issametext all 
val44=$[rint( $val66)]
!else
val44=$[rint(min($val66,$val44))]
!endif
tmp0=!shuffle $val66

val53=$(tmp0)
tmp=!trim $(val56[$(val53[1..$val44]);])
val56=!translate internal $	\
$ to ;; in $tmp
val67=
val68=
!for val69  = 1 to $val44 
!if .mp3 isin $(val56[$val69;2]) or .jpg isin $(val56[$val69;2]) or .gif isin $(val56[$val69;2]) or .png isin $(val56[$val69;2]) 
!if .mp3 isin $(val56[$val69;2]) 
tmp0=!nospace $(val56[$val69;2])

val70=$(tmp0)
!readproc slib/media/audio $val1/$(val56[$val69;2]),$val39,player=$val38 
tmp0=$slib_out
val70=$(tmp0)
!endif
!if .jpg isin $(val56[$val69;2]) or .gif isin $(val56[$val69;2]) or .png isin $(val56[$val69;2]) 
tmp0=!nospace $(val56[$val69;1])

val70=$(tmp0)
val70=imgrename($val1/$(val56[$val69;1]) )
!endif
!else
tmp0=!getopt audio in $(val56[$val69;2])

val71=$(tmp0)
!if $val71 notsametext  
!readproc slib/lang/swac $val71,$val37,player=$val38,$val39 
tmp0=$slib_out
val70=$(tmp0)
val70=$(val70[1;1])
!else
val70=$(val56[$val69;2])
!endif
!endif
tmp0=!append item $val70 to $val68

val68=$(tmp0)
!next
!for val69  = 1 to $val44 
!if .mp3 isin $(val56[$val69;1]) or .jpg isin $(val56[$val69;1]) or .gif isin $(val56[$val69;1]) or .png isin $(val56[$val69;1]) 
!if .mp3 isin $(val56[$val69;1]) 
tmp0=!nospace $(val56[$val69;1])

val70=$(tmp0)
!readproc slib/media/audio $val1/$(val56[$val69;1]),$val39,player=$val38 
tmp0=$slib_out
val70=$(tmp0)
!endif
!if .jpg isin $(val56[$val69;1]) or .gif isin $(val56[$val69;1]) or .png isin $(val56[$val69;1]) 
tmp0=!nospace $(val56[$val69;1])

val70=$(tmp0)
val70=imgrename($val1/$(val56[$val69;1]) )
!endif
!else
tmp0=!getopt audio in $(val56[$val69;1])

val71=$(tmp0)
!if $val71 notsametext  
!readproc slib/lang/swac $val71,$val37,player=$val38,$val39 
tmp0=$slib_out
val70=$(tmp0)
val70=$(val70[1;1])
!else
val70=$(val56[$val69;1])
!endif
!endif
tmp0=!append item $val70 to $val67

val67=$(tmp0)
!next
replytype1=correspond
replyoption1=$val18 
replyname1=
replygood1=$val67; $val68
question=__EXECUTED_1692754_EXERCISE__

!goto stat

!exit

:question
$()$val48$val54 $val8 $val65 	   
!if $val49 notsametext  
$() 
!read oef/special.phtml help reading,[à lire] 
$() 
!endif
$()	   
!if $val51 notsametext  
$() 
!read oef/special.phtml help image,[à regarder] 
$() 
!endif
$()	  $val50$val52	  <div class="question"><center> 
!read oef/embed.phtml reply1,$val17 
$()</center></div>	
$()
!exit

:hint
$()
$()
!exit

:help
$()
$()
!exit

:solution
$()
$()
!exit

:latex
$()
$()
!exit

:feedback

!exit

:test

!exit

:stat
vsavelist=8,17,48,49,50,51,52,54,65
embedcnt=3
