Subversion Repositories wimsdev

Rev

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