Subversion Repositories wimsdev

Rev

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