Subversion Repositories wimsdev

Rev

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