Subversion Repositories wimsdev

Rev

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