Subversion Repositories wimsdev

Rev

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