Subversion Repositories wimsdev

Rev

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

  1. !! Class participant page theme.
  2. !nocache
  3. !if $module!=home
  4.  !exit
  5. !endif
  6.  
  7. !set home_theme=yes
  8. !set percents=!getscorepercent
  9. !set class_homepage=!getdef class_homepage in wimshome/log/classes/$wims_class/.def
  10. !set etest=!record 0 of wimshome/log/classes/$wims_class/.parmreg/$wims_user.exam
  11. !set n_=!wordcnt $etest
  12.  
  13. !if / isin $class_homepage and _tool notin $wims_session
  14.  !set deffile=wimshome/log/classes/$wims_class/doc/$class_homepage.def
  15.  !set t_=!getdef titb in $deffile
  16.  !if $t_=$empty or $n_>=4
  17.   !goto normal
  18.  !endif
  19.  !read ./userhome.phtml
  20.  !goto end
  21. !endif
  22.  
  23. :normal
  24. !read classlogo.phtml
  25. <center> <br> <br>
  26. <b><font size=+2>$wims_classname</font></b>
  27. <br>
  28. !if $wims_superclass=$empty or $wims_superclass=$wims_class
  29.  $wims_institutionname
  30. !else
  31.  !href module=adm/class/classes&type=authparticipant&class=$wims_superclass&auth_user=$wims_user $wims_institutionname
  32.   !if / isin $class_parent and $class_type=1
  33.   !set pname=!defof class_description in wimshome/log/classes/$class_parent/.def
  34.   /
  35.   !href module=adm/class/classes&type=authparticipant&class=$class_parent&auth_user=$wims_user $pname
  36.  !endif
  37. !endif
  38. </center>
  39. <br clear=all> <br></div><div class=wimsbody>
  40.  
  41. !if _tool isin $wims_session
  42.  !read ./tools.phtml
  43.  !goto end
  44. !endif
  45.  
  46. !set supmail=!mailurl $wims_supervisormail $wims_supervisor
  47.  
  48. !if $n_>=4
  49.  !distribute words $etest into h_,s_,t_,n_
  50.  !set r_=!record 0 of wimshome/sessions/$s_/examreg.$n_
  51.  !set now=$wims_nowseconds
  52.  !set ws=!translate _ to $ $ in $wims_session
  53.  !set ws=!word 1 of $ws
  54.  !set sm=!record 0 of wimshome/log/classes/$wims_class/.E$n_
  55.  !if $r_!=$empty and $s_!=$ws and $t_>$now and $sm!=#
  56.  $U_examworking
  57.   !if $h_=$httpd_REMOTE_ADDR
  58.    !href session=$s_&module=adm/class/exam.$lang&job=student&exam=$n_ $U_examcont
  59.   !else
  60.    $U_examdouble
  61.    !sh rm -f ../sessions/$ws/var.stat >/dev/null
  62.   !endif
  63.   !goto end
  64.  !endif
  65.  !if $t_<$now or $r_=$empty
  66.   !writefile wimshome/log/classes/$wims_class/.parmreg/$wims_user.exam
  67.  !endif
  68. !endif
  69.  
  70. $U_greet
  71. <small>
  72. !if $class_type isin 234
  73.  !href module=adm/class/userlist&job=userprop $U_account
  74.  &nbsp;
  75. !endif
  76. !href target=wims_help module=help/main&chapter=3 $N_help
  77. </small>
  78.  
  79. !if & isin $newmsgcnt or $newmsgcnt>0
  80.  <br>
  81.  !href module=adm/forum/mboard $U_newmsg
  82. !endif
  83.  
  84. <p>
  85.  
  86. !read ./wimshome/log/classes/$wims_class/.motd
  87. <p>
  88. !if $class_type>=2
  89.  !read ./subclasses.phtml
  90.  !set is_interclass=yes
  91. !endif
  92.  
  93. !set dcnt=!recordcnt wimshome/log/classes/$wims_class/doc/.index
  94. !for i=1 to $dcnt
  95.  !set d_=!record $i of wimshome/log/classes/$wims_class/doc/.index
  96.  !distribute lines $d_ into s_,t_,a_,e_,c_,o_
  97.  !if $o_>0
  98.   !set ds_list=!append line $s_ to $ds_list
  99.   !set dt_list=!append line $t_ to $dt_list
  100.  !endif
  101. !next i
  102. !set dcnt=!linecnt $ds_list
  103. !set t=!recordcnt wimshome/log/classes/$wims_class/sheets/.sheets
  104. !set aclist=
  105. !for i=1 to $t
  106.  !set s_$i=!record $i of wimshome/log/classes/$wims_class/sheets/.sheets
  107.  !set a_=!line 1 of $(s_$i)
  108.  !if $a_>=1 and $a_<=2
  109.   !set aclist=!append item $i to $aclist
  110.  !endif
  111. !next i
  112. !set n=!itemcnt $aclist
  113. !set t=!recordcnt wimshome/log/classes/$wims_class/exams/.exams
  114. !set aelist=
  115. !for i=1 to $t
  116.  !set e_$i=!record $i of wimshome/log/classes/$wims_class/exams/.exams
  117.  !set a_=!line 1 of $(e_$i)
  118.  !if $a_>=1 and $a_<=2
  119.   !set aelist=!append item $i to $aelist
  120.  !endif
  121. !next i
  122. !set m=!itemcnt $aelist
  123. !set t=!recordcnt wimshome/log/classes/$wims_class/vote/.votes
  124. !set avlist=
  125. !for i=1 to $t
  126.  !set v_$i=!record $i of wimshome/log/classes/$wims_class/vote/.votes
  127.  !set a_=!line 1 of $(v_$i)
  128.  !if $a_>=1 and $a_<=2
  129.   !set avlist=!append item $i to $avlist
  130.  !endif
  131. !next i
  132. !set v=!itemcnt $avlist
  133.  
  134. !ifval $dcnt+$n+$m+$v=0
  135.  !if $is_interclass!=yes
  136.  $U_nosheet
  137.  !endif
  138. !else
  139.  !if $is_interclass!=yes
  140.  $U_assign
  141.  !href module=adm/class/userlist.$lang $U_myscore
  142. . <br>
  143.  !endif
  144.  <table border=0>
  145.  !for i=1 to $dcnt
  146.   !set s_=!line $i of $ds_list
  147.   !set t_=!line $i of $dt_list
  148.   <tr><td>&nbsp;&nbsp;<td>$U_Doc<td>
  149.   !href module=adm/doc.$lang?job=read&doc=$s_&block=main $t_
  150.  !next i
  151.  !for i=1 to $n
  152.   !set se=!item $i of $aclist
  153.   !distribute lines $(s_$se) into ac,t_,ti,de
  154.   <tr><td>&nbsp;&nbsp;<td>$U_Sheet $se. <td>
  155.   !href module=adm/sheet&sh=$se $ti
  156.   !if $ac>=2
  157.    ($U_expired)
  158.   !else
  159.    !if showshexpire iswordof $class_option
  160.     !read misc/expire.phtml.$lang $t_
  161.    !endif
  162.   !endif
  163.   !set pe=!line $se of $percents
  164.   !set p1=!word 1 of $pe
  165.   !set p2=!word 2 of $pe
  166.   !if $p1!=$empty
  167.    ($p1% $U_done, $U_average $[$p2]/10)
  168.   !endif
  169.  !next i
  170.  !for i=1 to $m
  171.   !set se=!item $i of $aelist
  172.   !distribute lines $(e_$se) into ac,t_,s_,ti,de
  173.   <tr><td>&nbsp;&nbsp;<td>$U_Exam $se. <td>
  174.   !href module=adm/class/exam&job=student&exam=$se $ti
  175.   !if $ac>=2
  176.    ($U_expired)
  177.   !else
  178.    !if showexexpire iswordof $class_option
  179.     !read misc/expire.phtml.$lang $t_
  180.    !endif
  181.   !endif
  182.  !next i
  183.  !for i=1 to $v
  184.   !set sv=!item $i of $avlist
  185.   !distribute lines $(v_$sv) into ac,ti
  186.   <tr><td>&nbsp;&nbsp;<td>$U_Vote <td>
  187.   !href module=adm/vote&job=read&vote=$sv $ti
  188.   !if $ac>=2
  189.    ($U_expired)
  190.   !endif
  191.  !next i
  192.  </table> <p>
  193. !endif
  194.  
  195. :endbar
  196. <p><CENTER>
  197. <table width=99% border=0 cellspacing=0 cellpadding=3 bgcolor=$wims_ref_bgcolor>
  198. <tr><td align=left width=33%>&nbsp;&nbsp;
  199. !href module=adm/class/classes&type=participant $U_oclass
  200. <br>&nbsp;&nbsp;
  201. !href cmd=close&module=home $V_Quit
  202. </td><td align=center width=33%>
  203. !if $exist_cdt=yes
  204.   !href module=adm/class/cdt $U_cdt
  205.   &nbsp; / &nbsp;
  206. !endif
  207. !href module=adm/forum/mboard $N_Mboard
  208. <br>
  209. !mailurl $wims_supervisormail $V_Wsup
  210. </td><td align=right width=33%>
  211. !href module=adm/light&phtml=useropts.phtml.$lang $V_Chpref
  212. &nbsp;&nbsp;<br>
  213. !href module=adm/class/passwd $V_Chpass
  214. &nbsp;&nbsp;</td></tr></table></center>
  215. <p align=right><small>WIMS-$wims_version@$httpd_HTTP_HOST</small>
  216. :end
  217. !if $wims_user=supervisor
  218.  <p><center>
  219.  !href $ $SU_Bhome
  220.  </center>
  221. !endif
  222. </DIV></BODY>
  223. </HTML>
  224.  
  225.