Rev 15463 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
!nocache
!read oef/default
tmp_exo=$exo
exo=!listintersect $exo and $exolist
!if $tmp_exo!=$empty and $exo=$empty and $wims_user=supervisor
error=noexists
!endif
!reset tmp_exo
!default exo=$defaultlist
wims_intro_parm=$exo
!default exo=$exolist
nn=!itemcnt $exo
shlist=
!ifval $random=0
shufflelist=$exo
!else
shuffle=!shuffle $nn
shufflelist=!item $shuffle of $exo
!endif
!if $intro_expert=yes
!distribute items 0,0,0,0 into qcmgood,penalty,givegood,givehint
!bound intro_qcmpresent between 2 and 8 default $(default_choice[4])
qcmpresent=$intro_qcmpresent
!bound intro_sol between -1 and $limit_version default $(default_choice[3])
!bound intro_feed between -2 and $limit_version default $(default_choice[5])
!! for retrocompatibility
presentsol=$intro_presentsol
!if $presentsol!=$empty
givesol=$[$presentsol-1]
!else
givesol=$intro_sol
!endif
givefeed=$intro_feed
!read oef/testseedscore.phtml
!read getparm $module_init_parm intro_check intro_hint intro_good
!if 4 isin $get_introcheck
!set introgivehint=1
!endif
!default introgivehint=$get_intro_hint
!bound introgivehint between -2 and $limit_version default 1
!default oefenv_givegood=$get_intro_good
!default seedrepeat=0
!default seedlastcnt=1
!!calculation done before the line with new.
!if $seedlastcnt>=$seedrepeat
!set seedlastcnt=1
!increase seedcnt
!else
!increase seedlastcnt
!endif
!if $introgivehint=-2
!set scorestat=!getscorestatus sheet=$wims_sheet
!endif
!!givehint is 1 or 0 depending whether hint must be printed or not
!if (4 isitemof $intro_check or $introgivehint=-1 or ($introgivehint=1 and $seedrepeat<=1) or\
($introgivehint>=1 and $seedcnt>=$introgivehint and $seedlastcnt>=$seedrepeat)\
or ($introgivehint=-2 and $scorestat=no))
!set givehint=1
!endif
!bound intro_expow between 1 and 6 default $(list_expow[1])
!bound intro_sepow between 1 and 6 default $(list_sepow[1])
!bound intro_precw between 0 and 1 default $(list_precw[1])
!if $qnum>1
scorepower=$intro_sepow
!else
scorepower=1
!endif
freepower=$intro_expow
precweight=$intro_precw
!!for choice type
!if 1 isitemof $introcheck
qcmgood=1
!endif
!if 2 isitemof $introcheck
penalty=1
!endif
!else
!! non expert parametrage, every thing is deduced from the qcmlevel
!default qcmpresent =!item $qcmlevel of 3,3,4,5,5,6,7,8,8
!default qcmgood =!item $qcmlevel of 1,1,1,1,0,0,0,0,0
!default penalty =!item $qcmlevel of 0,0,0,0,0,1,1,1,1
!default givegood=!item $qcmlevel of 1,1,1,1,1,1,0,0,0
!default givesol=!item $qcmlevel of 1,1,1,0,0,0,0,0,0
!default givefeed=!item $qcmlevel of 1,1,1,1,1,1,1,1,1
!default givehint =!item $qcmlevel of 1,1,1,1,1,0,0,0,0
!default scorepower =!item $qcmlevel of 1,1,1,1.1,1.3,1.5,1.7,2,2.6
!default freepower =!item $qcmlevel of 1,1.5,2,2.5,3,3.5,4,4.5,5
!default precweight =!item $qcmlevel of 0.9,0.8,0.7,0.55,0.4,0.25,0.1,0,0
!default oefenv_givegood=$givegood
!endif
!!qcmpower =!item $qcmlevel of 1,1.1,1.2,1.3,1.5,2,2.5,3,4
!!! where is defined allchoices, except as a default 0 ?
!if $allchoices>0
!default qcmpresent=8
!endif
!distribute item 0,0,0 into reply_cnt,score_should,score_got
!if $oef_test!=yes
!if $nn>4
loglist=$nn
!else
loglist=$shufflelist
!endif
wims_module_log=$cmd: $qnum exos on $loglist level=$qcmlevel
!endif