Rev 16145 | Rev 16709 | 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 | |||
16547 | guerimand | 67 | !if $wims_user=supervisor and $oefobservation!=$empty |
68 | <div class="wims_msg info"> |
||
69 | <details> |
||
70 | <summary>$name_authordesc</summary> |
||
71 | $oefobservation |
||
72 | <div class="formHelp">$name_authordesc_desc</div> |
||
73 | </details> |
||
74 | </div> |
||
75 | !endif |
||
76 | |||
16145 | bpr | 77 | !if $intro_calc iswordof 1 2 |
78 | !reset tmp |
||
79 | !if $intro_calc=1 |
||
80 | !set tmp=basic |
||
81 | !endif |
||
82 | <div class="float_right"> |
||
83 | !readproc slib/utilities/mathcalc $tmp |
||
84 | $slib_out |
||
85 | </div> |
||
86 | !reset tmp |
||
87 | !endif |
||
12358 | bpr | 88 | !if $(wims_exoicon[$wims_exo])!=$empty \ |
89 | and $(wims_exoicon[$wims_exo])!=none and _exam notin $wims_session |
||
90 | <h1 class="oeftitle text_icon icon_$(wims_exoicon[$wims_exo]) fullwidth"> |
||
91 | !else |
||
92 | <h1 class="oeftitle"> |
||
93 | !endif |
||
11540 | bpr | 94 | !if _exam notin $wims_session |
12293 | bpr | 95 | !if $wims_exo!=$empty |
96 | !if $wims_exotitleform>0 |
||
15768 | guerimand | 97 | !let p=!positionof item $wims_exo in $wims_listexo |
12293 | bpr | 98 | !if $wims_exotitleform=1 |
15768 | guerimand | 99 | $wims_name_sheet $wims_sheet - $wims_name_Serie $p |
12293 | bpr | 100 | !else |
101 | $wims_sheettitle |
||
102 | <br/> |
||
103 | !if $wims_exotitleform=2 |
||
15768 | guerimand | 104 | $wims_name_Serie $p |
12293 | bpr | 105 | !else |
106 | $(wims_exotitle[$wims_exo]) |
||
107 | !endif |
||
108 | !endif |
||
11541 | bpr | 109 | !else |
12293 | bpr | 110 | !if $wims_exotitleform=0 |
111 | $title |
||
112 | !endif |
||
11541 | bpr | 113 | !endif |
114 | !else |
||
115 | $title |
||
4884 | guerimand | 116 | !endif |
11541 | bpr | 117 | !else _exam isin $wims_session |
12293 | bpr | 118 | $worksheet |
4884 | guerimand | 119 | !endif |
13825 | bpr | 120 | !if _exam notin $wims_session and $wims_exo!=$empty |
121 | !set tmp=$(wims_exodesc[$wims_exo]) |
||
122 | !if $tmp notsametext $empty |
||
14096 | bpr | 123 | <div class="wims_tooltip" style="font-size:0.50em;">[...] |
13886 | lemaire | 124 | <div class="wims_tooltiptext bottom_left" style="width:300px">$tmp</div> |
13825 | bpr | 125 | </div> |
126 | !endif |
||
127 | !endif |
||
13886 | lemaire | 128 | </h1> |
15026 | obado | 129 | |
1664 | bpr | 130 | !if $module_checkdata!=yes |
12293 | bpr | 131 | !read oef/$modu_lang/nodata.phtml |
132 | !goto end |
||
1664 | bpr | 133 | !endif |
134 | |||
135 | !if $title=$empty |
||
11179 | obado | 136 | $name_emptytitle |
137 | <p class="wimscenter"> |
||
15026 | obado | 138 | !set wims_ref_class=wims_button |
139 | !href module=$module $name_restart |
||
140 | $wims_name_or |
||
141 | !set wims_ref_class=wims_button |
||
142 | !href $ $wims_name_giveup |
||
11179 | obado | 143 | </p> |
144 | <div class="wims_msg info small">$name_exo_giveup</div> |
||
145 | !goto end |
||
1664 | bpr | 146 | !endif |
147 | |||
148 | !if 0$delay1>0 and $status!=$empty |
||
12293 | bpr | 149 | <form target="#" name="chrono"> |
150 | <table class="wimsborder wimscenter" style="border:3px solid $wims_ref_bgcolor"> |
||
151 | <tr><td><span class="wims_warning">$wims_name_warning!</span> |
||
152 | !if $qnum>1 |
||
153 | $name_serie_limit |
||
154 | !else |
||
155 | $name_exo_limit |
||
156 | !endif |
||
12297 | bpr | 157 | <input size="4" name="clock" readonly="readonly" onfocus="this.blur();" /> |
12293 | bpr | 158 | </td></tr></table> |
159 | </form> |
||
1664 | bpr | 160 | !endif |
161 | |||
162 | :tester |
||
15026 | obado | 163 | !! this div will close at :end |
164 | <div class="oefform"> |
||
165 | !read oef/present.phtml |
||
1664 | bpr | 166 | |
7680 | bpr | 167 | !if $wims_theme_version= or $wims_theme_version<1 |
12293 | bpr | 168 | <hr style="width:50%" /> |
1664 | bpr | 169 | !endif |
170 | |||
171 | !if $cmd=hint |
||
12293 | bpr | 172 | !read oef/hint.phtml |
173 | !goto end |
||
1664 | bpr | 174 | !endif |
175 | |||
176 | !if $status=waiting |
||
12257 | bpr | 177 | !if $error!=$empty |
12293 | bpr | 178 | <div class="wims_msg alert"> |
12257 | bpr | 179 | !read oef/msg.phtml |
12293 | bpr | 180 | </div> |
12257 | bpr | 181 | !endif |
182 | !if ($hint!=$empty and $givehint>0) or $help!=$empty |
||
12293 | bpr | 183 | <div id="oef_helphint"> |
12257 | bpr | 184 | !if $hint!=$empty and $givehint>0 |
13161 | bpr | 185 | !if _exam isin $wims_session |
186 | <span class="disabled_link">$name_Hint</span> |
||
187 | !else |
||
188 | !set wims_ref_class=wims_button_help |
||
189 | !set wims_ref_id=oef_hint |
||
190 | !href cmd=hint $name_Hint |
||
191 | !endif |
||
192 | $ |
||
12257 | bpr | 193 | !endif |
194 | !if $help!=$empty |
||
13161 | bpr | 195 | !!FIXME should be in src/exec.c |
12257 | bpr | 196 | !if _exam isin $wims_session |
12293 | bpr | 197 | <span class="disabled_link">$wims_name_help</span> |
11351 | bpr | 198 | !else |
12257 | bpr | 199 | !set wims_ref_class=wims_button_help |
200 | !set wims_ref_id=oef_help |
||
201 | !href cmd=help $wims_name_help |
||
11351 | bpr | 202 | !endif |
13161 | bpr | 203 | $ |
12257 | bpr | 204 | !endif |
14429 | bpr | 205 | </div> <!-- id oef_helphint--> |
12257 | bpr | 206 | !endif |
207 | !read oef/form.phtml |
||
12293 | bpr | 208 | <div id="oef_actions"> |
15026 | obado | 209 | !if $fieldtot = 0 |
210 | <div class="oef_exo_renew"> |
||
211 | !set wims_ref_class=wims_button |
||
212 | !set wims_ref_id=oef_renew |
||
213 | !href $renewlink $name_exo_renew |
||
214 | </div> |
||
11417 | bpr | 215 | </div> |
12257 | bpr | 216 | !goto endmain |
15026 | obado | 217 | !endif |
218 | !!_check is there for examlog |
||
219 | !if _exam notin $wims_session and _check notin $wims_session |
||
220 | !if $jquery_defined=yes |
||
221 | !! Displays a Modal dialog box explaining what the "giveup" button will do. |
||
222 | <script> |
||
223 | /*<![CDATA[*/ |
||
224 | jQuery(function(jq){ |
||
225 | jq("#exo_giveup").dialog({ |
||
226 | autoOpen: false, |
||
227 | modal: true, |
||
228 | buttons: { |
||
229 | "$wims_name_yes": function() {window.location = '?session=$session&$renewlink';}, |
||
230 | "$wims_name_no": function() {jq(this).dialog("close");} |
||
231 | } |
||
232 | }); |
||
233 | jq("#exo_giveup_opener").on("click", function() { |
||
234 | jq("#exo_giveup").dialog("open"); |
||
235 | }); |
||
13841 | obado | 236 | }); |
15026 | obado | 237 | /*]]>*/ |
238 | </script> |
||
239 | <button class="wims_button wims_secondary_button" type="button" data-toggle="exo_giveup" id="exo_giveup_opener">$wims_name_giveup</button> |
||
240 | !endif jquery |
||
241 | <div class="dropdown-pane wims_msg info small" id="exo_giveup" title="$wims_name_giveup" data-dropdown> |
||
242 | <div> |
||
243 | !if $qnum>1 |
||
244 | $name_serie_giveup |
||
245 | !else |
||
246 | $name_exo_giveup |
||
247 | !endif |
||
248 | </div> |
||
249 | !if $jquery_defined!=yes |
||
250 | <div class="oef_exo_renew"> |
||
251 | !set wims_ref_class=wims_button wims_secondary_button |
||
252 | !set wims_ref_id=oef_renew |
||
253 | !href $renewlink $wims_name_giveup |
||
254 | </div> |
||
255 | !else |
||
256 | <p>$name_giveup_confirm</p> |
||
257 | !endif |
||
12257 | bpr | 258 | </div> |
15026 | obado | 259 | !endif _exam notin $wims_session |
11248 | obado | 260 | |
15026 | obado | 261 | $ |
262 | !if $qnum>1 |
||
263 | <div class="oef_serie_exo spacer"> |
||
264 | <span>$name_serie_exo</span> |
||
265 | <ul class="wims_serie_bar inline"> |
||
266 | !for j=1 to $[$reply_cnt] |
||
267 | <li class="wims_exo_done" title="$name_exo $j ($wims_name_exo_tried)">$j</li> |
||
268 | !next |
||
269 | <li class="wims_exo_todo" title="$name_exo $j">$[$reply_cnt+1]</li> |
||
270 | !for j=$[$reply_cnt+2] to $qnum |
||
271 | <li title="$name_exo $j ($wims_name_exo_untry)">$j</li> |
||
272 | !next |
||
273 | </ul> |
||
274 | </div> |
||
275 | !endif |
||
276 | </div><!-- #oef_actions --> |
||
277 | !else status=waiting |
||
12257 | bpr | 278 | !if $error!=$empty |
12293 | bpr | 279 | <div class="wims_msg alert"> |
12257 | bpr | 280 | !read oef/msg.phtml |
12293 | bpr | 281 | </div> |
12257 | bpr | 282 | !endif |
3041 | obado | 283 | |
12257 | bpr | 284 | !read oef/answer.phtml |
3041 | obado | 285 | |
12257 | bpr | 286 | !if $status!=$empty |
14429 | bpr | 287 | <div id="oef_actions"> |
288 | <div class="oef_serie_exo2 spacer">$name_serie_exo2 |
||
289 | $name_serie_new2 |
||
290 | <ul class="wims_serie_bar inline"> |
||
12257 | bpr | 291 | !for j=1 to $[$reply_cnt] |
8716 | obado | 292 | <li class="wims_exo_done" title="$name_exo $j ($wims_name_exo_tried)">$j</li> |
12257 | bpr | 293 | !next |
8716 | obado | 294 | <li class="wims_next_exo" title="$name_serie_nextexo"> |
12257 | bpr | 295 | !href cmd=next > $[$reply_cnt+1] |
8716 | obado | 296 | </li> |
12257 | bpr | 297 | !for j=$[$reply_cnt+2] to $qnum |
8716 | obado | 298 | <li title="$name_exo $j ($wims_name_exo_untry)">$j</li> |
12257 | bpr | 299 | !next |
12293 | bpr | 300 | </ul> |
14429 | bpr | 301 | </div> <!-- class oef_serie_exo2--> |
302 | <div class="oef_buttons"> |
||
12257 | bpr | 303 | !set wims_ref_class=wims_button |
304 | !set wims_ref_id=oef_serie_nextexo |
||
305 | !href cmd=next <span class="oef_serie_nextexo">$name_serie_nextexo</span> |
||
306 | !if _exam notin $wims_session |
||
307 | $wims_name_or |
||
308 | !set wims_ref_class=wims_button wims_secondary_button |
||
309 | !set wims_ref_id=oef_serie_renew |
||
310 | !if $jquery_defined=yes |
||
11507 | obado | 311 | !! Displays a Modal dialog box explaining what the "giveup" button will do. |
13841 | obado | 312 | <script> |
11507 | obado | 313 | /*<![CDATA[*/ |
11688 | obado | 314 | $$(function(jq){ |
11507 | obado | 315 | jq("#exo_giveup").dialog({ |
13841 | obado | 316 | autoOpen: false, |
317 | modal: true, |
||
318 | buttons: { |
||
319 | "$wims_name_yes": function() {window.location = '?session=$session&$renewlink';}, |
||
320 | "$wims_name_no": function() {jq(this).dialog("close");} |
||
321 | } |
||
322 | }); |
||
11507 | obado | 323 | jq("#exo_giveup_opener").on("click", function() { |
324 | jq("#exo_giveup").dialog("open"); |
||
11246 | bpr | 325 | }); |
326 | }); |
||
11507 | obado | 327 | /*]]>*/ |
328 | </script> |
||
329 | <button class="wims_button wims_secondary_button" type="button" data-toggle="exo_giveup" id="exo_giveup_opener">$wims_name_giveup</button> |
||
12257 | bpr | 330 | !endif jquery |
12293 | bpr | 331 | <div class="dropdown-pane wims_msg info small" id="exo_giveup" title="$wims_name_giveup" data-dropdown> |
332 | <p>$name_serie_giveup</p> |
||
12257 | bpr | 333 | !if $jquery_defined!=yes |
12293 | bpr | 334 | <div class="oef_exo_renew"> |
11246 | bpr | 335 | !set wims_ref_class=wims_button wims_secondary_button |
336 | !set wims_ref_id=oef_renew |
||
337 | !href $renewlink $wims_name_giveup |
||
12293 | bpr | 338 | </div> |
12257 | bpr | 339 | !endif jquery |
12293 | bpr | 340 | !endif not exam |
14429 | bpr | 341 | </div> <!-- id oef_button--> |
12293 | bpr | 342 | !else status |
14974 | bpr | 343 | <div id="oef_actions"> |
12257 | bpr | 344 | !if $qnum>1 |
345 | !set wims_ref_class=wims_button |
||
346 | !set wims_ref_id=oef_serie_renew |
||
15577 | bpr | 347 | !if $seedlastcnt < $seedrepeat and $module_score!=$empty and $module_score<9.8 |
15576 | bpr | 348 | !set tmp=$(wims_name_thsheet[14]) $[$seedlastcnt+1]/$seedrepeat |
349 | !else |
||
350 | !set tmp=$name_exo_renew |
||
351 | !endif |
||
352 | !href $renewlink <span class="oef_serie_renew">$tmp</span> |
||
10211 | bpr | 353 | $ |
12257 | bpr | 354 | !if $wims_sheet=$empty |
355 | !set wims_ref_class=wims_button wims_secondary_button |
||
356 | !set wims_ref_id=oef_exo_intro |
||
12293 | bpr | 357 | <span class="oef_exo_intro"> |
12257 | bpr | 358 | !href exo_Intro |
12293 | bpr | 359 | </span> |
10211 | bpr | 360 | $ |
12257 | bpr | 361 | !endif |
14429 | bpr | 362 | !!</div><!-- id oef_buttons ???--> |
12257 | bpr | 363 | !else qnum=1 |
14974 | bpr | 364 | <p class="renew_et_intro"> |
15574 | bpr | 365 | !if $seedlastcnt < $seedrepeat |
366 | !set tmp=$(wims_name_thsheet[14]) $[$seedlastcnt+1]/$seedrepeat |
||
367 | !else |
||
368 | !set tmp=$name_exo_renew |
||
369 | !endif |
||
12257 | bpr | 370 | !set wims_ref_class=wims_button |
371 | !set wims_ref_id=oef_renew |
||
15574 | bpr | 372 | !href $renewlink <span class="oef_exo_renew">$tmp</span> |
14974 | bpr | 373 | $ |
12257 | bpr | 374 | !if $wims_sheet=$empty and $oef_test!=yes |
375 | !set wims_ref_class=wims_button wims_secondary_button |
||
376 | !set wims_ref_id=oef_exo_intro |
||
377 | !href exo_Intro |
||
10211 | bpr | 378 | $ |
12257 | bpr | 379 | !endif |
14974 | bpr | 380 | </p> |
12257 | bpr | 381 | !endif qnum |
12293 | bpr | 382 | !endif status |
14429 | bpr | 383 | </div><!-- id oef_action--> |
1664 | bpr | 384 | !endif |
385 | |||
386 | !if $replydefaulted=yes |
||
12293 | bpr | 387 | <p id="oef_devel_mode"> |
388 | $name_devel_mode: |
||
12257 | bpr | 389 | !if $oef_default=yes |
390 | $name_devel_warning |
||
391 | !else |
||
392 | !set wims_ref_class=wims_button wims_secondary_button |
||
393 | !set wims_ref_id=oef_default |
||
394 | !href cmd=config&oef_default=yes $name_devel_insert |
||
15026 | obado | 395 | $ |
12257 | bpr | 396 | !endif |
12293 | bpr | 397 | </p> |
1664 | bpr | 398 | !endif |
15026 | obado | 399 | |
11663 | bpr | 400 | :endmain |
15026 | obado | 401 | <div id="oef_endhook"> |
402 | !read ./endhook.phtml |
||
403 | !if _exam notin $wims_session and _check notin $wims_session |
||
404 | !read oef/endhook.phtml |
||
405 | !endif |
||
406 | </div> |
||
15574 | bpr | 407 | !reset seedlastcnt |
1664 | bpr | 408 | :end |
15026 | obado | 409 | </div> <!-- .oefform --> |
410 | |||
11376 | bpr | 411 | !if $oef_anstype_css!=$empty |
14429 | bpr | 412 | <style>$oef_anstype_css</style> |
11376 | bpr | 413 | !endif |
15026 | obado | 414 | <!--fin oef Main.phtml--> |
1664 | bpr | 415 | !tail |
416 | |||
20 | reyssat | 417 | !if debug iswordof $m_oefenv |
14429 | bpr | 418 | !reset module_score |
20 | reyssat | 419 | !endif |
15574 | bpr | 420 |