Subversion Repositories wimsdev

Rev

Rev 17412 | Rev 17432 | 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 $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.     <li class="exo_item">
  77. !! -------------------------- debut de la ligne correspondant a un exercice de l'examen
  78.  
  79.    !set ex=!record $i of wimshome/log/classes/$wims_class/exams/.exam$exam
  80.    !distribute lines $ex into we,li,ti,de,op
  81.    !set de=!trim $de
  82.    !if $t_=yes and ($allowtype=simulation or $tryremain>0 or \
  83.      ($tryremain=0 and $registered!=$empty))
  84.      !if $exam_mode>0 and $(got$i)!=$empty
  85.        !let flag_course=$[$flag_course+$(got$i)]
  86.      !endif
  87.      !if $(replied$i)>0 or ($flag_course<10*($cntexo-1) and $exam_mode>0)
  88.        <span class="exo_name">$ti </span>
  89.        !if $(replied$i)>0
  90.          !if $exam_mode=0 or $(got$i)=10
  91.            - <span class="exo_done">$name_done</span>
  92.          !else
  93.            - <span>&#x274c;</span>
  94.            !set coursefalse=$cntexo
  95.          !endif
  96.        !endif
  97.        &nbsp;<span class="weight">($name_weight: $we)</span>
  98.      !else
  99.        !if $de!=$empty
  100.          !set dt=!examdep $exam $de
  101.        !else
  102.          !set dt=yes
  103.        !endif
  104.        !if $dt=yes
  105.          !advance activeexo
  106.          <span class="exo_link">
  107.          !href target=wims_exam cmd=new&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.        !else
  119.          <span class="wims_emph">$ti</span>
  120.          <span>
  121.          !href cmd=reply&job=student $name_depend
  122. .
  123.          </span>
  124.        !endif
  125.      !endif
  126.    !else
  127.      <span>$ti.</span>&nbsp;<span class="weight">($name_weight: $we)</span>
  128.    !endif
  129. !! -------fin d'affichage de la ligne correspondant a un exercice
  130.      </li>
  131.   !next i
  132.   </ol>
  133.   <br class="spacer clearall">
  134.   !! variables
  135.   !! $stries: number of tries
  136.   !! $tryremain: number of remaining tries
  137.   !! registered: if non empty, the exam session has begun
  138.   !! exhausted: if yes, no more available sessions
  139.  
  140.   !if $exam_mode>0 and $coursefalse!=0
  141.     <div class="wims_msg alert">
  142.       $name_courseend
  143.     </div>
  144.   !endif
  145.  
  146.   !! closed exam
  147.   !if $t_=no
  148.     <p class="examclosed">$name_examclosed</p>
  149.     !set wims_menu_items=!append line refresh,1,cmd=reply&job=student to $wims_menu_items
  150.   !else
  151.     !if $tryremain < $stries
  152.       <p class="exam_score"><strong>$name_bestscore</strong></p>
  153.     !endif
  154.     <div class="exam_instructions wims_msg info" id="exam_status">
  155.     !! open exam or in simulation
  156.     <p class="tries">
  157.     !if $stries=1
  158.       $name_exam1
  159.     !else
  160.       $name_exam2 $name_bestscore2
  161.     !endif
  162.     </p>
  163.     !if $tryremain<0 or ($tryremain=0 and ($registered=$empty or $allowtype=simulation))
  164.       <p>
  165.       !if $trcut=0
  166.         $name_exam3
  167.       !else
  168.         $name_exam4
  169.       !endif
  170.       $name_exam6bis
  171.       !if $stry>1
  172.         $name_exam5
  173.       !endif
  174.       !set exhausted=yes
  175.       </p>
  176.     !endif
  177.     !if $wims_exam_remain!=$empty
  178. !!      !set wims_hr_r=$[max(0,$wims_exam_remain)]
  179. !!      !set wims_hr_rm=$[floor($wims_hr_r/60)]
  180. !!      !set wims_hr_rs=!char 2,3 of $[$wims_hr_r%60+100]
  181.       <p> $wims_name_examremain <span id="exam_clock">
  182. !!$wims_hr_rm:$wims_hr_rs.
  183.       </span></p>
  184. !!record 0 of wimshome/public_html/scripts/js/chronoid.js
  185. !!      <script>clockid($wims_exam_remain,"exam_clock");</script>
  186.       !if yes iswordof $warning
  187.         <div class="wims_msg warning">
  188.         $name_exam11
  189.         </div>
  190.       !endif
  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 yes iswordof $warning
  200.         <div class="wims_msg warning">
  201.         $name_exam11
  202.         </div>
  203.       !endif
  204.       </div>
  205.       $name_exam10
  206.  
  207.       !if $allowtype!=simulation and $stries>1
  208.         $name_exam7
  209.       !else only one session or simulation
  210.         $name_exam8
  211.       !endif
  212.       </p>
  213.     !else
  214.       !if $allowtype!=simulation and $tryremain=0 and $exhausted!=yes and $tries>1
  215.         <p class="lasttry">$name_lasttry</p>
  216.       !endif
  217.     !endif
  218.     !if $tryremain>0 and $stries>1
  219.       <p class="tryremain">$name_exam6</p>
  220.     !endif
  221.     </div>
  222.     !if $exhausted!=yes
  223.       !set wims_menu_items=!append line refresh,1,cmd=reply&job=student   \
  224. scoreexam,1,cmd=reply&job=score \
  225. to $wims_menu_items
  226.       !if $wims_exam_remain!=$empty
  227.         !set wims_menu_items=!append line endexam,1,cmd=reply&job=scorereg\
  228. to $wims_menu_items
  229.       !endif
  230.     !endif exhausted!=yes
  231.   !endif t_=no
  232.  
  233. !endif exocnt=0
  234.  
  235. !if $t_=yes
  236.   !if $allowtype=simulation
  237.     <p class="wims_msg info simulation">$name_simulation</p>
  238.   !endif
  239. !endif
  240.  
  241. !if $wims_user=supervisor
  242.   !set wims_menu_items=!append line itemsep,0,\
  243. backteacher,1,cmd=resume\
  244. to $wims_menu_items
  245. !endif
  246.  
  247. <!-- adm/class/exam/student.phtml END -->
  248. !tail
  249.  
  250. !reset job
  251.