Subversion Repositories wimsdev

Rev

Rev 16736 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
20 reyssat 1
!nocache
9177 bpr 2
!read oef/default
15463 bpr 3
tmp_exo=$exo
20 reyssat 4
exo=!listintersect $exo and $exolist
15463 bpr 5
!if $tmp_exo!=$empty and $exo=$empty and $wims_user=supervisor
6
  error=noexists
7
!endif
8
!reset tmp_exo
20 reyssat 9
!default exo=$defaultlist
10
wims_intro_parm=$exo
11
!default exo=$exolist
12
nn=!itemcnt $exo
13
shlist=
14
!ifval $random=0
10897 obado 15
  shufflelist=$exo
20 reyssat 16
!else
10897 obado 17
  shuffle=!shuffle $nn
18
  shufflelist=!item $shuffle of $exo
20 reyssat 19
!endif
17766 bpr 20
!read getparm $special_parm3 confparm1 confparm2 confparm3 confparm4 confparm5 confparm6
21
!for cf=1 to 6
22
  !default confparm$cf=$(get_confparm$cf)
23
!next
20 reyssat 24
!if $intro_expert=yes
12460 bpr 25
  !distribute items 0,0,0,0 into qcmgood,penalty,givegood,givehint
10897 obado 26
  !bound intro_qcmpresent between 2 and 8 default $(default_choice[4])
27
  qcmpresent=$intro_qcmpresent
16736 bpr 28
  !bound intro_sol between -1 and $limit_version default $(default_choice[3])
29
  !bound intro_feed between -2 and $limit_version default $(default_choice[5])
12459 bpr 30
  !! for retrocompatibility
10897 obado 31
  presentsol=$intro_presentsol
12459 bpr 32
  !if $presentsol!=$empty
12460 bpr 33
    givesol=$[$presentsol-1]
12459 bpr 34
  !else
12460 bpr 35
    givesol=$intro_sol
12459 bpr 36
  !endif
12460 bpr 37
  givefeed=$intro_feed
12350 bpr 38
  !read oef/testseedscore.phtml
14581 bpr 39
  !read getparm $module_init_parm intro_check intro_hint intro_good
12459 bpr 40
  !if 4 isin $get_introcheck
12460 bpr 41
    !set introgivehint=1
12459 bpr 42
  !endif
12460 bpr 43
  !default introgivehint=$get_intro_hint
16736 bpr 44
  !bound introgivehint between -2 and $limit_version default 1
14581 bpr 45
  !default oefenv_givegood=$get_intro_good
12990 bpr 46
  !default seedrepeat=0
13086 bpr 47
  !default seedlastcnt=1
12423 bpr 48
  !!calculation done before the line with new.
49
  !if $seedlastcnt>=$seedrepeat
13086 bpr 50
    !set seedlastcnt=1
12423 bpr 51
    !increase seedcnt
13028 bpr 52
  !else
53
    !increase seedlastcnt
12423 bpr 54
  !endif
16736 bpr 55
  !if $introgivehint=-2
56
    !set scorestat=!getscorestatus sheet=$wims_sheet
57
  !endif
14564 bpr 58
  !!givehint is 1 or 0 depending whether hint must be printed or not
59
  !if (4 isitemof $intro_check or $introgivehint=-1 or ($introgivehint=1 and $seedrepeat<=1) or\
16736 bpr 60
      ($introgivehint>=1 and $seedcnt>=$introgivehint and $seedlastcnt>=$seedrepeat)\
61
      or ($introgivehint=-2 and $scorestat=no))
12350 bpr 62
    !set givehint=1
10897 obado 63
  !endif
64
  !bound intro_expow between 1 and 6 default $(list_expow[1])
65
  !bound intro_sepow between 1 and 6 default $(list_sepow[1])
66
  !bound intro_precw between 0 and 1 default $(list_precw[1])
67
  !if $qnum>1
68
    scorepower=$intro_sepow
69
  !else
70
    scorepower=1
71
  !endif
72
  freepower=$intro_expow
73
  precweight=$intro_precw
12350 bpr 74
 !!for choice type
75
  !if 1 isitemof $introcheck
10897 obado 76
    qcmgood=1
77
  !endif
12350 bpr 78
  !if 2 isitemof $introcheck
10897 obado 79
    penalty=1
80
  !endif
20 reyssat 81
!else
12459 bpr 82
  !! non expert parametrage, every thing is deduced from the qcmlevel
12672 bpr 83
  !default qcmpresent =!item $qcmlevel of 3,3,4,5,5,6,7,8,8
9099 bpr 84
  !default qcmgood    =!item $qcmlevel of 1,1,1,1,0,0,0,0,0
85
  !default penalty    =!item $qcmlevel of 0,0,0,0,0,1,1,1,1
12460 bpr 86
  !default givegood=!item $qcmlevel of 1,1,1,1,1,1,0,0,0
87
  !default givesol=!item $qcmlevel of 1,1,1,0,0,0,0,0,0
88
  !default givefeed=!item $qcmlevel of 1,1,1,1,1,1,1,1,1
9099 bpr 89
  !default givehint   =!item $qcmlevel of 1,1,1,1,1,0,0,0,0
90
  !default scorepower =!item $qcmlevel of 1,1,1,1.1,1.3,1.5,1.7,2,2.6
91
  !default freepower  =!item $qcmlevel of 1,1.5,2,2.5,3,3.5,4,4.5,5
92
  !default precweight =!item $qcmlevel of 0.9,0.8,0.7,0.55,0.4,0.25,0.1,0,0
14581 bpr 93
  !default oefenv_givegood=$givegood
20 reyssat 94
!endif
95
 
9099 bpr 96
!!qcmpower   =!item $qcmlevel of 1,1.1,1.2,1.3,1.5,2,2.5,3,4
20 reyssat 97
 
9099 bpr 98
!!! where is defined allchoices, except as a default 0 ?
20 reyssat 99
!if $allchoices>0
10897 obado 100
  !default qcmpresent=8
20 reyssat 101
!endif
102
 
103
!distribute item 0,0,0 into reply_cnt,score_should,score_got
104
!if $oef_test!=yes
10897 obado 105
  !if $nn>4
106
    loglist=$nn
107
  !else
108
    loglist=$shufflelist
109
  !endif
110
  wims_module_log=$cmd: $qnum exos on $loglist level=$qcmlevel
20 reyssat 111
!endif