Subversion Repositories wimsdev

Rev

Rev 17216 | Rev 17410 | 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 $timeleft<=0)
  45.   !changeto score.phtml
  46. !endif
  47.  
  48. !if $exocnt=0
  49.   $name_empty
  50. !else
  51.   <h2>$name_content</h2>
  52.   !set activeexo=0
  53.   !if $start_ip!=$empty and $start_ip!=$httpd_REMOTE_ADDR
  54.     <div class="wims_msg info">$name_warning_notstartip</div>
  55.   !endif
  56.   <ol class="wims_exam">
  57.   !for i in $(wims_exrandomlist[1;])
  58.     <li class="exo_item">
  59. !! -------------------------- debut de la ligne correspondant a un exercice de l'examen
  60.  
  61.    !set ex=!record $i of wimshome/log/classes/$wims_class/exams/.exam$exam
  62.    !distribute lines $ex into we,li,ti,de,op
  63.    !set de=!trim $de
  64.    !if $t_=yes and ($allowtype=simulation or $tryremain>0 or \
  65.      ($tryremain=0 and $registered!=$empty))
  66.      !if $(replied$i)>0
  67.        <span class="exo_name">$ti </span> - <span class="exo_done">$name_done</span>
  68.        &nbsp;<span class="weight">($name_weight: $we)</span>
  69.      !else
  70.        !if $de!=$empty
  71.          !set dt=!examdep $exam $de
  72.        !else
  73.          !set dt=yes
  74.        !endif
  75.        !if $dt=yes
  76.          !advance activeexo
  77.          <span class="exo_link">
  78.          !href target=wims_exam cmd=new&worksheet=$exam.$i $ti
  79.          </span>&nbsp;
  80.          <span class="weight">($name_weight: $we)</span>
  81.          !if autogen iswordof $op and $wims_exam_remain!=$empty
  82.            !set ss=$(wims_session)t$(exam)t$i
  83.            !set test=!defof w_cmd in wimshome/sessions/$ss/var
  84.            !if $test=$empty
  85.              !set test=$wims_ref_name?wims_window=new&+session=$(wims_session)_exam&+cmd=new&+worksheet=$exam.$i
  86.              <img src="$test" style="height:1px; width:1px">
  87.            !endif
  88.          !endif
  89.        !else
  90.          <span class="wims_emph">$ti</span>
  91.          <span>
  92.          !href cmd=reply&job=student $name_depend
  93. .
  94.          </span>
  95.        !endif
  96.      !endif
  97.    !else
  98.      <span>$ti.</span>&nbsp;<span class="weight">($name_weight: $we)</span>
  99.    !endif
  100. !! -------fin d'affichage de la ligne correspondant a un exercice
  101.      </li>
  102.   !next i
  103.   </ol>
  104.   <br class="spacer clearall">
  105.   !! variables
  106.   !! $stries: number of tries
  107.   !! $tryremain: number of remaining tries
  108.   !! registered: if non empty, the exam session has begun
  109.   !! exhausted: if yes, no more available sessions
  110.  
  111.   !! closed exam
  112.   !if $t_=no
  113.     <p class="examclosed">$name_examclosed</p>
  114.     !set wims_menu_items=!append line refresh,1,cmd=reply&job=student to $wims_menu_items
  115.   !else
  116.     !if $tryremain < $stries
  117.       <p class="exam_score"><strong>$name_bestscore</strong></p>
  118.     !endif
  119.     <div class="exam_instructions wims_msg info" id="exam_status">
  120.     !! open exam or in simulation
  121.     <p class="tries">
  122.     !if $stries=1
  123.       $name_exam1
  124.     !else
  125.       $name_exam2 $name_bestscore2
  126.     !endif
  127.     </p>
  128.     !if $tryremain<0 or ($tryremain=0 and ($registered=$empty or $allowtype=simulation))
  129.       <p>
  130.       !if $trcut=0
  131.         $name_exam3
  132.       !else
  133.         $name_exam4
  134.       !endif
  135.       $name_exam6bis
  136.       !if $stry>1
  137.         $name_exam5
  138.       !endif
  139.       !set exhausted=yes
  140.       </p>
  141.     !endif
  142.     !if $wims_exam_remain!=$empty
  143.       !set wims_hr_r=$[max(0,$wims_exam_remain)]
  144.       !set wims_hr_rm=$[floor($wims_hr_r/60)]
  145.       !set wims_hr_rs=!char 2,3 of $[$wims_hr_r%60+100]
  146.       <p id="exam_clock">$wims_name_examremain $wims_hr_rm:$wims_hr_rs.</p>
  147.       !if yes iswordof $warning
  148.         <div class="wims_msg warning">
  149.         $name_exam11
  150.         </div>
  151.       !endif
  152.     !endif
  153.     !if $registered=$empty and $exhausted!=yes
  154.       <div>
  155.       !if $stries>1
  156.         $name_exam9.
  157.       !else
  158.         $name_exam9bis.
  159.       !endif
  160.       !if yes iswordof $warning
  161.         <div class="wims_msg warning">
  162.         $name_exam11
  163.         </div>
  164.       !endif
  165.       </div>
  166.       $name_exam10
  167.  
  168.       !if $allowtype!=simulation and $stries>1
  169.         $name_exam7
  170.       !else only one session or simulation
  171.         $name_exam8
  172.       !endif
  173.       </p>
  174.     !else
  175.       !if $allowtype!=simulation and $tryremain=0 and $exhausted!=yes and $tries>1
  176.         <p class="lasttry">$name_lasttry</p>
  177.       !endif
  178.     !endif
  179.     !if $tryremain>0 and $stries>1
  180.       <p class="tryremain">$name_exam6</p>
  181.     !endif
  182.     </div>
  183.     !if $exhausted!=yes
  184.       !set wims_menu_items=!append line refresh,1,cmd=reply&job=student   \
  185. scoreexam,1,cmd=reply&job=score \
  186. to $wims_menu_items
  187.       !if $wims_exam_remain!=$empty
  188.         !set wims_menu_items=!append line endexam,1,cmd=reply&job=scorereg\
  189. to $wims_menu_items
  190.       !endif
  191.     !endif exhausted!=yes
  192.   !endif t_=no
  193.  
  194. !endif exocnt=0
  195.  
  196. !if $t_=yes
  197.   !if $allowtype=simulation
  198.     <p class="wims_msg info simulation">$name_simulation</p>
  199.   !endif
  200. !endif
  201.  
  202. !if $wims_user=supervisor
  203.   !set wims_menu_items=!append line itemsep,0,\
  204. backteacher,1,cmd=resume\
  205. to $wims_menu_items
  206. !endif
  207.  
  208. <!-- adm/class/exam/student.phtml END -->
  209. !tail
  210.  
  211. !reset job
  212.