Subversion Repositories wimsdev

Rev

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