!! Class participant page theme.
 
!nocache
 
!if $module!=home
 
!endif
 
 
 
!set home_theme=yes
 
!set percents=!getscorepercent
 
!set class_homepage
=!getdef class_homepage in wimshome
/log/classes
/$wims_class/.def
  
!set etest
=!record 
0 of wimshome
/log/classes
/$wims_class/.parmreg
/$wims_user.exam
  
!set n_=!wordcnt $etest
 
 
 
!if / isin $class_homepage and _tool notin $wims_session
 
 !set deffile
=wimshome
/log/classes
/$wims_class/doc
/$class_homepage.def
  
 !set t_=!getdef titb in $deffile
 
 !if $t_=$empty or $n_>=4
 
  !goto normal
 
 !endif
 
 !read ./userhome.phtml
 
!endif
 
 
 
:normal
 
!read classlogo.phtml
 
!if $class_logo!=
 
<table border="0" cellspacing="0" cellpadding="8" align="$class_logoside">
 
<tr><td align="center" valign="middle">
 
<img src="$class_logo" alt="logo" align="left"/>
 
</td></tr></table>
 
 
 
<center> <br/>
 
!endif
 
<b><font size="+2">$wims_classname</font></b>
 
<br/>
 
!if $wims_superclass=$empty or $wims_superclass=$wims_class
 
 $wims_institutionname
 
!else
 
 !href module=adm/class/classes&type=authparticipant&class=$wims_superclass&auth_user=$wims_user $wims_institutionname
 
  !if / isin $class_parent and $class_type=1
 
  !set pname
=!defof class_description in wimshome
/log/classes
/$class_parent/.def
  
  / 
 
  !href module=adm/class/classes&type=authparticipant&class=$class_parent&auth_user=$wims_user $pname
 
 !endif
 
!endif
 
</center>
 
<br clear="all"/> <br/></div><div class="wimsbody">
 
 
 
!if _tool isin $wims_session
 
 !read ./tools.phtml
 
!endif
 
 
 
!set supmail=!mailurl $wims_supervisormail $wims_supervisor
 
 
 
!if $n_>=4
 
 !distribute words $etest into h_,s_,t_,n_
 
 !set r_=!record 0 of wimshome/sessions/$s_/examreg.$n_
 
 !set now=$wims_nowseconds
 
 !set ws=!translate _ to $ $ in $wims_session
 
 !set ws=!word 1 of $ws
 
 !set sm
=!record 
0 of wimshome
/log/classes
/$wims_class/.E
$n_  
 !if $r_!=$empty and $s_!=$ws and $t_>$now and $sm!=#
 
  <span class="wims_warning">$wims_name_warning</span>. 
 
  $U_examworking
 
  !if $h_=$httpd_REMOTE_ADDR
 
   !href session=$s_&module=adm/class/exam&job=student&exam=$n_ $U_examcont
 
  !else
 
   $U_examdouble
 
   !sh rm 
-f 
../sessions
/$ws/var.stat >/dev
/null  
  !endif
 
 !endif
 
 !if $t_<$now or $r_=$empty
 
  !writefile wimshome
/log/classes
/$wims_class/.parmreg
/$wims_user.exam
  
 !endif
 
!endif
 
 
 
$U_greet
 
<small>
 
!if $class_type isin 234
 
 !href module=adm/class/userlist&job=userprop $wims_name_account
 
  
 
!endif
 
!href target=wims_help module=help/main&chapter=3 $wims_name_help
 
</small>
 
 
 
!if & isin $newmsgcnt or $newmsgcnt>0
 
 <br/>
 
 !href module=adm/forum/mboard $U_newmsg
 
!endif
 
 
 
!if $wims_supconnectshowed=yes and $wims_supervisorconnected!=$empty
 
 <p>
 
 $U_supconnected
 
 </p>
 
!endif
 
 
 
<div class="wims_class_motd">
 
!read 
./wimshome
/log/classes
/$wims_class/.motd
  
 </div><!--wims_class_motd-->
 
!let test
=!record 
0 of wimshome
/log/classes
/$wims_class/motd
/.$wims_user  
!let test2
=!record 
0 of wimshome
/log/classes
/$wims_class/motd
/$wims_user  
!if # notin $test and $test2!=$empty
 
 <div class="wims_class_pmotd">
 
 !read 
./wimshome
/log/classes
/$wims_class/motd
/$wims_user  
  
 
 !href module=adm/class/motd $(wims_name_actionlist[4])
 
 </div><!--wims_class_pmotd-->
 
!endif
 
 
 
!if $class_type>=2
 
 !read ./subclasses.phtml
 
 !set is_interclass=yes
 
!endif
 
