Subversion Repositories wimsdev

Rev

Rev 12385 | Rev 13329 | 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.      !set wims_ref_class=wims_button_help
  145.      !set wims_ref_id=oef_hint
  146.      !href cmd=hint $name_Hint
  147. $
  148.    !endif
  149.    !if $help!=$empty
  150. !!FIXME should be in src/exec.c
  151.      !if _exam isin $wims_session
  152.        <span class="disabled_link">$wims_name_help</span>
  153.      !else
  154.        !set wims_ref_class=wims_button_help
  155.        !set wims_ref_id=oef_help
  156.        !href cmd=help $wims_name_help
  157.      !endif
  158. $
  159.    !endif
  160.    </div> <!-- id oef__helphint-->
  161.  !endif
  162.  !read oef/form.phtml
  163.  <div id="oef_actions">
  164.  !if $fieldtot = 0
  165.    <div class="oef_exo_renew">
  166.    !set wims_ref_class=wims_button
  167.    !set wims_ref_id=oef_renew
  168.    !href $renewlink $name_exo_renew
  169.    </div>
  170.  </div><!-- id oef_actions-->
  171.    !goto endmain
  172.  !endif
  173.  !!_check is there for examlog
  174.  !if _exam notin $wims_session and _check notin $wims_session
  175.    !if $jquery_defined=yes
  176.      !! Displays a Modal dialog box explaining what the "giveup" button will do.
  177.      <script type="text/javascript">
  178.      /*<![CDATA[*/
  179.        jQuery(function(jq){
  180.          jq("#exo_giveup").dialog({
  181.              autoOpen: false,
  182.              modal: true,
  183.              buttons: {
  184.                "$wims_name_yes": function() {window.location = '?session=$session&$renewlink';},
  185.                "$wims_name_no": function() {jq(this).dialog("close");}
  186.              }
  187.            });
  188.          jq("#exo_giveup_opener").on("click", function() {
  189.            jq("#exo_giveup").dialog("open");
  190.          });
  191.        });
  192.      /*]]>*/
  193.      </script>
  194.      <button class="wims_button wims_secondary_button" type="button" data-toggle="exo_giveup" id="exo_giveup_opener">$wims_name_giveup</button>
  195.    !endif jquery
  196.    <div class="dropdown-pane wims_msg info small" id="exo_giveup" title="$wims_name_giveup" data-dropdown>
  197.      <p>
  198.    !if $qnum>1
  199.      $name_serie_giveup
  200.    !else
  201.      $name_exo_giveup
  202.    !endif qnum
  203.      </p>
  204.    !if $jquery_defined!=yes
  205.      <div class="oef_exo_renew">
  206.      !set wims_ref_class=wims_button wims_secondary_button
  207.      !set wims_ref_id=oef_renew
  208.      !href $renewlink $wims_name_giveup
  209.      </div>
  210.    !else
  211.      $name_giveup_confirm
  212.    !endif jquery
  213.    </div> <!-- dropdown-->
  214.  !endif _exam notin $wims_session
  215.  
  216.  $
  217.  !if $qnum>1
  218.    <div class="oef_serie_exo spacer">
  219.    <span>$name_serie_exo</span>
  220.    <ul class="wims_serie_bar inline">
  221.    !for j=1 to $[$reply_cnt]
  222.      <li class="wims_exo_done" title="$name_exo $j ($wims_name_exo_tried)">$j</li>
  223.    !next
  224.      <li class="wims_exo_todo" title="$name_exo $j">$[$reply_cnt+1]</li>
  225.    !for j=$[$reply_cnt+2] to $qnum
  226.      <li title="$name_exo $j ($wims_name_exo_untry)">$j</li>
  227.    !next
  228.    </ul>
  229.   </div>
  230.  !endif
  231.  </div> <!-- id oef_actions-->
  232. !else
  233.  !if $error!=$empty
  234.    <div class="wims_msg alert">
  235.    !read oef/msg.phtml
  236.    </div>
  237.  !endif
  238.  
  239.  !read oef/answer.phtml
  240.  
  241.  <div id="oef_actions">
  242.  
  243.  !if $status!=$empty
  244.    <div class="oef_serie_exo2 spacer">$name_serie_exo2
  245.    $name_serie_new2
  246.    <ul class="wims_serie_bar inline">
  247.    !for j=1 to $[$reply_cnt]
  248.      <li class="wims_exo_done" title="$name_exo $j ($wims_name_exo_tried)">$j</li>
  249.    !next
  250.      <li class="wims_next_exo" title="$name_serie_nextexo">
  251.    !href cmd=next > $[$reply_cnt+1]
  252.      </li>
  253.    !for j=$[$reply_cnt+2] to $qnum
  254.      <li title="$name_exo $j ($wims_name_exo_untry)">$j</li>
  255.    !next
  256.      </ul>
  257.    </div>
  258.    <div class="oef_buttons">
  259.    !set wims_ref_class=wims_button
  260.    !set wims_ref_id=oef_serie_nextexo
  261.    !href cmd=next <span class="oef_serie_nextexo">$name_serie_nextexo</span>
  262.    !if _exam notin $wims_session
  263.      $wims_name_or
  264.      !set wims_ref_class=wims_button wims_secondary_button
  265.      !set wims_ref_id=oef_serie_renew
  266.      !if $jquery_defined=yes
  267.      !! Displays a Modal dialog box explaining what the "giveup" button will do.
  268.      <script type="text/javascript">
  269.      /*<![CDATA[*/
  270.        $$(function(jq){
  271.          jq("#exo_giveup").dialog({
  272.              autoOpen: false,
  273.              modal: true,
  274.              buttons: {
  275.                "$wims_name_yes": function() {window.location = '?session=$session&$renewlink';},
  276.                "$wims_name_no": function() {jq(this).dialog("close");}
  277.              }
  278.            });
  279.          jq("#exo_giveup_opener").on("click", function() {
  280.            jq("#exo_giveup").dialog("open");
  281.          });
  282.        });
  283.      /*]]>*/
  284.      </script>
  285.      <button class="wims_button wims_secondary_button" type="button" data-toggle="exo_giveup" id="exo_giveup_opener">$wims_name_giveup</button>
  286.      !endif jquery
  287.      <div class="dropdown-pane wims_msg info small" id="exo_giveup" title="$wims_name_giveup" data-dropdown>
  288.      <p>$name_serie_giveup</p>
  289.      !if $jquery_defined!=yes
  290.        <div class="oef_exo_renew">
  291.        !set wims_ref_class=wims_button wims_secondary_button
  292.        !set wims_ref_id=oef_renew
  293.        !href $renewlink $wims_name_giveup
  294.        </div>
  295.      !endif jquery
  296.    !endif not exam
  297.     </div>
  298.     </div>
  299.  !else status
  300.    !if $qnum>1
  301.    <span class="oef_modulescore">
  302.     $name_serie_score
  303.    </span>
  304.      !ifval $module_score>9.8
  305.       <span class="oef_congratulations">$wims_name_Congratulations</span>
  306.      !endif
  307.      !if $toolate!=$empty and $score>$module_score
  308.       <span class="oef_penalty">$name_penalty</span>
  309.      !endif
  310.      <p>
  311.      !set wims_ref_class=wims_button
  312.      !set wims_ref_id=oef_serie_renew
  313.      !href $renewlink <span class="oef_serie_renew">$name_serie_renew</span>
  314.  $
  315.      !if $wims_sheet=$empty
  316.        !set wims_ref_class=wims_button wims_secondary_button
  317.        !set wims_ref_id=oef_exo_intro
  318.        <span class="oef_exo_intro">
  319.        !href exo_Intro
  320.        </span>
  321.   $
  322.      !endif
  323.   </p>
  324.   </div><!-- id oef_buttons-->
  325.    !else qnum=1
  326.      <span class="oef_modulescore">$name_exo_score</span>
  327.      !ifval $module_score>9.8
  328.       <span class="oef_congratulations">$wims_name_Congratulations!</span>
  329.      !endif
  330.      !if $toolate!=$empty and $score>$module_score
  331.       <span class="oef_penalty">$name_penalty</span>
  332.      !endif
  333.      <p class="renew_et_intro">
  334.      !set wims_ref_class=wims_button
  335.      !set wims_ref_id=oef_renew
  336.      !href $renewlink <span class="oef_exo_renew">$name_exo_renew</span>
  337.  $
  338.      !if $wims_sheet=$empty and $oef_test!=yes
  339.        !set wims_ref_class=wims_button wims_secondary_button
  340.        !set wims_ref_id=oef_exo_intro
  341.        !href exo_Intro
  342.   $
  343.      !endif
  344.      </p>
  345.    </div><!-- id oef_actions-->
  346.    !endif qnum
  347.  !endif status
  348. !endif
  349.  
  350. !if $replydefaulted=yes
  351.  <p id="oef_devel_mode">
  352.  $name_devel_mode:
  353.  !if $oef_default=yes
  354.    $name_devel_warning
  355.  !else
  356.    !set wims_ref_class=wims_button wims_secondary_button
  357.    !set wims_ref_id=oef_default
  358.    !href cmd=config&oef_default=yes $name_devel_insert
  359. $
  360.  !endif
  361.  </p>
  362. !endif
  363. :endmain
  364. <div id="oef_endhook">
  365. !read ./endhook.phtml
  366. !read oef/endhook.phtml
  367. </div> <!-- id oef_endhook-->
  368. :end
  369. </div> <!--oefform-->
  370. <!--fin oef main.phtml-->
  371. !if $oef_anstype_css!=$empty
  372.  <style type="text/css">$oef_anstype_css</style>
  373. !endif
  374. !tail
  375.  
  376. !if debug iswordof $m_oefenv
  377. !reset module_score
  378. !endif
  379.