Subversion Repositories wimsdev

Rev

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