Subversion Repositories wimsdev

Rev

Rev 14581 | 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
20
!if $intro_expert=yes
12460 bpr 21
  !distribute items 0,0,0,0 into qcmgood,penalty,givegood,givehint
10897 obado 22
  !bound intro_qcmpresent between 2 and 8 default $(default_choice[4])
23
  qcmpresent=$intro_qcmpresent
12460 bpr 24
  !bound intro_sol between 0 and $limit_version default $(default_choice[3])
14564 bpr 25
  !bound intro_feed between -1 and $limit_version default $(default_choice[5])
12459 bpr 26
  !! for retrocompatibility
10897 obado 27
  presentsol=$intro_presentsol
12459 bpr 28
  !if $presentsol!=$empty
12460 bpr 29
    givesol=$[$presentsol-1]
12459 bpr 30
  !else
12460 bpr 31
    givesol=$intro_sol
12459 bpr 32
  !endif
12460 bpr 33
  givefeed=$intro_feed
12350 bpr 34
  !read oef/testseedscore.phtml
14581 bpr 35
  !read getparm $module_init_parm intro_check intro_hint intro_good
12459 bpr 36
  !if 4 isin $get_introcheck
12460 bpr 37
    !set introgivehint=1
12459 bpr 38
  !endif
12460 bpr 39
  !default introgivehint=$get_intro_hint
14564 bpr 40
  !bound introgivehint between -1 and $limit_version default 1
14581 bpr 41
  !default oefenv_givegood=$get_intro_good
12990 bpr 42
  !default seedrepeat=0
13086 bpr 43
  !default seedlastcnt=1
12423 bpr 44
  !!calculation done before the line with new.
45
  !if $seedlastcnt>=$seedrepeat
13086 bpr 46
    !set seedlastcnt=1
12423 bpr 47
    !increase seedcnt
13028 bpr 48
  !else
49
    !increase seedlastcnt
12423 bpr 50
  !endif
14564 bpr 51
  !!givehint is 1 or 0 depending whether hint must be printed or not
52
  !if (4 isitemof $intro_check or $introgivehint=-1 or ($introgivehint=1 and $seedrepeat<=1) or\
13086 bpr 53
      ($introgivehint>=1 and $seedcnt>=$introgivehint and $seedlastcnt>=$seedrepeat))
12350 bpr 54
    !set givehint=1
10897 obado 55
  !endif
56
  !bound intro_expow between 1 and 6 default $(list_expow[1])
57
  !bound intro_sepow between 1 and 6 default $(list_sepow[1])
58
  !bound intro_precw between 0 and 1 default $(list_precw[1])
59
  !if $qnum>1
60
    scorepower=$intro_sepow
61
  !else
62
    scorepower=1
63
  !endif
64
  freepower=$intro_expow
65
  precweight=$intro_precw
12350 bpr 66
 !!for choice type
67
  !if 1 isitemof $introcheck
10897 obado 68
    qcmgood=1
69
  !endif
12350 bpr 70
  !if 2 isitemof $introcheck
10897 obado 71
    penalty=1
72
  !endif
20 reyssat 73
!else
12459 bpr 74
  !! non expert parametrage, every thing is deduced from the qcmlevel
12672 bpr 75
  !default qcmpresent =!item $qcmlevel of 3,3,4,5,5,6,7,8,8
9099 bpr 76
  !default qcmgood    =!item $qcmlevel of 1,1,1,1,0,0,0,0,0
77
  !default penalty    =!item $qcmlevel of 0,0,0,0,0,1,1,1,1
12460 bpr 78
  !default givegood=!item $qcmlevel of 1,1,1,1,1,1,0,0,0
79
  !default givesol=!item $qcmlevel of 1,1,1,0,0,0,0,0,0
80
  !default givefeed=!item $qcmlevel of 1,1,1,1,1,1,1,1,1
9099 bpr 81
  !default givehint   =!item $qcmlevel of 1,1,1,1,1,0,0,0,0
82
  !default scorepower =!item $qcmlevel of 1,1,1,1.1,1.3,1.5,1.7,2,2.6
83
  !default freepower  =!item $qcmlevel of 1,1.5,2,2.5,3,3.5,4,4.5,5
84
  !default precweight =!item $qcmlevel of 0.9,0.8,0.7,0.55,0.4,0.25,0.1,0,0
14581 bpr 85
  !default oefenv_givegood=$givegood
20 reyssat 86
!endif
87
 
9099 bpr 88
!!qcmpower   =!item $qcmlevel of 1,1.1,1.2,1.3,1.5,2,2.5,3,4
20 reyssat 89
 
9099 bpr 90
!!! where is defined allchoices, except as a default 0 ?
20 reyssat 91
!if $allchoices>0
10897 obado 92
  !default qcmpresent=8
20 reyssat 93
!endif
94
 
95
!distribute item 0,0,0 into reply_cnt,score_should,score_got
96
!if $oef_test!=yes
10897 obado 97
  !if $nn>4
98
    loglist=$nn
99
  !else
100
    loglist=$shufflelist
101
  !endif
102
  wims_module_log=$cmd: $qnum exos on $loglist level=$qcmlevel
20 reyssat 103
!endif