Subversion Repositories wimsdev

Rev

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