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