!set seq_cnt
=!record 
0 of wimshome
/log/classes
/$wims_class/seq
/.sequences
  
!set seq_cnt=!line 1 of $seq_cnt
 
!set seq_open
=!defof sequence_open in wimshome
/log/classes
/$wims_class/seq
/.def
  
!set seq_reverse
=!defof sequence_reverse in wimshome
/log/classes
/$wims_class/seq
/.def
  
!if $seq_open=yes and $seq_cnt>0
 
 <div class="wims_user_myscore">
 
 !href module=adm/class/userlist $wims_name_myscore
 
</div>
 
 
 
 !if $seq>0
 
  !read ./sequence.phtml $seq
 
 !else
 
  !for i=1 to $seq_cnt
 
     !if $seq_reverse=yes
 
      !set u=$[$seq_cnt+1-$i]
 
     !else
 
      !set u=$i
 
     !endif
 
    !read ./sequence.phtml $u
 
 !endif
 
  !goto endbar
 
!endif
 
 
 
!set dcnt
=!recordcnt wimshome
/log/classes
/$wims_class/doc
/.index
  
!for i=1 to $dcnt
 
 !set d_
=!record 
$i of wimshome
/log/classes
/$wims_class/doc
/.index
  
 !distribute lines $d_ into s_,t_,a_,e_,c_,o_
 
 !if $o_>0
 
  !set ds_list=!append line $s_ to $ds_list
 
  !set dt_list=!append line $t_ to $dt_list
 
 !endif
 
!set dcnt=!linecnt $ds_list
 
 
 
!set dpcnt
=!recordcnt wimshome
/log/classes
/$wims_class/doc
/.docindex
  
!for i=1 to $dpcnt
 
 !set d__
=!record 
$i of wimshome
/log/classes
/$wims_class/doc
/.docindex
  
 !distribute lines $d__ into s_,t_,ti_,de_,o_
 
 !if $o_>0
 
  !set dps_list=!append line $s_ to $dps_list
 
  !set dpt_list=!append line $t_ to $dpt_list
 
  !set dpti_list=!append line $ti_ to $dpti_list
 
  !set dpde_list=!append line $de_ to $dpde_list
 
 !endif
 
!set dpcnt=!linecnt $dps_list
 
 
 
!set t
=!recordcnt wimshome
/log/classes
/$wims_class/sheets
/.sheets
  
!set wlist
=!record 
0 of wimshome
/log/classes
/$wims_class/sheets
/.weight
  
!set aclist=
 
!for i=1 to $t
 
 !set s_
$i=!record 
$i of wimshome
/log/classes
/$wims_class/sheets
/.sheets
  
 !set a_=!line 1 of $(s_$i)
 
 !if $a_>=1 and $a_<=2
 
  !set aclist=!append item $i to $aclist
 
 !endif
 
!set n=!itemcnt $aclist
 
!set t
=!recordcnt wimshome
/log/classes
/$wims_class/exams
/.exams
  
!set aelist=
 
!for i=1 to $t
 
 !set e_
$i=!record 
$i of wimshome
/log/classes
/$wims_class/exams
/.exams
  
 !set a_=!line 1 of $(e_$i)
 
 !if $a_>=1 and $a_<=2
 
  !set aelist=!append item $i to $aelist
 
 !endif
 
!set m=!itemcnt $aelist
 
!set t
=!recordcnt wimshome
/log/classes
/$wims_class/vote
/.votes
  
!set avlist=
 
!for i=1 to $t
 
 !set v_
$i=!record 
$i of wimshome
/log/classes
/$wims_class/vote
/.votes
  
 !set a_=!line 1 of $(v_$i)
 
 !if $a_>=1 and $a_<=2
 
  !set avlist=!append item $i to $avlist
 
 !endif
 
!set v=!itemcnt $avlist
 
 
 
!ifval $dcnt+$dpcnt+$n+$m+$v=0
 
 !if $is_interclass!=yes
 
 $U_nosheet
 
 !endif
 
!else
 
 !if $is_interclass!=yes
 
 !!$U_assign
 
 <div class="wims_user_myscore">
 
 !href module=adm/class/userlist $wims_name_myscore
 
