Subversion Repositories wimsdev

Rev

Rev 13876 | Rev 13893 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 13876 Rev 13880
Line 60... Line 60...
60
    title_$i=!defof title in $(class_header)def/$e_.def
60
    title_$i=!defof title in $(class_header)def/$e_.def
61
  !endif
61
  !endif
62
  !reset question testcondition format
62
  !reset question testcondition format
63
  thisexo=$e_
63
  thisexo=$e_
64
  !readproc oef/imagedir.proc
64
  !readproc oef/imagedir.proc
65
  varcnt=!defof varcnt in $(class_header)def/$e_.def
-
 
66
  !default varcnt=0
-
 
67
  !for v=2 to $varcnt+5
-
 
68
    val$v=
-
 
69
  !next v
-
 
70
  status=prep
-
 
71
  !read $(class_header)def/$e_.def
-
 
72
  !if $format=html
-
 
73
    question_$i=$question
-
 
74
    !if __EXECUTED_ isin $question
-
 
75
      varcnt_$i=$varcnt
-
 
76
      var_$i=$val1
-
 
77
      !for v=2 to $varcnt+5
-
 
78
        v_=!translate internal $\
-
 
79
$ to $	$ in $(val$v)
-
 
80
        var_$i=$(var_$i)\
-
 
81
$v_
-
 
82
      !next v
-
 
83
    !endif
-
 
84
    !ifval $replycnt=0 and $choicecnt=1
-
 
85
      rep=!item 1 to 6 of $choicebad1
-
 
86
      rep=!append item $choicegood1 to $rep
-
 
87
      rep=!listuniq $rep
-
 
88
      rep=!sort items $rep
-
 
89
      rep=!replace , by </li><li> in <ul style="list-style-type:square;"><li>$rep</li></ul>
-
 
90
      chce_$i=$rep
-
 
91
      test_print=1
-
 
92
    !else
-
 
93
      chce_$i=
-
 
94
    !endif
-
 
95
    rep=
-
 
96
    !!FIXME
-
 
97
    !if 3 isin $intro_check or $intro_check=$empty
-
 
98
      !for k=1 to $choicecnt
-
 
99
        !if $(choicename$k)!=
-
 
100
          rep=!append line <em>$(choicename$k)</em>: $(choicegood$k) to $rep
-
 
101
        !else
-
 
102
          rep=!append line $(choicegood$k) to $rep
-
 
103
        !endif
-
 
104
      !next k
-
 
105
      !for k=1 to $replycnt
-
 
106
        thisstep=!line 1 of $oefsteps
-
 
107
        !if r$k isitemof $thisstep or $oefsteps=$empty
-
 
108
          rg_=$(replygood$k)
-
 
109
          Replytype$i=!append item $(replytype$k) to $(Replytype$i)
-
 
110
          Replystyle$i=!append item $anstyle to $(Replystyle$i)
-
 
111
          !if $(replytype$k) iswordof checkbox mark click menu radio clickfill dragfill
-
 
112
            rg_=!rows2lines $rg_
-
 
113
            rg1_=!line 1 of $rg_
-
 
114
            rg2_=!line 2 to -1 of $rg_
-
 
115
            rg2_=!translate internal $\
-
 
116
$ to ; in $rg2_
-
 
117
            !if $(replytype$k) iswordof checkbox mark click menu radio
-
 
118
              rg_=!item $rg1_ of $rg2_
-
 
119
            !else
-
 
120
              rg_=$rg1_
-
 
121
            !endif
-
 
122
            rg_tmp=$rg2_
-
 
123
            !if $(replytype$k) iswordof clickfill dragfill
-
 
124
              rg_tmp=!listuniq $rg1_,$rg2_
-
 
125
            !endif
-
 
126
            Rg$i=!append line $rg_tmp to $(Rg$i)
-
 
127
            !goto endRg
-
 
128
          !endif
-
 
129
          !if $(replytype$k) iswordof coord
-
 
130
            rg_=<img src="$(rg_[1;])" />
-
 
131
            Rg$i=!append line $rg_ to $(Rg$i)
-
 
132
            !goto endRg
-
 
133
          !endif
-
 
134
          !if $(replytype$k) iswordof atext wlist nocase case
-
 
135
            rg_=!translate internal ;| to $\
-
 
136
\
-
 
137
$ in $rg_
-
 
138
            rg_=!line 1 of $rg_
-
 
139
            !goto endRg
-
 
140
          !endif
-
 
141
          !if $(replytype$k) iswordof function default equation sigunits numexp or $(replystyle$k) iswordof numeric
-
 
142
            rg_=!item 1 of $rg_
-
 
143
            Rg$i=!append line $ $ to $(Rg$i)
-
 
144
            !goto endRg
-
 
145
          !endif
-
 
146
          !if $(replytype$k) iswordof imgcomp textcomp compose reorder
-
 
147
            rg_=!translate internal | to $\
-
 
148
$ in $rg_
-
 
149
            rg_=!rows2lines $rg_
-
 
150
            rg_tmp=!lines2items $rg_
-
 
151
            rg_=!line 1 of $rg_
-
 
152
            !if $(replytype$k)=imgcomp
-
 
153
              rg_=!item 2 to -1 of $rg_
-
 
154
              rg_=!nospace $rg_
-
 
