Subversion Repositories wimsdev

Rev

Go to most recent revision | Details | 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
13
 error=double_reply
14
 !exit
15
!endif
16
 
17
!if $status=$empty
18
 !read proc/exo.init
19
!endif
20
 
21
!if $status!=waiting
22
 !distribute item $ into solution,hint
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
30
 wims_module_log=$wims_module_log got $thisexo
31
!endif
32
 
33
!if $status!=waiting
34
 !reset asklist promptlist storename storeval
35
 !read $deffile init
36
 !read proc/var.prep
37
!else
38
 !distribute line $storeval into $storename
39
!endif
40
 
41
!read $deffile info
42
 
43
!if $cmd=reply and $status=waiting
44
 !if $ask!=$empty
45
  !read proc/var.proc.ask
46
  !if $badask!=yes
47
   !goto end
48
  !endif
49
 !else
50
  !read proc/var.proc.ans
51
  !if $partial=yes
52
   !goto end
53
  !endif
54
 !endif
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=
67
 !endif
68
!endif
69
 
70
:end
71
prompts=!items $remlist of $promptlist
72
remcnt=!itemcnt $remlist
73
gotcnt=!itemcnt $gotlist
74