</div>
 
 !endif
 
 !if $dcnt>0
 
  <table class="wims_user_doc_table">
 
  !for i=1 to $dcnt
 
   !set s_=!line $i of $ds_list
 
   !set t_=!line $i of $dt_list
 
   <tr class="wims_user_doc"><td class="wims_user_doc_type">$wims_name_doc</td><td colspan="3">
 
   !href module=adm/doc?job=read&doc=$s_&block=main $t_
 
   </td></tr>
 
  </table>
 
  
 
 !endif
 
 !if $dpcnt>0
 
  <table class="wims_user_docp_table">
 
  !for i=1 to $dpcnt
 
   !set s_=!line $i of $dps_list
 
   !set t_=!line $i of $dpt_list
 
   <tr class="wims_user_docp"><td class="wims_user_doc_type">$wims_name_doc</td><td colspan="3">
 
    !href module=$s_&$t_ $(dpti_list[$i;])
 
   </td></tr>
 
  </table>
 
 !endif
 
 !if $n >0
 
  <table class="wims_user_sheet_table">
 
  !for i=1 to $n
 
   !set se=!item $i of $aclist
 
   !distribute lines $(s_$se) into ac,t_,ti,de
 
   <tr class="wims_user_sheet"><td class="wims_user_sheet_type">$wims_name_Sheet $se. <td class="wims_user_sheet_desc">
 
  !href module=adm/sheet&sh=$se $ti
 
  </td><td class="wims_user_sheet_expire">
 
   !if $ac>=2
 
    $U_expired
 
   !else
 
    !if showshexpire iswordof $class_option
 
     !read misc/expire.phtml.$lang $t_
 
    !endif
 
   !endif
 
   </td>
 
   !set pe=!line $se of $percents
 
   !set p1=!word 1 of $pe
 
   !set p2=!word 2 of $pe
 
   <td class="wims_user_sheet_score">
 
   !if $p1!=$empty
 
    $p1% $U_done, $U_average $[$p2]/10
 
   !else
 
     
 
   !endif
 
   </td><td>
 
   !if showshweight iswordof $class_option
 
    ($wims_name_coeff
 
     !line $i of $wlist
 
    )
 
   !endif
 
   </td>
 
   </tr>
 
  </table>
 
 !endif
 
 !if $m>0
 
 <table class="wims_user_exam_table">
 
 !for i=1 to $m
 
  !set se=!item $i of $aelist
 
  !distribute lines $(e_$se) into ac,t_,s_,ti,de
 
  <tr class="wims_user_exam"><td class="wims_user_exam_type">$wims_name_Examen $se. </td>
 
  <td class="wims_user_exam_desc">
 
  !href module=adm/class/exam&job=student&exam=$se $ti
 
  </td><td class="wims_user_exam_expire">
 
  !if $ac>=2
 
   $U_expired
 
  !else
 
   !if showexexpire iswordof $class_option
 
    !read misc/expire.phtml.$lang $t_
 
   !else
 
     
 
   !endif
 
  !endif
 
  </td></tr>
 
 </table>
 
 
 
 !endif
 
 !if $v>0
 
 <table class="wims_user_vote_table">
 
 !for i=1 to $v
 
  !set sv=!item $i of $avlist
 
  !distribute lines $(v_$sv) into ac,ti
 
  <tr class="wims_user_vote"><td class="wims_user_vote_type">$wims_name_Vote $i</td><td class="wims_user_vote_desc">
 
  !href module=adm/vote&job=read&vote=$sv $ti
 
  </td><td class="wims_user_vote_expire">
 
  !if $ac>=2
 
   $U_expired
 
  !else
 
    
 
  !endif
 
  </td>
 
 </table>
 
!endif
 
!endif
 
 
 
:endbar
 
<table width="99%" border="0" cellspacing="0" cellpadding="3" bgcolor="$wims_ref_bgcolor">
 
<tr><td align="left" width="33%">  
 
!href module=adm/class/classes&type=participant $wims_name_U_oclass
 
<br/>
 
!href cmd=close&module=home $wims_name_visitor
 
!set class_ent1=!rows2lines $class_ent
 
!set class_ent_n0=!linecnt $class_ent1
 
!for i_=1 to $class_ent_n0
 
  !set 1_=!line $i_ of $class_ent1
 
     <a href="$(1_[2])" target="wims_external">$(1_[1])</a>
 
   <br/>
 
</td><td align="center" width="33%">
 
!if $exist_cdt=yes
 
  !href module=adm/class/cdt $wims_name_cdt
 
    /  
 
!endif
 
!href module=adm/forum/mboard $wims_name_forum
 
<br/>
 
!mailurl $wims_supervisormail $wims_name_mail
 
</td><td align="right" width="33%">
 
!href module=adm/light&phtml=useropts.phtml.$lang $wims_name_pref
 
  <br/>
 
!href module=adm/class/passwd $wims_name_passwd
 
  </td></tr></table>
 
<p align="right"><small>WIMS-$wims_version@$httpd_HTTP_HOST</small>
 
!if $wims_user=supervisor
 
 <div class="wimscenter">
 
 !href $ $SU_Bhome
 
 </div>
 
!endif
 
</div></body>
 
</html>