Rev 15577 | Rev 16145 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
20 | reyssat | 1 | !nocache |
11507 | obado | 2 | !! Pendant la creation via Createxo, c'est le module adm/createxo qui appelle ce fichier. |
3 | |||
1664 | bpr | 4 | !if $oef_test=yes |
11507 | obado | 5 | !set renewlink=cmd=next&retest=again |
6 | !!$header_js |
||
7 | !goto tester |
||
1664 | bpr | 8 | !else |
11507 | obado | 9 | !if $exocnt=1 |
10 | !set exoo=!item 1 of $exolist |
||
11 | !if $module_init_parm=$empty |
||
12 | !set module_init_parm=exo=$exoo |
||
13 | !else |
||
14 | !if &exo notin &$module_init_parm |
||
15 | !set module_init_parm=exo=$exoo&$module_init_parm |
||
16 | !endif |
||
17 | !endif |
||
18 | !endif |
||
19 | !set init_parm=!translate + to $ $ in $module_init_parm |
||
20 | !set init_parm=!replace internal $\ |
||
1664 | bpr | 21 | $ by ; in $init_parm |
11507 | obado | 22 | !set renewlink=cmd=renew&worksheet=$worksheet&$init_parm |
1664 | bpr | 23 | !endif |
3288 | bpr | 24 | |
25 | !if $(title_$lang)!=$empty |
||
26 | !set title=$(title_$lang) |
||
27 | !endif |
||
8205 | bpr | 28 | !if $(title_$lang_choice)!=$empty |
29 | !set title=$(title_$lang_choice) |
||
30 | !endif |
||
11626 | bpr | 31 | !!define the content of the balise title in the header. |
32 | !default module_title2=!detag $title |
||
3288 | bpr | 33 | |
5656 | bpr | 34 | !if $printing=yes |
12293 | bpr | 35 | !changeto oef/print.phtml |
5656 | bpr | 36 | !endif |
37 | |||
1664 | bpr | 38 | !if $title!=$empty |
12293 | bpr | 39 | !set module_title=$title |
40 | !set module_author=$author |
||
41 | !set module_address=$email |
||
1664 | bpr | 42 | !endif |
43 | |||
44 | !if 0$delay2>0 and $status!=$empty |
||
12293 | bpr | 45 | !set now_=$wims_nowseconds |
46 | !read js/chrono.phtml $[max(0,$delay1-($now_-$starttime))] |
||
1664 | bpr | 47 | !endif |
48 | !set wims_html_header=!append line $header_js to $wims_html_header |
||
49 | !set wims_html_header=!append line $oefcss to $wims_html_header |
||
50 | |||
6216 | bpr | 51 | !if $wims_class!= and $class_css=yes |
14058 | bpr | 52 | !set parentsession=!translate _ to $ $ in $session |
53 | !set parentsession=!word 1 of $parentsession |
||
14492 | obado | 54 | !set wims_html_header=!append line <link href="$wims_ref_name?session=$parentsession&+cmd=getfile&+special_parm=css.css" rel="stylesheet" />\ |
14058 | bpr | 55 | to $wims_html_header |
6216 | bpr | 56 | !endif |
14492 | obado | 57 | |
58 | !if $status!=waiting |
||
59 | !set wims_html_header=!append line <link rel="stylesheet" disabled="disabled" href="html/themes/_css/oef_print_solution.css" id="css_print" title="Solution only"/>\ |
||
60 | to $wims_html_header |
||
61 | !endif |
||
62 | |||
1664 | bpr | 63 | !header1 |
4990 | bpr | 64 | |
65 | !default wims_exotitleform=0 |
||
66 | |||
12358 | bpr | 67 | !if $(wims_exoicon[$wims_exo])!=$empty \ |
68 | and $(wims_exoicon[$wims_exo])!=none and _exam notin $wims_session |
||
69 | <h1 class="oeftitle text_icon icon_$(wims_exoicon[$wims_exo]) fullwidth"> |
||
70 | !else |
||
71 | <h1 class="oeftitle"> |
||
72 | !endif |
||
11540 | bpr | 73 | !if _exam notin $wims_session |
12293 | bpr | 74 | !if $wims_exo!=$empty |
75 | !if $wims_exotitleform>0 |
||
15768 | guerimand | 76 | !let p=!positionof item $wims_exo in $wims_listexo |
12293 | bpr | 77 | !if $wims_exotitleform=1 |
15768 | guerimand | 78 | $wims_name_sheet $wims_sheet - $wims_name_Serie $p |
12293 | bpr | 79 | !else |
80 | $wims_sheettitle |
||
81 | <br/> |
||
82 | !if $wims_exotitleform=2 |
||
15768 | guerimand | 83 | $wims_name_Serie $p |
12293 | bpr | 84 | !else |
85 | $(wims_exotitle[$wims_exo]) |
||
86 | !endif |
||
87 | !endif |
||
11541 | bpr | 88 | !else |
12293 | bpr | 89 | !if $wims_exotitleform=0 |
90 | $title |
||
91 | !endif |
||
11541 | bpr | 92 | !endif |
93 | !else |
||
94 | $title |
||
4884 | guerimand | 95 | !endif |
11541 | bpr | 96 | !else _exam isin $wims_session |
12293 | bpr | 97 | $worksheet |
4884 | guerimand | 98 | !endif |
13825 | bpr | 99 | !if _exam notin $wims_session and $wims_exo!=$empty |
100 | !set tmp=$(wims_exodesc[$wims_exo]) |
||
101 | !if $tmp notsametext $empty |
||
14096 | bpr | 102 | <div class="wims_tooltip" style="font-size:0.50em;">[...] |
13886 | lemaire | 103 | <div class="wims_tooltiptext bottom_left" style="width:300px">$tmp</div> |
13825 | bpr | 104 | </div> |
105 | !endif |
||
106 | !endif |
||
13886 | lemaire | 107 | </h1> |
15026 | obado | 108 | |
1664 | bpr | 109 | !if $module_checkdata!=yes |
12293 | bpr | 110 | !read oef/$modu_lang/nodata.phtml |
111 | !goto end |
||
1664 | bpr | 112 | !endif |
113 | |||
114 | !if $title=$empty |
||
11179 | obado | 115 | $name_emptytitle |
116 | <p class="wimscenter"> |
||
15026 | obado | 117 | !set wims_ref_class=wims_button |
118 | !href module=$module $name_restart |
||
119 | $wims_name_or |
||
120 | !set wims_ref_class=wims_button |
||
121 | !href $ $wims_name_giveup |
||
11179 | obado | 122 | </p> |
123 | <div class="wims_msg info small">$name_exo_giveup</div> |
||
124 | !goto end |
||
1664 | bpr | 125 | !endif |
126 | |||
127 | !if 0$delay1>0 and $status!=$empty |
||
12293 | bpr | 128 | <form target="#" name="chrono"> |
129 | <table class="wimsborder wimscenter" style="border:3px solid $wims_ref_bgcolor"> |
||
130 | <tr><td><span class="wims_warning">$wims_name_warning!</span> |
||
131 | !if $qnum>1 |
||
132 | $name_serie_limit |
||
133 | !else |
||
134 | $name_exo_limit |
||
135 | !endif |
||
12297 | bpr | 136 | <input size="4" name="clock" readonly="readonly" onfocus="this.blur();" /> |
12293 | bpr | 137 | </td></tr></table> |
138 | </form> |
||
1664 | bpr | 139 | !endif |
140 | |||
141 | :tester |
||
15026 | obado | 142 | !! this div will close at :end |
143 | <div class="oefform"> |
||
144 | !read oef/present.phtml |
||
1664 | bpr | 145 | |
7680 | bpr | 146 | !if $wims_theme_version= or $wims_theme_version<1 |
12293 | bpr | 147 | <hr style="width:50%" /> |
1664 | bpr | 148 | !endif |
149 | |||
150 | !if $cmd=hint |
||
12293 | bpr | 151 | !read oef/hint.phtml |
152 | !goto end |
||
1664 | bpr | 153 | !endif |
154 | |||
155 | !if $status=waiting |
||
12257 | bpr | 156 | !if $error!=$empty |
12293 | bpr | 157 | <div class="wims_msg alert"> |
12257 | bpr | 158 | !read oef/msg.phtml |
12293 | bpr | 159 | </div> |
12257 | bpr | 160 | !endif |
161 | !if ($hint!=$empty and $givehint>0) or $help!=$empty |
||
12293 | bpr | 162 | <div id="oef_helphint"> |
12257 | bpr | 163 | !if $hint!=$empty and $givehint>0 |
13161 | bpr | 164 | !if _exam isin $wims_session |
165 | <span class="disabled_link">$name_Hint</span> |
||
166 | !else |
||
167 | !set wims_ref_class=wims_button_help |
||
168 | !set wims_ref_id=oef_hint |
||
169 | !href cmd=hint $name_Hint |
||
170 | !endif |
||
171 | $ |
||
12257 | bpr | 172 | !endif |
173 | !if $help!=$empty |
||
13161 | bpr | 174 | !!FIXME should be in src/exec.c |
12257 | bpr | 175 | !if _exam isin $wims_session |
12293 | bpr | 176 | <span class="disabled_link">$wims_name_help</span> |
11351 | bpr | 177 | !else |
12257 | bpr | 178 | !set wims_ref_class=wims_button_help |
179 | !set wims_ref_id=oef_help |
||
180 | !href cmd=help $wims_name_help |
||
11351 | bpr | 181 | !endif |
13161 | bpr | 182 | $ |
12257 | bpr | 183 | !endif |
14429 | bpr | 184 | </div> <!-- id oef_helphint--> |
12257 | bpr | 185 | !endif |
186 | !read oef/form.phtml |
||
12293 | bpr | 187 | <div id="oef_actions"> |
15026 | obado | 188 | !if $fieldtot = 0 |
189 | <div class="oef_exo_renew"> |
||
190 | !set wims_ref_class=wims_button |
||
191 | !set wims_ref_id=oef_renew |
||
192 | !href $renewlink $name_exo_renew |
||
193 | </div> |
||
11417 | bpr | 194 | </div> |
12257 | bpr | 195 | !goto endmain |
15026 | obado | 196 | !endif |
197 | !!_check is there for examlog |
||
198 | !if _exam notin $wims_session and _check notin $wims_session |
||
199 | !if $jquery_defined=yes |
||
200 | !! Displays a Modal dialog box explaining what the "giveup" button will do. |
||
201 | <script> |
||
202 | /*<![CDATA[*/ |
||
203 | jQuery(function(jq){ |
||
204 | jq("#exo_giveup").dialog({ |
||
205 | autoOpen: false, |
||
206 | modal: true, |
||
207 | buttons: { |
||
208 | "$wims_name_yes": function() {window.location = '?session=$session&$renewlink';}, |
||
209 | "$wims_name_no": function() {jq(this).dialog("close");} |
||
210 | } |
||
211 | }); |
||
212 | jq("#exo_giveup_opener").on("click", function() { |
||
213 | jq("#exo_giveup").dialog("open"); |
||
214 | }); |
||
13841 | obado | 215 | }); |
15026 | obado | 216 | /*]]>*/ |
217 | </script> |
||
218 | <button class="wims_button wims_secondary_button" type="button" data-toggle="exo_giveup" id="exo_giveup_opener">$wims_name_giveup</button> |
||
219 | !endif jquery |
||
220 | <div class="dropdown-pane wims_msg info small" id="exo_giveup" title="$wims_name_giveup" data-dropdown> |
||
221 | <div> |
||
222 | !if $qnum>1 |
||
223 | $name_serie_giveup |
||
224 | !else |
||
225 | $name_exo_giveup |
||
226 | !endif |
||
227 | </div> |
||
228 | !if $jquery_defined!=yes |
||
229 | <div class="oef_exo_renew"> |
||
230 | !set wims_ref_class=wims_button wims_secondary_button |
||
231 | !set wims_ref_id=oef_renew |
||
232 | !href $renewlink $wims_name_giveup |
||
233 | </div> |
||
234 | !else |
||
235 | <p>$name_giveup_confirm</p> |
||
236 | !endif |
||
12257 | bpr | 237 | </div> |
15026 | obado | 238 | !endif _exam notin $wims_session |
11248 | obado | 239 | |
15026 | obado | 240 | $ |
241 | !if $qnum>1 |
||
242 | <div class="oef_serie_exo spacer"> |
||
243 | <span>$name_serie_exo</span> |
||
244 | <ul class="wims_serie_bar inline"> |
||
245 | !for j=1 to $[$reply_cnt] |
||
246 | <li class="wims_exo_done" title="$name_exo $j ($wims_name_exo_tried)">$j</li> |
||
247 | !next |
||
248 | <li class="wims_exo_todo" title="$name_exo $j">$[$reply_cnt+1]</li> |
||
249 | !for j=$[$reply_cnt+2] to $qnum |
||
250 | <li title="$name_exo $j ($wims_name_exo_untry)">$j</li> |
||
251 | !next |
||
252 | </ul> |
||
253 | </div> |
||
254 | !endif |
||
255 | </div><!-- #oef_actions --> |
||
256 | !else status=waiting |
||
12257 | bpr | 257 | !if $error!=$empty |
12293 | bpr | 258 | <div class="wims_msg alert"> |
12257 | bpr | 259 | !read oef/msg.phtml |
12293 | bpr | 260 | </div> |
12257 | bpr | 261 | !endif |
3041 | obado | 262 | |
12257 | bpr | 263 | !read oef/answer.phtml |
3041 | obado | 264 | |
12257 | bpr | 265 | !if $status!=$empty |
14429 | bpr | 266 | <div id="oef_actions"> |
267 | <div class="oef_serie_exo2 spacer">$name_serie_exo2 |
||
268 | $name_serie_new2 |
||
269 | <ul class="wims_serie_bar inline"> |
||
12257 | bpr | 270 | !for j=1 to $[$reply_cnt] |
8716 | obado | 271 | <li class="wims_exo_done" title="$name_exo $j ($wims_name_exo_tried)">$j</li> |
12257 | bpr | 272 | !next |
8716 | obado | 273 | <li class="wims_next_exo" title="$name_serie_nextexo"> |
12257 | bpr | 274 | !href cmd=next > $[$reply_cnt+1] |
8716 | obado | 275 | </li> |
12257 | bpr | 276 | !for j=$[$reply_cnt+2] to $qnum |
8716 | obado | 277 | <li title="$name_exo $j ($wims_name_exo_untry)">$j</li> |
12257 | bpr | 278 | !next |
12293 | bpr | 279 | </ul> |
14429 | bpr | 280 | </div> <!-- class oef_serie_exo2--> |
281 | <div class="oef_buttons"> |
||
12257 | bpr | 282 | !set wims_ref_class=wims_button |
283 | !set wims_ref_id=oef_serie_nextexo |
||
284 | !href cmd=next <span class="oef_serie_nextexo">$name_serie_nextexo</span> |
||
285 | !if _exam notin $wims_session |
||
286 | $wims_name_or |
||
287 | !set wims_ref_class=wims_button wims_secondary_button |
||
288 | !set wims_ref_id=oef_serie_renew |
||
289 | !if $jquery_defined=yes |
||
11507 | obado | 290 | !! Displays a Modal dialog box explaining what the "giveup" button will do. |
13841 | obado | 291 | <script> |
11507 | obado | 292 | /*<![CDATA[*/ |
11688 | obado | 293 | $$(function(jq){ |
11507 | obado | 294 | jq("#exo_giveup").dialog({ |
13841 | obado | 295 | autoOpen: false, |
296 | modal: true, |
||
297 | buttons: { |
||
298 | "$wims_name_yes": function() {window.location = '?session=$session&$renewlink';}, |
||
299 | "$wims_name_no": function() {jq(this).dialog("close");} |
||
300 | } |
||
301 | }); |
||
11507 | obado | 302 | jq("#exo_giveup_opener").on("click", function() { |
303 | jq("#exo_giveup").dialog("open"); |
||
11246 | bpr | 304 | }); |
305 | }); |
||
11507 | obado | 306 | /*]]>*/ |
307 | </script> |
||
308 | <button class="wims_button wims_secondary_button" type="button" data-toggle="exo_giveup" id="exo_giveup_opener">$wims_name_giveup</button> |
||
12257 | bpr | 309 | !endif jquery |
12293 | bpr | 310 | <div class="dropdown-pane wims_msg info small" id="exo_giveup" title="$wims_name_giveup" data-dropdown> |
311 | <p>$name_serie_giveup</p> |
||
12257 | bpr | 312 | !if $jquery_defined!=yes |
12293 | bpr | 313 | <div class="oef_exo_renew"> |
11246 | bpr | 314 | !set wims_ref_class=wims_button wims_secondary_button |
315 | !set wims_ref_id=oef_renew |
||
316 | !href $renewlink $wims_name_giveup |
||
12293 | bpr | 317 | </div> |
12257 | bpr | 318 | !endif jquery |
12293 | bpr | 319 | !endif not exam |
14429 | bpr | 320 | </div> <!-- id oef_button--> |
12293 | bpr | 321 | !else status |
14974 | bpr | 322 | <div id="oef_actions"> |
12257 | bpr | 323 | !if $qnum>1 |
324 | !set wims_ref_class=wims_button |
||
325 | !set wims_ref_id=oef_serie_renew |
||
15577 | bpr | 326 | !if $seedlastcnt < $seedrepeat and $module_score!=$empty and $module_score<9.8 |
15576 | bpr | 327 | !set tmp=$(wims_name_thsheet[14]) $[$seedlastcnt+1]/$seedrepeat |
328 | !else |
||
329 | !set tmp=$name_exo_renew |
||
330 | !endif |
||
331 | !href $renewlink <span class="oef_serie_renew">$tmp</span> |
||
10211 | bpr | 332 | $ |
12257 | bpr | 333 | !if $wims_sheet=$empty |
334 | !set wims_ref_class=wims_button wims_secondary_button |
||
335 | !set wims_ref_id=oef_exo_intro |
||
12293 | bpr | 336 | <span class="oef_exo_intro"> |
12257 | bpr | 337 | !href exo_Intro |
12293 | bpr | 338 | </span> |
10211 | bpr | 339 | $ |
12257 | bpr | 340 | !endif |
14429 | bpr | 341 | !!</div><!-- id oef_buttons ???--> |
12257 | bpr | 342 | !else qnum=1 |
14974 | bpr | 343 | <p class="renew_et_intro"> |
15574 | bpr | 344 | !if $seedlastcnt < $seedrepeat |
345 | !set tmp=$(wims_name_thsheet[14]) $[$seedlastcnt+1]/$seedrepeat |
||
346 | !else |
||
347 | !set tmp=$name_exo_renew |
||
348 | !endif |
||
12257 | bpr | 349 | !set wims_ref_class=wims_button |
350 | !set wims_ref_id=oef_renew |
||
15574 | bpr | 351 | !href $renewlink <span class="oef_exo_renew">$tmp</span> |
14974 | bpr | 352 | $ |
12257 | bpr | 353 | !if $wims_sheet=$empty and $oef_test!=yes |
354 | !set wims_ref_class=wims_button wims_secondary_button |
||
355 | !set wims_ref_id=oef_exo_intro |
||
356 | !href exo_Intro |
||
10211 | bpr | 357 | $ |
12257 | bpr | 358 | !endif |
14974 | bpr | 359 | </p> |
12257 | bpr | 360 | !endif qnum |
12293 | bpr | 361 | !endif status |
14429 | bpr | 362 | </div><!-- id oef_action--> |
1664 | bpr | 363 | !endif |
364 | |||
365 | !if $replydefaulted=yes |
||
12293 | bpr | 366 | <p id="oef_devel_mode"> |
367 | $name_devel_mode: |
||
12257 | bpr | 368 | !if $oef_default=yes |
369 | $name_devel_warning |
||
370 | !else |
||
371 | !set wims_ref_class=wims_button wims_secondary_button |
||
372 | !set wims_ref_id=oef_default |
||
373 | !href cmd=config&oef_default=yes $name_devel_insert |
||
15026 | obado | 374 | $ |
12257 | bpr | 375 | !endif |
12293 | bpr | 376 | </p> |
1664 | bpr | 377 | !endif |
15026 | obado | 378 | |
11663 | bpr | 379 | :endmain |
15026 | obado | 380 | <div id="oef_endhook"> |
381 | !read ./endhook.phtml |
||
382 | !if _exam notin $wims_session and _check notin $wims_session |
||
383 | !read oef/endhook.phtml |
||
384 | !endif |
||
385 | </div> |
||
15574 | bpr | 386 | !reset seedlastcnt |
1664 | bpr | 387 | :end |
15026 | obado | 388 | </div> <!-- .oefform --> |
389 | |||
11376 | bpr | 390 | !if $oef_anstype_css!=$empty |
14429 | bpr | 391 | <style>$oef_anstype_css</style> |
11376 | bpr | 392 | !endif |
15026 | obado | 393 | <!--fin oef Main.phtml--> |
1664 | bpr | 394 | !tail |
395 | |||
20 | reyssat | 396 | !if debug iswordof $m_oefenv |
14429 | bpr | 397 | !reset module_score |
20 | reyssat | 398 | !endif |
15574 | bpr | 399 |