Subversion Repositories wimsdev

Rev

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