Rev 8045 | Rev 10177 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 8045 | Rev 8823 | ||
---|---|---|---|
Line 5... | Line 5... | ||
5 | !read lang/names.phtml.fr |
5 | !read lang/names.phtml.fr |
6 | !set limit=50 |
6 | !set limit=50 |
7 | !reset begin |
7 | !reset begin |
8 | !default ext=1 |
8 | !default ext=1 |
9 | javaoption=$javatype |
9 | javaoption=$javatype |
- | 10 | !if $type=3 |
|
- | 11 | javaoption=brokenline |
|
- | 12 | !endif |
|
10 | !default javaoption=circle |
13 | !default javaoption=circle |
11 | javaoutput=!getopt free in $(javaoutput) |
14 | javaoutput=!getopt free in $(javaoutput) |
12 | 15 | ||
13 | !if $end=1 |
16 | !if $end=1 |
14 | !goto end |
17 | !goto end |
Line 51... | Line 54... | ||
51 | step=!linecnt $data |
54 | step=!linecnt $data |
52 | test_ext=!line 2 of $data |
55 | test_ext=!line 2 of $data |
53 | test_extcnt=!itemcnt $test_ext |
56 | test_extcnt=!itemcnt $test_ext |
54 | test_extcnt2=!listintersect $test_ext and $list_curve |
57 | test_extcnt2=!listintersect $test_ext and $list_curve |
55 | !if ($test_extcnt=3 and $type=1) or ($type<2 and $(test_ext[2]) isitemof $list_curve) \ |
58 | !if ($test_extcnt=3 and $type=1) or ($type<2 and $(test_ext[2]) isitemof $list_curve) \ |
56 | or ( |
59 | or ($type iswordof 2 3 and $test_extcnt2=$empty) |
57 | data=!line 1 of $data |
60 | data=!line 1 of $data |
58 | step=3 |
61 | step=3 |
59 | !goto 2 |
62 | !goto 2 |
60 | !endif |
63 | !endif |
61 | !if $step=0 |
64 | !if $step=0 |
Line 67... | Line 70... | ||
67 | !if $type=1 |
70 | !if $type=1 |
68 | dessin=!append line arrow $(c_[2..5]),5,black to $dessin |
71 | dessin=!append line arrow $(c_[2..5]),5,black to $dessin |
69 | !endif |
72 | !endif |
70 | !if $type iswordof 0 2 |
73 | !if $type iswordof 0 2 |
71 | dessin=!append line fcircle $(c_[2..3]),10,black to $dessin |
74 | dessin=!append line fcircle $(c_[2..3]),10,black to $dessin |
- | 75 | !endif |
|
- | 76 | !if $type iswordof 3 |
|
- | 77 | dessin=!append line polyline black,$(c_[2..3]) to $dessin |
|
72 | !endif |
78 | !endif |
73 | XXXXX |
79 | XXXXX |
74 | !next |
80 | !next |
75 | !increase step |
81 | !increase step |
76 | !!exit |
82 | !!exit |
Line 102... | Line 108... | ||
102 | !increase step |
108 | !increase step |
103 | !endif step=1 |
109 | !endif step=1 |
104 | :2 |
110 | :2 |
105 | !if $step>=2 |
111 | !if $step>=2 |
106 | !if $erase=yes |
112 | !if $erase=yes |
107 | !if $type iswordof 0 2 |
113 | !if $type iswordof 0 2 3 |
108 | dessin=!line 1 to -2 of $dessin |
114 | dessin=!line 1 to -2 of $dessin |
109 | !else |
115 | !else |
110 | dessin=!line 1 to -3 of $dessin |
116 | dessin=!line 1 to -3 of $dessin |
111 | !endif type |
117 | !endif type |
112 | data=!line 1 to -2 of $data |
118 | data=!line 1 to -2 of $data |
Line 125... | Line 131... | ||
125 | !default imgsrc=$wims_ref_name?session=$session&cmd=getfile&special_parm=$sesdir1/$wims_deposit |
131 | !default imgsrc=$wims_ref_name?session=$session&cmd=getfile&special_parm=$sesdir1/$wims_deposit |
126 | click_x=$[$click_x] |
132 | click_x=$[$click_x] |
127 | click_y=$[$click_y] |
133 | click_y=$[$click_y] |
128 | 134 | ||
129 | !if $step=2 |
135 | !if $step=2 |
130 |
|
136 | !reset data |
131 | !if $click_x != 0 and $click_y != 0 |
137 | !if $click_x != 0 and $click_y != 0 |
132 | data=!append line $click_x,$click_y to $data |
138 | data=!append line $click_x,$click_y to $data |
133 | !increase step |
139 | !increase step |
134 | insdraw_size=$click_x,$click_y |
140 | insdraw_size=$click_x,$click_y |
135 | !else |
141 | !else |
- | 142 | !if $type!=3 |
|
136 | test=nosize |
143 | test=nosize |
- | 144 | !endif |
|
137 | !endif click!=0 .. |
145 | !endif click!=0 .. |
138 | !else |
146 | !else |
139 | !if |
147 | !if $type iswordof 2 3 |
140 | !if $ext=2 |
148 | !if $ext=2 |
141 | data=!append item $javaoption,$(javaoutput) to $data |
149 | data=!append item $javaoption,$(javaoutput) to $data |
142 | data=!replace internal ; by , in $data |
150 | data=!replace internal ; by , in $data |
143 | !if $javaoption=circle |
151 | !if $javaoption=circle |
144 | javaout2=$(javaoutput[1]),$(javaoutput[2]),$(javaoutput[3])*2,black |
152 | javaout2=$(javaoutput[1]),$(javaoutput[2]),$(javaoutput[3])*2,black |
Line 146... | Line 154... | ||
146 | !if $javaoption=rectangle |
154 | !if $javaoption=rectangle |
147 | javaout2=$(javaoutput),black |
155 | javaout2=$(javaoutput),black |
148 | !endif |
156 | !endif |
149 | !if $javaoption=polygon |
157 | !if $javaoption=polygon |
150 | javaout2=!replace internal ; by , in black,$(javaoutput) |
158 | javaout2=!replace internal ; by , in black,$(javaoutput) |
- | 159 | !endif |
|
- | 160 | !if $javaoption=brokenline |
|
- | 161 | javaout2=$(javaoutput) |
|
151 | !endif |
162 | !endif |
152 | dessin=!append line $javaoption $javaout2 to $dessin |
163 | dessin=!append line $javaoption $javaout2 to $dessin |
153 | !increase step |
164 | !increase step |
154 | ext=1 |
165 | ext=1 |
155 | begin=1 |
166 | begin=1 |
156 | !reset legend begin test |
167 | !reset legend begin test |
157 | !endif |
168 | !endif |
158 | !endif type=2 |
169 | !endif type=2 |
159 | 170 | ||
160 | !if ($legend!=$empty and ($click_x!=0 or $click_y!=0)) |
171 | !if ($legend!=$empty and ($click_x!=0 or $click_y!=0 or $type iswordof 3)) |
161 | !if $ext<=1 |
172 | !if $ext<=1 |
- | 173 | !if $type=3 |
|
- | 174 | data=!append line $legend to $data |
|
- | 175 | !else |
|
162 | data=!append line $legend,$click_x,$click_y to $data |
176 | data=!append line $legend,$click_x,$click_y to $data |
- | 177 | !endif |
|
163 | !if $type=1 |
178 | !if $type=1 |
164 | dessin=!append line fcircle $click_x,$click_y,5,black to $dessin |
179 | dessin=!append line fcircle $click_x,$click_y,5,black to $dessin |
165 | !endif |
180 | !endif |
166 | !increase step |
181 | !increase step |
167 | !if $type iswordof 0 |
182 | !if $type iswordof 0 |
168 | !reset legend |
183 | !reset legend |
169 | dessin=!append line fcircle $click_x,$click_y,10,black to $dessin |
184 | dessin=!append line fcircle $click_x,$click_y,10,black to $dessin |
170 | !endif |
185 | !endif |
171 | !if $type=1 |
186 | !if $type=1 |
172 | dessin=!append line arrow $click_x,$click_y to $dessin |
187 | dessin=!append line arrow $click_x,$click_y to $dessin |
173 | !endif |
188 | !endif |
174 | !if $type iswordof 1 2 |
189 | !if $type iswordof 1 2 3 |
175 | !increase ext |
190 | !increase ext |
176 | !if $type iswordof 2 |
191 | !if $type iswordof 2 |
177 | dessin_p=!append line circle $click_x,$click_y,5,red to $dessin_p |
192 | dessin_p=!append line circle $click_x,$click_y,5,red to $dessin_p |
- | 193 | !endif |
|
- | 194 | !if $type iswordof 2 3 |
|
178 | !set insdraw_filebase=!append item $wims_home/sessions/$wims_session/$sesdir to $insdraw_filebase |
195 | !set insdraw_filebase=!append item $wims_home/sessions/$wims_session/$sesdir to $insdraw_filebase |
179 | !set insdraw_filebase=!listuniq $insdraw_filebase |
196 | !set insdraw_filebase=!listuniq $insdraw_filebase |
180 | !set insdraw_filebase=!items2words $insdraw_filebase |
197 | !set insdraw_filebase=!items2words $insdraw_filebase |
181 | !insdraw copy 0,0,-1,-1,-1,-1,$wims_deposit\ |
198 | !insdraw copy 0,0,-1,-1,-1,-1,$wims_deposit\ |
182 | $dessin\ |
199 | $dessin\ |
Line 189... | Line 206... | ||
189 | !else |
206 | !else |
190 | data=!append item $click_x,$click_y to $data |
207 | data=!append item $click_x,$click_y to $data |
191 | !if $type iswordof 1 |
208 | !if $type iswordof 1 |
192 | dessin=!append item $click_x,$click_y,10,black to $dessin |
209 | dessin=!append item $click_x,$click_y,10,black to $dessin |
193 | !endif |
210 | !endif |
194 | !if $type iswordof 2 |
211 | !if $type iswordof 2 3 |
195 | !insdraw $dessin |
212 | !insdraw $dessin |
196 | !set imgsrc=$ins_filename |
213 | !set imgsrc=$ins_filename |
197 | !endif |
214 | !endif |
198 | !reset legend |
215 | !reset legend |
199 | ext=1 |
216 | ext=1 |
200 | !endif ext <=1 |
217 | !endif ext <=1 |
201 | !else legend |
218 | !else legend |
202 | !if $legend=$empty and $begin!=1 |
219 | !if $legend=$empty and $begin!=1 |
203 | test=nolegend |
220 | test=nolegend |
204 | !endif |
221 | !endif |
205 | !if ($click_x=0 and $click_y=0) and $begin!=1 |
222 | !if ($click_x=0 and $click_y=0) and $begin!=1 and $type!=3 |
206 | test=noclick |
223 | test=noclick |
207 | !endif |
224 | !endif |
208 | !endif legend |
225 | !endif legend |
209 | !endif cmd=reply |
226 | !endif cmd=reply |
210 | 227 | ||
Line 226... | Line 243... | ||
226 | !writefile wimshome/sessions/$wims_session/submit.oef $exo |
243 | !writefile wimshome/sessions/$wims_session/submit.oef $exo |
227 | !writefile wimshome/sessions/$wims_session/data_$f_wims_deposit $data |
244 | !writefile wimshome/sessions/$wims_session/data_$f_wims_deposit $data |
228 | insdraw_size=!line 1 of $data |
245 | insdraw_size=!line 1 of $data |
229 | !insdraw $dessin |
246 | !insdraw $dessin |
230 | !set imgfilename=$ins_filename |
247 | !set imgfilename=$ins_filename |
231 | !if |
248 | !if $type iswordof 2 3 |
232 | !sh cd $wims_home/\ |
249 | !sh cd $wims_home/\ |
233 | cp s2/$wims_session/$imgfilename sessions/$wims_session/getfile/click/z_$wims_deposit |
250 | cp s2/$wims_session/$imgfilename sessions/$wims_session/getfile/click/z_$wims_deposit |
234 | !endif |
251 | !endif |
235 | !endif |
252 | !endif |
236 | !reset click_x click_y erase javaoutput |
253 | !reset click_x click_y erase javaoutput |