Subversion Repositories wimsdev

Rev

Rev 20 | Rev 7357 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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