Subversion Repositories wimsdev

Rev

Rev 11248 | Rev 11351 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

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