Subversion Repositories wimsdev

Rev

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