Subversion Repositories wimsdev

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
10 reyssat 1
!nocache
2
stepdiag=bad
3
!for i=1 to $replycnt
4
 !if r$i isitemof $gotsteps
5
  !if r$i isitemof $thisstep
6
   saverep$i=$(reply$i)
7
  !else
8
   reply$i=$(saverep$i)
9
  !endif
10
  r_=!trim $(reply$i)
11
  !if $(replytype$i)!=code
12
   reply$i=$r_
13
  !endif
14
  !if $r_=$empty and $(replytype$i)!=coord || \
15
    $click_x$click_y=$empty and $(replytype$i)=coord || \
16
    ($(reply$i)=?????? and $(replytype$i) iswordof menu)
17
   error=empty_data
18
   !exit
19
  !endif
20
  m_reply$i=$(reply$i)
21
  !default replytype$i=default
22
  tt=!word 1 of $(replygood$i)
23
  	# analyzed reply
24
  !if $tt=?analyze
25
   t_=!rows2lines $(replygood$i)
26
   t_=!word 2 of $t_
27
   !read oef/ans.proc $i nocompare
28
   !if $error!=$empty
29
    !exit
30
   !endif
31
   !default m_reply$i=$(reply$i)
32
   val$t_=$(reply$i)
33
   !if NaN isin $test
34
    !goto badans
35
   !endif
36
   !goto cont
37
  !endif
38
  !read oef/ans.proc $i
39
  !default m_reply$i=$(reply$i)
40
  !if bad isin $Test
41
   error=bad_exo
42
   !advance reply_cnt
43
   status=
44
   !exit
45
  !endif
46
  !if NaN isin $test
47
   :badans
48
   error=bad_answer
49
   bad_name=$(replyname$i)
50
   bad_value=$(reply$i)
51
   !exit
52
  !endif
53
  !if $(diareply$i)!=good
54
   !exit
55
  !endif
56
  :cont
57
 !endif
58
!next i
59
 
60
!for i=1 to $choicecnt
61
 !if c$i isitemof $gotsteps
62
  !if c$i isitemof $thisstep
63
   savech$i=$(choice$i)
64
  !else
65
   choice$i=$(savech$i)
66
  !endif
67
  !default choice$i=0
68
  choic=$[rint($(choice$i))]
69
  !if $choic=0 and ($oefsteps=$empty or c$i isitemof $gotsteps)
70
   error=empty_data
71
   !exit
72
  !endif
73
  !if NaN isin $choic or $choic<1 or $choic>$(choiceitems$i)+2
74
   error=bad_answer
75
   bad_name=$(choicename$i)
76
   bad_value=$(choice$i)
77
   !exit
78
  !else
79
   choice$i=$choic
80
  !endif
81
  ch=!item $choic of $(choicelist$i)
82
  m_choice$i=$ch
83
  !if $qcmgood<1 and $choic=$[$(choiceitems$i)+2]
84
   !if $(choicegood$i)=$empty
85
    chh=good
86
   !else
87
    chh=bad
88
   !endif
89
  !endif
90
  !if ($choic>$(choiceitems$i) or $ch notitemof $(choicegood$i)) and $chh!=good
91
   !exit
92
  !endif
93
 !endif
94
!next i
95
 
96
!advance oefstep
97
m_step=$oefstep
98
!if $dynsteps=yes
99
 !read oef/nextstep.proc
100
!endif
101
 
102
stepdiag=ok
103
thisstep=!line $oefstep of $oefsteps
104
gotsteps=!line 1 to $oefstep of $oefsteps
105
gotsteps=!lines2items $gotsteps
106