Subversion Repositories wimsdev

Rev

Rev 12348 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
20 reyssat 1
!nocache
2
varcnt=$[min($varcnt,$limit_var)]
3
replycnt=$[min($replycnt,$limit_reply)]
4
choicecnt=$[min($choicecnt,$limit_choice)]
5
!reset fill_check fill_checked
6
 
7
!for i=1 to $choicecnt
8
 choice$i=
9
 cbad=!listuniq $(choicebad$i)
10
 cgood=!listuniq $(choicegood$i)
11
 cbad=!listcomplement $cgood in $cbad
12
 choicebad$i=$cbad
13
 itemg=!itemcnt $cgood
14
 itemb=!itemcnt $cbad
15
 !if $itemg<=1 and $qcmgood>0 and $itemb>1
16
  shf=!shuffle $itemb-1
17
  ccbad=!item 2 to -1 of $cbad
18
  tmp=!item 1 of $cbad
19
  ccbad=!item $shf of $ccbad
20
  cbad=$tmp,$ccbad
21
  cli=!item 1 to $qcmpresent of $cgood,$cbad
22
 !else
23
  shf=!shuffle $cgood,$cbad
24
  cli=!item 1 to $qcmpresent of $shf
25
  !if $qcmpresent<=$itemb
26
   qcmgood=0
27
  !endif
28
 !endif
29
 choiceitems$i=!itemcnt $cli
30
 num=yes
31
 !for j=1 to $(choiceitems$i)
32
  t=!item $j of $cli
33
  t=$[$t]
34
  !if NaN isin $t
35
   num=no
36
  !endif
37
 !next j
38
 !if shuffle iswordof $(choiceoption$i)
39
  choicelist$i=!shuffle $cli
40
 !else
41
  !if $num=yes
42
   choicelist$i=!sort numeric list $cli
43
  !else
44
   choicelist$i=!sort nocase list $cli
45
  !endif
46
 !endif
47
 choicegood$i=!listintersect $cgood and $cli
48
!next i
49
 
50
!for i=1 to $replycnt
51
 reply$i=
52
 replygood$i=!trim $(replygood$i)
53
!next i
54
 
55
!read oef/valsave.proc
56
 
57
!if $ansorder=$empty
58
 !for i=1 to $choicecnt
59
  ansorder=!append item c to $ansorder
60
 !next i
61
 !for i=1 to $replycnt
62
  ansorder=!append item r to $ansorder
63
 !next i
64
!endif
65
 
66
!bound precision between integer 20 and 100000000 default 10000
67
!default leftrange=-5
68
!default rightrange=5
69
!default cchoicecnt=$choicecnt
70
!default creplycnt=$replycnt
71
wims_compare_precision=$precision
72
question_url=
73
status=waiting
74
!default conditioncnt=0
75