Subversion Repositories wimsdev

Rev

Rev 11688 | Rev 12256 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. !nocache
  2. !! Pendant la creation via Createxo, c'est le module adm/createxo qui appelle ce fichier.
  3.  
  4. !if $oef_test=yes
  5.  !set renewlink=cmd=next&retest=again
  6.  !!$header_js
  7.  !goto tester
  8. !else
  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 $\
  21. $ by ; in $init_parm
  22.  !set renewlink=cmd=renew&worksheet=$worksheet&$init_parm
  23. !endif
  24.  
  25. !if $(title_$lang)!=$empty
  26.  !set title=$(title_$lang)
  27. !endif
  28. !if $(title_$lang_choice)!=$empty
  29.  !set title=$(title_$lang_choice)
  30. !endif
  31. !!define the content of the balise title in the header.
  32. !default module_title2=!detag $title
  33.  
  34. !if $printing=yes
  35. !changeto oef/print.phtml
  36. !endif
  37.  
  38. !if $title!=$empty
  39. !set module_title=$title
  40. !set module_author=$author
  41. !set module_address=$email
  42. !endif
  43.  
  44. !if 0$delay2>0 and $status!=$empty
  45. !set now_=$wims_nowseconds
  46. !read js/chrono.phtml $[max(0,$delay1-($now_-$starttime))]
  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.  
  51. !if $wims_class!= and $class_css=yes
  52.  !set wims_html_header=!append line <link href="$wims_ref_name?session=$session&+cmd=getfile&+special_parm=css.css" rel="stylesheet" type="text/css" />\
  53. to $wims_html_header
  54. !endif
  55. !header1
  56.  
  57. !default wims_exotitleform=0
  58.  
  59. <h1 class="oeftitle">
  60. !if _exam notin $wims_session
  61. !if $wims_exo!=$empty
  62.  !if $wims_exotitleform>0
  63.   !if $wims_exotitleform=1
  64.    $wims_name_sheet $wims_sheet - $wims_name_Serie $wims_exo
  65.   !else
  66.    $wims_sheettitle
  67.    <br/>
  68.    !if $wims_exotitleform=2
  69.     $wims_name_Serie $wims_exo
  70.    !else
  71.     $(wims_exotitle[$wims_exo])
  72.    !endif
  73.   !endif
  74.  !else
  75.   !if $wims_exotitleform=0
  76.    $title
  77.   !endif
  78.  !endif
  79. !else
  80.  $title
  81. !endif
  82. !else _exam isin $wims_session
  83. $worksheet
  84. !endif
  85. </h1>
  86. !if $module_checkdata!=yes
  87. !read oef/$modu_lang/nodata.phtml
  88. !goto end
  89. !endif
  90.  
  91. !if $title=$empty
  92.  $name_emptytitle
  93.  <p class="wimscenter">
  94.    !set wims_ref_class=wims_button
  95.    !href module=$module $name_restart
  96.    $wims_name_or
  97.    !set wims_ref_class=wims_button
  98.    !href $ $wims_name_giveup
  99.  </p>
  100.  <div class="wims_msg info small">$name_exo_giveup</div>
  101.  !goto end
  102. !endif
  103.  
  104. !if 0$delay1>0 and $status!=$empty
  105. <form target="#" name="chrono">
  106. <table class="wimsborder wimscenter" style="border:3px solid $wims_ref_bgcolor">
  107. <tr><td><span class="wims_warning">$wims_name_warning!</span>
  108. !if $qnum>1
  109.  $name_serie_limit
  110. !else
  111.  $name_exo_limit
  112. !endif
  113. <input size="4" name="clock" readonly="readonly" onfocus="this.blur();"/>
  114. </td></tr></table>
  115. </form>
  116. !endif
  117.  
  118. :tester
  119. !read oef/present.phtml
  120.  
  121. !if $wims_theme_version= or $wims_theme_version<1
  122. <hr style="width:50%"/>
  123. !endif
  124.  
  125. !if $cmd=hint
  126. !read oef/hint.phtml
  127. !goto end
  128. !endif
  129.  
  130. !if $status=waiting
  131. !if $error!=$empty
  132.  <div class="wims_msg alert">
  133.  !read oef/msg.phtml
  134.  </div>
  135. !endif
  136. !if ($hint!=$empty and $givehint>0) or $help!=$empty
  137.   <div id="oef_helphint">
  138.   !if $hint!=$empty and $givehint>0
  139.    !set wims_ref_class=wims_button_help
  140.    !set wims_ref_id=oef_hint
  141.    !href cmd=hint $name_Hint
  142. $
  143.     !endif
  144.     !if $help!=$empty
  145. !!FIXME should be in src/exec.c
  146.       !if _exam isin $wims_session
  147.     <span class="disabled_link">$wims_name_help</span>
  148.      !else
  149.     !set wims_ref_class=wims_button_help
  150.     !set wims_ref_id=oef_help
  151.     !href cmd=help $wims_name_help
  152.      !endif
  153. $
  154.   !endif
  155.  </div> <!-- id oef__helphint-->
  156. !endif
  157. !read oef/form.phtml
  158. <div id="oef_actions">
  159. !if $fieldtot = 0
  160.    <div class="oef_exo_renew">
  161.      !set wims_ref_class=wims_button
  162.      !set wims_ref_id=oef_renew
  163.      !href $renewlink $name_exo_renew
  164.    </div>
  165.  </div><!-- id oef_action-->
  166.  !goto endmain
  167. !endif
  168. !!_check is there for examlog
  169. !if _exam notin $wims_session and _check notin $wims_session
  170.    !if $jquery_defined=yes
  171.      !! Displays a Modal dialog box explaining what the "giveup" button will do.
  172.      <script type="text/javascript">
  173.      /*<![CDATA[*/
  174.        jQuery(function(jq){
  175.          jq("#exo_giveup").dialog({
  176.              autoOpen: false,
  177.              modal: true,
  178.              buttons: {
  179.                "$wims_name_yes": function() {window.location = '?session=$session&$renewlink';},
  180.                "$wims_name_no": function() {jq(this).dialog("close");}
  181.              }
  182.            });
  183.          jq("#exo_giveup_opener").on("click", function() {
  184.            jq("#exo_giveup").dialog("open");
  185.          });
  186.        });
  187.      /*]]>*/
  188.      </script>
  189.      <button class="wims_button wims_secondary_button" type="button" data-toggle="exo_giveup" id="exo_giveup_opener">$wims_name_giveup</button>
  190.    !endif jquery
  191.    <div class="dropdown-pane wims_msg info small" id="exo_giveup" title="$wims_name_giveup" data-dropdown>
  192.      <p>
  193.      !if $qnum>1
  194.         $name_serie_giveup
  195.      !else
  196.         $name_exo_giveup
  197.      !endif qnum
  198.      </p>
  199.      !if $jquery_defined!=yes
  200.        <div class="oef_exo_renew">
  201.          !set wims_ref_class=wims_button wims_secondary_button
  202.          !set wims_ref_id=oef_renew
  203.          !href $renewlink $wims_name_giveup
  204.        </div>
  205.      !else
  206.        $name_giveup_confirm
  207.      !endif jquery
  208.    </div>
  209.  !endif _exam notin $wims_session
  210.  
  211.  $
  212.  !if $qnum>1
  213.   <div class="oef_serie_exo spacer">
  214.   <span>$name_serie_exo</span>
  215.    <ul class="wims_serie_bar inline">
  216.    !for j=1 to $[$reply_cnt]
  217.      <li class="wims_exo_done" title="$name_exo $j ($wims_name_exo_tried)">$j</li>
  218.    !next
  219.      <li class="wims_exo_todo" title="$name_exo $j">$[$reply_cnt+1]</li>
  220.    !for j=$[$reply_cnt+2] to $qnum
  221.      <li title="$name_exo $j ($wims_name_exo_untry)">$j</li>
  222.    !next
  223.    </ul>
  224.  </div>
  225.  !endif
  226. </div> <!-- id oef_action-->
  227. !else
  228. !if $error!=$empty
  229. <div class="wims_msg alert">
  230.  !read oef/msg.phtml
  231. </div>
  232. !endif
  233.  
  234. !read oef/answer.phtml
  235.  
  236. <div id="oef_actions">
  237.  
  238. !if $status!=$empty
  239.  <div class="oef_serie_exo2 spacer">$name_serie_exo2
  240.    $name_serie_new2
  241.    <ul class="wims_serie_bar inline">
  242.     !for j=1 to $[$reply_cnt]
  243.      <li class="wims_exo_done" title="$name_exo $j ($wims_name_exo_tried)">$j</li>
  244.     !next
  245.      <li class="wims_next_exo" title="$name_serie_nextexo">
  246.       !href cmd=next > $[$reply_cnt+1]
  247.      </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.  <div class="oef_buttons">
  254.  !set wims_ref_class=wims_button
  255.  !set wims_ref_id=oef_serie_nextexo
  256.  !href cmd=next <span class="oef_serie_nextexo">$name_serie_nextexo</span>
  257.  !if _exam notin $wims_session
  258.    $wims_name_or
  259.    !set wims_ref_class=wims_button wims_secondary_button
  260.    !set wims_ref_id=oef_serie_renew
  261.    !if $jquery_defined=yes
  262.      !! Displays a Modal dialog box explaining what the "giveup" button will do.
  263.      <script type="text/javascript">
  264.      /*<![CDATA[*/
  265.        $$(function(jq){
  266.          jq("#exo_giveup").dialog({
  267.              autoOpen: false,
  268.              modal: true,
  269.              buttons: {
  270.                "$wims_name_yes": function() {window.location = '?session=$session&$renewlink';},
  271.                "$wims_name_no": function() {jq(this).dialog("close");}
  272.              }
  273.            });
  274.          jq("#exo_giveup_opener").on("click", function() {
  275.            jq("#exo_giveup").dialog("open");
  276.          });
  277.        });
  278.      /*]]>*/
  279.      </script>
  280.      <button class="wims_button wims_secondary_button" type="button" data-toggle="exo_giveup" id="exo_giveup_opener">$wims_name_giveup</button>
  281.    !endif jquery
  282.    <div class="dropdown-pane wims_msg info small" id="exo_giveup" title="$wims_name_giveup" data-dropdown>
  283.    <p>$name_serie_giveup</p>
  284.     !if $jquery_defined!=yes
  285.      <div class="oef_exo_renew">
  286.        !set wims_ref_class=wims_button wims_secondary_button
  287.        !set wims_ref_id=oef_renew
  288.        !href $renewlink $wims_name_giveup
  289.      </div>
  290.     !endif jquery
  291.   !endif exam
  292.   </div>
  293. !else
  294.  !if $qnum>1
  295.   <span class="oef_modulescore">
  296.     $name_serie_score
  297.   </span>
  298.   !ifval $module_score>9.8
  299.     <span class="oef_congratulations">$wims_name_Congratulations</span>
  300.   !endif
  301.   !if $toolate!=$empty and $score>$module_score
  302.     <span class="oef_penalty">$name_penalty</span>
  303.   !endif
  304.   <p>
  305.   !set wims_ref_class=wims_button
  306.   !set wims_ref_id=oef_serie_renew
  307.   !href $renewlink <span class="oef_serie_renew">$name_serie_renew</span>
  308.  $
  309.   !if $wims_sheet=$empty
  310.    !set wims_ref_class=wims_button wims_secondary_button
  311.    !set wims_ref_id=oef_exo_intro
  312.    <span class="oef_exo_intro">
  313.    !href exo_Intro
  314.    </span>
  315.   $
  316.   !endif
  317.   </p>
  318.  !else
  319.   <span class="oef_modulescore">$name_exo_score</span>
  320.   !ifval $module_score>9.8
  321.    <span class="oef_congratulations">$wims_name_Congratulations!</span>
  322.   !endif
  323.   !if $toolate!=$empty and $score>$module_score
  324.    <span class="oef_penalty">$name_penalty</span>
  325.   !endif
  326.   <p class="renew_et_intro">
  327.   !set wims_ref_class=wims_button
  328.   !set wims_ref_id=oef_renew
  329.   !href $renewlink <span class="oef_exo_renew">$name_exo_renew</span>
  330.  $
  331.   !if $wims_sheet=$empty and $oef_test!=yes
  332.    !set wims_ref_class=wims_button wims_secondary_button
  333.    !set wims_ref_id=oef_exo_intro
  334.    !href exo_Intro
  335.   $
  336.   !endif
  337.   </p>
  338.  !endif
  339. !endif
  340. </div><!-- id oef_action-->
  341. !endif
  342.  
  343. !if $replydefaulted=yes
  344. <p id="oef_devel_mode">
  345. $name_devel_mode:
  346. !if $oef_default=yes
  347.  $name_devel_warning
  348. !else
  349.  !set wims_ref_class=wims_button wims_secondary_button
  350.  !set wims_ref_id=oef_default
  351.  !href cmd=config&oef_default=yes $name_devel_insert
  352. $
  353. !endif
  354. </p>
  355. !endif
  356. :endmain
  357. <div id="oef_endhook">
  358. !read ./endhook.phtml
  359. </div> <!-- id oef_endhook-->
  360. :end
  361. </div> <!--oefform-->
  362. <!--fin oef main.phtml-->
  363. !if $oef_anstype_css!=$empty
  364.  <style type="text/css">$oef_anstype_css</style>
  365. !endif
  366. !tail
  367.  
  368. !if debug iswordof $m_oefenv
  369. !reset module_score
  370. !endif
  371.