Subversion Repositories wimsdev

Rev

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