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