Subversion Repositories wimsdev

Rev

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