Subversion Repositories wimsdev

Rev

Rev 546 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
23 reyssat 1
 
2
!default precision=10000
3
wims_prefix=class user tmp
4
 
5
!read Exindex
6
exocnt=!itemcnt $exolist
7
!bound qnum between integer 1 and $exocnt default 1
8
!bound qcmlevel between integer 1 and 8 default 3
9
!bound random within 0,1 default 1
10
wims_form_method=post
11
 
12
!if $cmd=reply and $status!=waiting
15353 bpr 13
  error=double_reply
14
  !exit
23 reyssat 15
!endif
16
 
17
!if $status=$empty
15353 bpr 18
  !read dialog/exo.init
23 reyssat 19
!endif
20
 
21
!if $status!=waiting
15353 bpr 22
  !distribute item $ into solution,hint
23 reyssat 23
!endif
24
 
25
nn=!itemcnt $shufflelist
26
thisexo=!item ($reply_cnt)%$nn+1 of $shufflelist
27
imagedir=$module_dir/images/$thisexo
28
deffile=def/$thisexo.def
29
!if $nn>1 and $status!=waiting
15353 bpr 30
  wims_module_log=$wims_module_log got $thisexo
23 reyssat 31
!endif
32
 
33
!if $status!=waiting
15353 bpr 34
  !reset asklist promptlist storename storeval
35
  !read $deffile init
36
  !read dialog/var.prep
23 reyssat 37
!else
15353 bpr 38
  !distribute line $storeval into $storename
23 reyssat 39
!endif
40
 
41
!read $deffile info
42
 
43
!if $cmd=reply and $status=waiting
15353 bpr 44
  !if $ask!=$empty
45
    !read dialog/var.proc.ask
46
    !if $badask!=yes
47
      !goto end
48
    !endif
49
  !else
50
    !read dialog/var.proc.ans
51
    !if $partial=yes
52
      !goto end
53
    !endif
23 reyssat 54
  !endif
15353 bpr 55
  !advance reply_cnt
56
  !advance score_should
57
  score_got=$[$score_got+$thisscore]
58
  status=done
59
  !if $reply_cnt>=$qnum
60
    !ifval $score_should=0
61
      score_should=1
62
    !endif
63
    score=$[max(0,min(10,rint(100*$score_got/$score_should)/10))]
64
    module_score=$score
65
    wims_module_log=score $module_score/10
66
    status=
23 reyssat 67
  !endif
68
!endif
69
 
70
:end
71
prompts=!items $remlist of $promptlist
72
remcnt=!itemcnt $remlist
73
gotcnt=!itemcnt $gotlist