Subversion Repositories wimsdev

Rev

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