Rev 546 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 546 | Rev 15353 | ||
---|---|---|---|
Line 8... | Line 8... | ||
8 | !bound qcmlevel between integer 1 and 8 default 3 |
8 | !bound qcmlevel between integer 1 and 8 default 3 |
9 | !bound random within 0,1 default 1 |
9 | !bound random within 0,1 default 1 |
10 | wims_form_method=post |
10 | wims_form_method=post |
11 | 11 | ||
12 | !if $cmd=reply and $status!=waiting |
12 | !if $cmd=reply and $status!=waiting |
13 | error=double_reply |
13 | error=double_reply |
14 | !exit |
14 | !exit |
15 | !endif |
15 | !endif |
16 | 16 | ||
17 | !if $status=$empty |
17 | !if $status=$empty |
18 | !read dialog/exo.init |
18 | !read dialog/exo.init |
19 | !endif |
19 | !endif |
20 | 20 | ||
21 | !if $status!=waiting |
21 | !if $status!=waiting |
22 | !distribute item $ into solution,hint |
22 | !distribute item $ into solution,hint |
23 | !endif |
23 | !endif |
24 | 24 | ||
25 | nn=!itemcnt $shufflelist |
25 | nn=!itemcnt $shufflelist |
26 | thisexo=!item ($reply_cnt)%$nn+1 of $shufflelist |
26 | thisexo=!item ($reply_cnt)%$nn+1 of $shufflelist |
27 | imagedir=$module_dir/images/$thisexo |
27 | imagedir=$module_dir/images/$thisexo |
28 | deffile=def/$thisexo.def |
28 | deffile=def/$thisexo.def |
29 | !if $nn>1 and $status!=waiting |
29 | !if $nn>1 and $status!=waiting |
30 | wims_module_log=$wims_module_log got $thisexo |
30 | wims_module_log=$wims_module_log got $thisexo |
31 | !endif |
31 | !endif |
32 | 32 | ||
33 | !if $status!=waiting |
33 | !if $status!=waiting |
34 | !reset asklist promptlist storename storeval |
34 | !reset asklist promptlist storename storeval |
35 | !read $deffile init |
35 | !read $deffile init |
36 | !read dialog/var.prep |
36 | !read dialog/var.prep |
37 | !else |
37 | !else |
38 | !distribute line $storeval into $storename |
38 | !distribute line $storeval into $storename |
39 | !endif |
39 | !endif |
40 | 40 | ||
41 | !read $deffile info |
41 | !read $deffile info |
42 | 42 | ||
43 | !if $cmd=reply and $status=waiting |
43 | !if $cmd=reply and $status=waiting |
44 | !if $ask!=$empty |
44 | !if $ask!=$empty |
45 | !read dialog/var.proc.ask |
45 | !read dialog/var.proc.ask |
46 | !if $badask!=yes |
46 | !if $badask!=yes |
- | 47 | !goto end |
|
- | 48 | !endif |
|
- | 49 | !else |
|
- | 50 | !read dialog/var.proc.ans |
|
- | 51 | !if $partial=yes |
|
47 | !goto end |
52 | !goto end |
- | 53 | !endif |
|
48 | !endif |
54 | !endif |
- | 55 | !advance reply_cnt |
|
- | 56 | !advance score_should |
|
- | 57 | score_got=$[$score_got+$thisscore] |
|
49 |
|
58 | status=done |
- | 59 | !if $reply_cnt>=$qnum |
|
50 |
|
60 | !ifval $score_should=0 |
51 |
|
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 |
|
52 |
|
66 | status= |
53 | !endif |
67 | !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 |
68 | !endif |
69 | 69 | ||
70 | :end |
70 | :end |
71 | prompts=!items $remlist of $promptlist |
71 | prompts=!items $remlist of $promptlist |
72 | remcnt=!itemcnt $remlist |
72 | remcnt=!itemcnt $remlist |
73 | gotcnt=!itemcnt $gotlist |
73 | gotcnt=!itemcnt $gotlist |
74 | - |