Subversion Repositories wimsdev

Rev

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