Subversion Repositories wimsdev

Rev

Rev 17468 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. <!-- adm/class/exam student.phtml START -->
  2.  
  3. !! <!--There is no help for student yet. this will hide the "help button"-->
  4. !!FIXME this should be used in oef modules where the help is sometimes inside the
  5. !! statement or after.
  6. !set module_has_help = no
  7.  
  8. !read adm/class/classname.phtml $wims_classname\
  9. $wims_institutionname
  10.  
  11. !read adm/title.phtml 1\
  12. $classname\
  13. $title
  14.  
  15. !if $wims_user=supervisor
  16.   <div class="wimscenter">($name_presentation)</div>
  17. !else
  18.   !! -------- testing if another exam is begin
  19.   !let other=!record 0 of wimshome/log/classes/$wims_class/.parmreg/$wims_user.exam
  20. !! 1 : IP 2 : session 3 : time 4 : exam
  21.   !distribute word $other into IP,ses,time,other
  22. !!  !let other=!word 4 of $other
  23.   !if $other!=$empty and $other!=$exam
  24.     !let error=other_exam $other
  25.   !else
  26.     !reset other
  27.   !endif
  28. !endif
  29.  
  30. !if $desc!=$empty and $other=$empty
  31.   <h2>$name_instructions:</h2>
  32.   <div class="exam_instructions" id="exam_desc">$desc</div>
  33. !endif
  34.  
  35. !if $error!=$empty
  36.   <div class="wims_msg alert">
  37.   !read lang/msg.phtml.$moduclass_lang
  38.   </div>
  39.   !href module=home $wims_name_back2
  40.   !tail
  41.   !exit
  42. !endif
  43.  
  44. !if $registered<0 or ($registered>0 and $wims_exam_remain<=0)
  45.   !changeto score.phtml
  46. !endif
  47.  
  48. !if $exam_mode>0
  49.   !!<div class="wims_msg info">
  50.   !!  !line $exam_mode of $name_modedesc
  51.   !!</div>
  52.   !distribute item 0,0,0 into cntexo,flag_course,coursefalse
  53.   <h2>$name_progress</h2>
  54.   !readproc examprogressbar.proc $progressbar
  55.   $wims_progressbar
  56.   !bound directexo between 1 and $exocnt default $empty
  57.   !if $directexo!=$empty
  58.     <script>
  59.       window.open("$wims_ref_name?wims_window=new&session=$(wims_session)_exam&+cmd=new&worksheet=$exam.$directexo",'wims_exam','status=no,toolbar=no,location=no,menubar=no,scrollbars=yes,resizable=yes');
  60.     </script>
  61.     !reset directexo
  62.   !endif
  63. !endif
  64.  
  65. !if $exocnt=0
  66.   $name_empty
  67. !else
  68.   <h2>$name_content</h2>
  69.   !set activeexo=0
  70.   !if $start_ip!=$empty and $start_ip!=$httpd_REMOTE_ADDR
  71.     <div class="wims_msg info">$name_warning_notstartip</div>
  72.   !endif
  73.   <ol class="wims_exam">
  74.   !for i in $(wims_exrandomlist[1;])
  75.     !increase cntexo
  76. !! ---- debut de la ligne correspondant a un exercice de l'examen
  77.    !set ex=!record $i of wimshome/log/classes/$wims_class/exams/.exam$exam
  78.    !distribute lines $ex into we,li,ti,de,op
  79.    !set de=!trim $de
  80.    !if $t_=yes and ($allowtype=simulation or $tryremain>0 or \
  81.      ($tryremain=0 and $registered!=$empty))
  82.      !!!if $exam_mode>0 and $(got$i)!=$empty
  83.      !!  !let flag_course=$[$flag_course+$(got$i)]
  84.      !!!endif
  85.      !if $(replied$i)>0
  86.        <li class="exo_item">
  87.        <span class="exo_name">$ti</span>
  88.        !if $exam_mode=0 or $(got$i)=10
  89.          - <span class="exo_done">$name_done</span>
  90.        !else
  91.          - <span>&#x274c;</span>
  92.          !set coursefalse=$cntexo
  93.        !endif
  94.        &nbsp;<span class="weight">($name_weight: $we)</span>
  95.        </li>
  96.      !else $(replied$i)=0
  97.        !if $de!=$empty
  98.          !set dt=!examdep $exam $de
  99.        !else
  100.          !set dt=yes
  101.        !endif
  102.        !if $dt=yes
  103.          !advance activeexo
  104.          <li class="exo_item">
  105.          <span class="exo_link">
  106.          !let rd=!randint 111111,999999
  107.          !href target=wims_exam cmd=new&+randomizer=$rd&+worksheet=$exam.$i $ti
  108.          </span>&nbsp;
  109.          <span class="weight">($name_weight: $we)</span>
  110.          !if autogen iswordof $op and $wims_exam_remain!=$empty
  111.            !set ss=$(wims_session)t$(exam)t$i
  112.            !set test=!defof w_cmd in wimshome/sessions/$ss/var
  113.            !if $test=$empty
  114.              !set test=$wims_ref_name?wims_window=new&+session=$(wims_session)_exam&+cmd=new&+worksheet=$exam.$i
  115.              <img src="$test" style="height:1px; width:1px">
  116.            !endif
  117.          !endif
  118.          </li>
  119.          !if $exam_mode>0
  120.            !goto endli
  121.          !endif
  122.        !else
  123.          !if $exam_mode=0
  124.            <li class="exo_item">$ti
  125.            <span>
  126.            !href cmd=reply&job=student $name_depend
  127.            </span>
  128.            </li>
  129.          !endif
  130.        !endif
  131.      !endif
  132.    !else
  133.      <span>$ti.</span>&nbsp;<span class="weight">($name_weight: $we)</span>
  134.    !endif
  135. !! -------fin d'affichage de la ligne correspondant a un exercice
  136.   !next i
  137. :endli
  138.   </ol>
  139.   <br class="spacer clearall">
  140.   !! variables
  141.   !! $stries: number of tries
  142.   !! $tryremain: number of remaining tries
  143.   !! registered: if non empty, the exam session has begun
  144.   !! exhausted: if yes, no more available sessions
  145.   !if $exam_mode>0
  146.     !if $dt=no
  147.       <div class="wims_msg alert">
  148.       $name_courseend
  149.       </div>
  150.     !endif
  151.   !endif
  152.  
  153.   !! closed exam
  154.   !if $t_=no
  155.     <p class="examclosed">$name_examclosed</p>
  156.     !set wims_menu_items=!append line refresh,1,cmd=reply&job=student to $wims_menu_items
  157.   !else
  158.     !if $wims_exam_remain!=$empty and ($exam_mode=0 or $dt=yes)
  159.       <p>$wims_name_examremain <span id="exam_clock"> </span></p>
  160. !!     !if $time_end!=$empty
  161. !!        <div class="wims_msg warning">
  162. !!        $name_exam11
  163. !!        </div>
  164. !!     !endif
  165.     !endif
  166.     !if $tryremain < $stries
  167.       <p class="exam_score"><strong>$name_bestscore</strong></p>
  168.     !endif
  169.     <div class="exam_instructions wims_msg info" id="exam_status">
  170.     !! open exam or in simulation
  171.     <p class="tries">
  172.     !if $stries=1
  173.       $name_exam1
  174.     !else
  175.       $name_exam2 $name_bestscore2
  176.     !endif
  177.     </p>
  178.     !if $tryremain<0 or ($tryremain=0 and ($registered=$empty or $allowtype=simulation))
  179.       <p>
  180.       !if $trcut=0
  181.         $name_exam3
  182.       !else
  183.         $name_exam4
  184.       !endif
  185.       $name_exam6bis
  186.       !if $stry>1
  187.         $name_exam5
  188.       !endif
  189.       !set exhausted=yes
  190.       </p>
  191.     !endif
  192.     !if $registered=$empty and $exhausted!=yes
  193.       <div>
  194.       !if $stries>1
  195.         $name_exam9.
  196.       !else
  197.         $name_exam9bis.
  198.       !endif
  199.       !if $time_end!=$empty
  200.         <div class="wims_msg warning">
  201.         $name_exam11
  202.         </div>
  203.       !endif
  204.       </div><p>
  205.       $name_exam10
  206.       !if $allowtype!=simulation and $stries>1
  207.         $name_exam7
  208.       !else only one session or simulation
  209.         $name_exam8
  210.       !endif
  211.       </p>
  212.     !else
  213.       !if $allowtype!=simulation and $tryremain=0 and $exhausted!=yes and $tries>1
  214.         <p class="lasttry">$name_lasttry</p>
  215.       !endif
  216.     !endif
  217.     !if $tryremain>0 and $stries>1
  218.       <p class="tryremain">$name_exam6</p>
  219.     !endif
  220.     </div>
  221.     !if $exhausted!=yes
  222.       !set wims_menu_items=!append line refresh,1,cmd=reply&job=student\
  223. scoreexam,1,cmd=reply&job=score \
  224. to $wims_menu_items
  225.       !if $wims_exam_remain!=$empty
  226.         !set wims_menu_items=!append line endexam,1,cmd=reply&job=scorereg\
  227. to $wims_menu_items
  228.       !endif
  229.     !endif exhausted!=yes
  230.   !endif t_=no
  231.  
  232. !endif exocnt=0
  233.  
  234. !if $t_=yes
  235.   !if $allowtype=simulation
  236.     <p class="wims_msg info simulation">$name_simulation</p>
  237.   !endif
  238. !endif
  239.  
  240. !if $wims_user=supervisor
  241.   !set wims_menu_items=!append line itemsep,0,\
  242. backteacher,1,cmd=resume\
  243. to $wims_menu_items
  244. !endif
  245.  
  246. <!-- adm/class/exam/student.phtml END -->
  247. !tail
  248.  
  249. !reset job
  250.