Subversion Repositories wimsdev

Rev

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