Subversion Repositories wimsdev

Rev

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