Subversion Repositories wimsdev

Rev

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