Subversion Repositories wimsdev

Rev

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