Subversion Repositories wimsdev

Rev

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