Subversion Repositories wimsdev

Rev

Rev 1967 | Rev 3962 | 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. !if $class_logo!=
  26. <table border=0 cellspacing=0 cellpadding=8 align=$class_logoside>
  27. <tr><td align=center valign=middle>
  28. <img src="$class_logo" border=0 alt="logo" align=left>
  29. </td></tr></table>
  30.  
  31. <center> <br> <br>
  32. !endif
  33. <b><font size="+2">$wims_classname</font></b>
  34. <br>
  35. !if $wims_superclass=$empty or $wims_superclass=$wims_class
  36.  $wims_institutionname
  37. !else
  38.  !href module=adm/class/classes&type=authparticipant&class=$wims_superclass&auth_user=$wims_user $wims_institutionname
  39.   !if / isin $class_parent and $class_type=1
  40.   !set pname=!defof class_description in wimshome/log/classes/$class_parent/.def
  41.   /
  42.   !href module=adm/class/classes&type=authparticipant&class=$class_parent&auth_user=$wims_user $pname
  43.  !endif
  44. !endif
  45. </center>
  46. <br clear=all> <br></div><div class=wimsbody>
  47.  
  48. !if _tool isin $wims_session
  49.  !read ./tools.phtml
  50.  !goto end
  51. !endif
  52.  
  53. !set supmail=!mailurl $wims_supervisormail $wims_supervisor
  54.  
  55. !if $n_>=4
  56.  !distribute words $etest into h_,s_,t_,n_
  57.  !set r_=!record 0 of wimshome/sessions/$s_/examreg.$n_
  58.  !set now=$wims_nowseconds
  59.  !set ws=!translate _ to $ $ in $wims_session
  60.  !set ws=!word 1 of $ws
  61.  !set sm=!record 0 of wimshome/log/classes/$wims_class/.E$n_
  62.  !if $r_!=$empty and $s_!=$ws and $t_>$now and $sm!=#
  63.  $U_examworking
  64.   !if $h_=$httpd_REMOTE_ADDR
  65.    !href session=$s_&module=adm/class/exam&job=student&exam=$n_ $U_examcont
  66.   !else
  67.    $U_examdouble
  68.    !sh rm -f ../sessions/$ws/var.stat >/dev/null
  69.   !endif
  70.   !goto end
  71.  !endif
  72.  !if $t_<$now or $r_=$empty
  73.   !writefile wimshome/log/classes/$wims_class/.parmreg/$wims_user.exam
  74.  !endif
  75. !endif
  76.  
  77. $U_greet
  78. <small>
  79. !if $class_type isin 234
  80.  !href module=adm/class/userlist&job=userprop $U_account
  81.  &nbsp;
  82. !endif
  83. !href target=wims_help module=help/main&chapter=3 $N_help
  84. </small>
  85.  
  86. !if & isin $newmsgcnt or $newmsgcnt>0
  87.  <br>
  88.  !href module=adm/forum/mboard $U_newmsg
  89. !endif
  90.  
  91. <div class="wims_class_motd">
  92. !read ./wimshome/log/classes/$wims_class/.motd
  93.  </div><!--wims_class_motd-->
  94. !let test=!record 0 of wimshome/log/classes/$wims_class/motd/.$wims_user
  95. !let test2=!record 0 of wimshome/log/classes/$wims_class/motd/$wims_user
  96. !if # notin $test and $test2!=$empty
  97. <div class="wims_class_pmotd">
  98.  !read ./wimshome/log/classes/$wims_class/motd/$wims_user
  99.  &nbsp;
  100.  !href module=adm/class/motd $N_hide
  101.  </div><!--wims_class_pmotd-->
  102. !endif
  103.  
  104. <p>
  105. !if $class_type>=2
  106.  !read ./subclasses.phtml
  107.  !set is_interclass=yes
  108. !endif
  109. !set seq_cnt=!record 0 of wimshome/log/classes/$wims_class/seq/.sequences
  110. !set seq_cnt=!line 1 of $seq_cnt
  111. !set seq_open=!defof sequence_open in wimshome/log/classes/$wims_class/seq/.def
  112. !set seq_reverse=!defof sequence_reverse in wimshome/log/classes/$wims_class/seq/.def
  113. !if $seq_open=yes and $seq_cnt>0
  114.  <div class="wims_user_myscore">
  115.  !href module=adm/class/userlist $U_myscore
  116. </div>
  117.  
  118.  !if $seq>0
  119.   !read ./sequence.phtml $seq
  120.   !reset seq
  121.  !else
  122.   !for i=1 to $seq_cnt
  123.      !if $seq_reverse=yes
  124.       !set u=$[$seq_cnt+1-$i]
  125.      !else
  126.       !set u=$i
  127.      !endif
  128.     !read ./sequence.phtml $u
  129.   !next
  130.  !endif
  131.   !goto endbar
  132. !endif
  133.  
  134. !set dcnt=!recordcnt wimshome/log/classes/$wims_class/doc/.index
  135. !for i=1 to $dcnt
  136.  !set d_=!record $i of wimshome/log/classes/$wims_class/doc/.index
  137.  !distribute lines $d_ into s_,t_,a_,e_,c_,o_
  138.  !if $o_>0
  139.   !set ds_list=!append line $s_ to $ds_list
  140.   !set dt_list=!append line $t_ to $dt_list
  141.  !endif
  142. !next i
  143. !set dcnt=!linecnt $ds_list
  144.  
  145. !set dpcnt=!recordcnt wimshome/log/classes/$wims_class/doc/.docindex
  146. !for i=1 to $dpcnt
  147.  !set d__=!record $i of wimshome/log/classes/$wims_class/doc/.docindex
  148.  !distribute lines $d__ into s_,t_,ti_,de_,o_
  149.  !if $o_>0
  150.   !set dps_list=!append line $s_ to $dps_list
  151.   !set dpt_list=!append line $t_ to $dpt_list
  152.   !set dpti_list=!append line $ti_ to $dpti_list
  153.   !set dpde_list=!append line $de_ to $dpde_list
  154.  !endif
  155. !next i
  156. !set dpcnt=!linecnt $dps_list
  157.  
  158. !set t=!recordcnt wimshome/log/classes/$wims_class/sheets/.sheets
  159. !set wlist=!record 0 of wimshome/log/classes/$wims_class/sheets/.weight
  160. !set aclist=
  161. !for i=1 to $t
  162.  !set s_$i=!record $i of wimshome/log/classes/$wims_class/sheets/.sheets
  163.  !set a_=!line 1 of $(s_$i)
  164.  !if $a_>=1 and $a_<=2
  165.   !set aclist=!append item $i to $aclist
  166.  !endif
  167. !next i
  168. !set n=!itemcnt $aclist
  169. !set t=!recordcnt wimshome/log/classes/$wims_class/exams/.exams
  170. !set aelist=
  171. !for i=1 to $t
  172.  !set e_$i=!record $i of wimshome/log/classes/$wims_class/exams/.exams
  173.  !set a_=!line 1 of $(e_$i)
  174.  !if $a_>=1 and $a_<=2
  175.   !set aelist=!append item $i to $aelist
  176.  !endif
  177. !next i
  178. !set m=!itemcnt $aelist
  179. !set t=!recordcnt wimshome/log/classes/$wims_class/vote/.votes
  180. !set avlist=
  181. !for i=1 to $t
  182.  !set v_$i=!record $i of wimshome/log/classes/$wims_class/vote/.votes
  183.  !set a_=!line 1 of $(v_$i)
  184.  !if $a_>=1 and $a_<=2
  185.   !set avlist=!append item $i to $avlist
  186.  !endif
  187. !next i
  188. !set v=!itemcnt $avlist
  189.  
  190. !ifval $dcnt+$dpcnt+$n+$m+$v=0
  191.  !if $is_interclass!=yes
  192.  $U_nosheet
  193.  !endif
  194. !else
  195.  !if $is_interclass!=yes
  196.  !!$U_assign
  197.  <div class="wims_user_myscore">
  198.  !href module=adm/class/userlist $U_myscore
  199. </div><p>
  200.  !endif
  201.  !if $dcnt>0
  202.   <table class="wims_user_doc_table">
  203.   !for i=1 to $dcnt
  204.    !set s_=!line $i of $ds_list
  205.    !set t_=!line $i of $dt_list
  206.    <tr class="wims_user_doc"><td class="wims_user_doc_type">$U_Doc</td><td colspan=3>
  207.    !href module=adm/doc?job=read&doc=$s_&block=main $t_
  208.    </td></tr>
  209.   !next i
  210.   </table>
  211.   <p>
  212.  !endif
  213.  !if $dpcnt>0
  214.   <table class="wims_user_docp_table">
  215.   !for i=1 to $dpcnt
  216.    !set s_=!line $i of $dps_list
  217.    !set t_=!line $i of $dpt_list
  218.    <tr class="wims_user_docp"><td class="wims_user_doc_type">$U_Doc</td><td colspan=3>
  219.     !href module=$s_&$t_ $(dpti_list[$i;])
  220.    </td></tr>
  221.   !next i
  222.   </table>
  223.   <p>
  224.  !endif
  225.  !if $n >0
  226.   <table class="wims_user_sheet_table">
  227.   !for i=1 to $n
  228.    !set se=!item $i of $aclist
  229.    !distribute lines $(s_$se) into ac,t_,ti,de
  230.    <tr class="wims_user_sheet"><td class="wims_user_sheet_type">$U_Sheet $se. <td class="wims_user_sheet_desc">
  231.   !href module=adm/sheet&sh=$se $ti
  232.   </td><td class="wims_user_sheet_expire">
  233.    !if $ac>=2
  234.     $U_expired
  235.    !else
  236.     !if showshexpire iswordof $class_option
  237.      !read misc/expire.phtml.$lang $t_
  238.     !endif
  239.    !endif
  240.    </td>
  241.    !set pe=!line $se of $percents
  242.    !set p1=!word 1 of $pe
  243.    !set p2=!word 2 of $pe
  244.    <td class="wims_user_sheet_score">
  245.    !if $p1!=$empty
  246.     $p1% $U_done, $U_average $[$p2]/10
  247.    !else
  248.     &nbsp;
  249.    !endif
  250.    </td><td>
  251.    !if showshweight iswordof $class_option
  252.     ($U_weight
  253.      !line $i of $wlist
  254.     )
  255.    !endif
  256.    </td>
  257.    </tr>
  258.   !next i
  259.   </table><p>
  260.  !endif
  261.  !if $m>0
  262.  <table class="wims_user_exam_table">
  263.  !for i=1 to $m
  264.   !set se=!item $i of $aelist
  265.   !distribute lines $(e_$se) into ac,t_,s_,ti,de
  266.   <tr class="wims_user_exam"><td class="wims_user_exam_type">$U_Exam $se. </td>
  267.   <td class="wims_user_exam_desc">
  268.   !href module=adm/class/exam&job=student&exam=$se $ti
  269.   </td><td class="wims_user_exam_expire">
  270.   !if $ac>=2
  271.    $U_expired
  272.   !else
  273.    !if showexexpire iswordof $class_option
  274.     !read misc/expire.phtml.$lang $t_
  275.    !else
  276.     &nbsp;
  277.    !endif
  278.   !endif
  279.   </td></tr>
  280.  !next i
  281.  </table>
  282.  <p>
  283.  !endif
  284.  !if $v>0
  285.  <table class="wims_user_vote_table">
  286.  !for i=1 to $v
  287.   !set sv=!item $i of $avlist
  288.   !distribute lines $(v_$sv) into ac,ti
  289.   <tr class="wims_user_vote"><td class="wims_user_vote_type">$U_Vote $i</td><td class="wims_user_vote_desc">
  290.   !href module=adm/vote&job=read&vote=$sv $ti
  291.   </td><td class="wims_user_vote_expire">
  292.   !if $ac>=2
  293.    $U_expired
  294.   !else
  295.    &nbsp;
  296.   !endif
  297.   </td>
  298.  !next i
  299.  </table><p>
  300. !endif
  301. !endif
  302.  
  303. :endbar
  304. <p><center>
  305. <table width="99%" border=0 cellspacing=0 cellpadding=3 bgcolor="$wims_ref_bgcolor">
  306. <tr><td align=left width="33%">&nbsp;&nbsp;
  307. !href module=adm/class/classes&type=participant $U_oclass
  308. <br>
  309. !href cmd=close&module=home $V_Quit
  310. !set class_ent1=!rows2lines $class_ent
  311. !set class_ent_n0=!linecnt $class_ent1
  312. !for i_=1 to $class_ent_n0
  313.   !set 1_=!line $i_ of $class_ent1
  314.      <a href="$(1_[2])" target=wims_external>$(1_[1])</a>
  315.    <br>
  316. !next i_
  317. </td><td align=center width="33%">
  318. !if $exist_cdt=yes
  319.   !href module=adm/class/cdt $U_cdt
  320.   &nbsp; / &nbsp;
  321. !endif
  322. !href module=adm/forum/mboard $N_Mboard
  323. <br>
  324. !mailurl $wims_supervisormail $V_Wsup
  325. </td><td align=right width="33%">
  326. !href module=adm/light&phtml=useropts.phtml.$lang $V_Chpref
  327. &nbsp;&nbsp;<br>
  328. !href module=adm/class/passwd $V_Chpass
  329. &nbsp;&nbsp;</td></tr></table></center>
  330. <p align=right><small>WIMS-$wims_version@$httpd_HTTP_HOST</small>
  331. :end
  332. !if $wims_user=supervisor
  333.  <p><center>
  334.  !href $ $SU_Bhome
  335.  </center>
  336. !endif
  337. </div></body>
  338. </html>
  339.  
  340.  
  341.