155
              rg_=!replace , by " />,<img src="$imagedir/ in <img src="$imagedir/$rg_" />
-
 
156
              rg__=!shuffle $rg_
-
 
157
              Rg$i=!append line $rg__ to $(Rg$i)
-
 
158
            !else
-
 
159
              rg_cnt_=!itemcnt $rg_tmp
-
 
160
              rg__=!shuffle $rg_cnt_
-
 
161
              rg_tmp=!listuniq $(rg_tmp[$rg__])
-
 
162
              Rg$i=!append line $rg_tmp to $(Rg$i)
-
 
163
            !endif
-
 
164
            rg_=!translate , to $ $ in $rg_
-
 
165
            !goto endRg
-
 
166
          !endif
-
 
167
          !if $(replytype$k) iswordof correspond
-
 
168
            !set rg__=!rows2lines $rg_
-
 
169
            !distribute lines $rg__ into rg1__,rg2__
-
 
170
            !set rg__cnt=!itemcnt $rg1__
-
 
171
            !set rg_2_=!shuffle $rg__cnt
-
 
172
            !set rg__=<table class="wimsborder"><tr>
-
 
173
            !set rgg_=<table class="wimsborder"><tr>
-
 
174
            !for tmp=1 to $rg__cnt
-
 
175
              !set rg__=$rg__<td>$(rg1__[$tmp])</td>
-
 
176
              !set rgg_=$rgg_<td>$(rg_[1;$tmp])</td>
-
 
177
            !next
-
 
178
            !set rg__=$rg__</tr><tr>
-
 
179
            !set rgg_=$rgg_</tr><tr>
-
 
180
            !for tmp =1 to $rg__cnt
-
 
181
              !set rg__=$rg__<td>$(rg2__[$(rg_2_[$tmp])])</td>
-
 
182
              !set rgg_=$rgg_<td>$(rg2__[$tmp])</td>
-
 
183
            !next
-
 
184
            !set rg__=$rg__</tr></table>
-
 
185
            !set rg_=$rgg_</tr></table>
-
 
186
            Rg$i=!append line $(rg__) to $(Rg$i)
-
 
187
            !goto endRg
-
 
188
          !endif
-
 
189
          !if $(replytype$k) iswordof draw
-
 
190
            rg__=$(rg_[2;])
-
 
191
            tmp=!item 1 of $rg__
-
 
192
            !if $tmp=arrows
-
 
193
              !default arrow_head=10
-
 
194
              arrow_head=!getopt arrowhead in $(replyoption$k)
-
 
195
              comp=,$arrow_head
-
 
196
            !endif
-
 
197
            rg__=!replace internal $tmp by $tmp blue$comp in $rg__
-
 
198
            !reset comp
-
 
199
            rg_=!declosing $(rg_[1;])
-
 
200
            !! FIXME inputsize is in the field embed not accessible here
-
 
201
            rg_=200,200$	$ $rg_
-
 
202
            !readproc oef/canvasdraw.phtml $rg_
-
 
203
            canvasdraw=!replace internal $\
-
 
204
$ by in $canvasdraw_out
-
 
205
            Rg$i=!append line $canvasdraw to $(Rg$i)
-
 
206
            !readproc oef/canvasdraw.phtml $rg_$	$ $rg__
-
 
207
            rg_=!replace internal $\
-
 
208
$ by in $canvasdraw_out
-
 
209
            !goto endRg
-
 
210
          !endif
-
 
211
          Rg$i=!append line $ $ to $(Rg$i)
-
 
212
:endRg
-
 
213
          !if $conditioncnt<1
-
 
214
            !if noanalyzeprint notwordof $(replyoption$k)
-
 
215
              !if $(replyname$k)$rg_ !=
-
 
216
                !if http isin $(replyname$k)$rg_
-
 
217
                  rep=$rg_
-
 
218
                !else
-
 
219
                  !if $(replyname$k)!=
-
 
220
                    rep=!append line <em>$(replyname$k)</em>: $rg_ to $rep
-
 
221
                  !else
-
 
222
                    rep=!append line $rg_ to $rep
-
 
223
                  !endif
-
 
224
                !endif
-
 
225
              !endif
-
 
226
            !endif
-
 
227
          !endif
-
 
228
        !else
-
 
229
          Replytype$i=!append item $(replytype$k) to $(Replytype$i)
-
 
230
          Replystyle$i=!append item $(replystyle$k) to $(Replystyle$i)
-
 
231
        !endif r$k isitemof $thisstep
-
 
232
        !reset replyoption$k
-
 
233
      !next k
-
 
234
    !endif
-
 
235
    rep=!imgrename $rep
-
 
236
    ans_$i=!trim $rep
-
 
237
    !if $(ans_$i)!=
-
 
238
      test_print=1
-
 
239
    !endif
-
 
240
  !endif
-
 
241
  !reset intro_check
-
 
242
  !if $latex_exists>=0
-
 
243
    !readproc oef/latex.proc exo
65
  !readproc oef/printanalysis.proc
244
  !endif
-
 
245
  Rg$i=!imgrename $(Rg$i)
-
 
246
!next
66
!next
247
!if $latex_exists>=1
67
!if $latex_exists>=1
248
  !readproc oef/latex.proc end
68
  !readproc oef/latex.proc end
249
!endif
69
!endif