<!-- begin of $wims_theme/user.phtml -->
!! Class participant page theme.
!nocache
!if $module!=home
!endif
!set home_theme=yes
!set class_authidp
=!defof class_authidp in wimshome
/log/classes
/$wims_superclass/.def
!set auth_method_list=cas,ldap,php
!set auth_method=$(class_authidp[1;])
!if $(class_authidp[1;]) isitemof $auth_method_list
!set ext_login=$wims_external_auth
!endif
!default ext_login=$wims_user
!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!=
<div id="wimslogo$class_logoside">
<img src="$class_logo" alt="class logo"/>
</div>
!endif
!read ./adm/title.phtml 2\
<span class="wims_classname">$wims_classname</span> <span class="wims_class_typename">($(wims_name_$class_typename))</span>
!read adm/class/initclass $wims_superclass, auth
!!FIXME
!if $auth_method isitemof $auth_method_list
!set wims_user_ext
=!defof user_external_auth in wimshome
/log/classes
/$wims_superclass/.users
/$wims_user
!endif
!default wims_user_ext=$wims_user
<div class="wims_classes_direct">
!if $wims_superclass=$empty or $wims_superclass=$wims_class
$wims_institutionname
!else
<span class="wims_classes_direct_portal">
!href module=adm/class/classes&type=authparticipant&class=$wims_superclass&auth_user=$wims_user_ext $wims_institutionname
</span>
!if / isin $class_parent and $class_type=1
!set pname
=!defof class_description in wimshome
/log/classes
/$class_parent/.def
/
<span class="wims_classes_direct_class">
!href module=adm/class/classes&type=authparticipant&class=$class_parent&auth_user=$wims_user_ext $pname
</span>
!endif
!endif
</div>
!!<br clear=all/></div><div class=wimsbody>
!if _tool isin $wims_session
!read ./tools.phtml
!endif
!set supmail=!mailurl $wims_supervisormail $wims_name_mail
!set supmail=!replace internal <a by <a class="mail" in $supmail
!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
!if & isin $newmsgcnt or $newmsgcnt>0
<p class="wims_newmsg">
!href module=adm/forum/mboard $U_newmsg
</p>
!endif
!if $wims_supconnectshowed=yes and $wims_supervisorconnected!=$empty
<p>
$U_supconnected
!endif
<p>
<div class="wims_class_motd">
!read
./wimshome
/log/classes
/$wims_class/.motd
</div
><!--end of wims_class_motd
-->
!let test2
=!record
0 of wimshome
/log/classes
/$wims_class/motd
/$wims_user
!let test
=!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
><!-- end of wims_class_pmotd
-->
!endif
<p>
!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
!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 $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>
<p>
!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>
<p>
!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><p>
!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>
<p>
!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><p>
!endif
!endif
:endbar
</div><!--wimsbody-->
</div><!--wimspagebox-->
<div id="wimsmenumodubox">
<div class="wimsmenu">
!if $exist_cdt=yes
<div class="menuitem">
!read ./adm/oneitem.phtml cdt,1,module=adm/class/cdt
</div><!--menuitem-->
!endif
!set forum_policy
=!defof mb_readpolicy in wimshome
/log/classes
/$wims_class/forum
/.def
!if $forum_policy!=owner
!if $class_superclass!=
!set name_c
=!defof class_description in wimshome
/log/classes
/$wims_class/.def
!set name_c=<small>($name_c)</small>
!endif
<div class="menuitem">
!read ./adm/oneitem.phtml forum,1,module=adm/forum/mboard
$name_c
</div><!--menuitem-->
!endif
!!! the following allows to have forums in level. I comment because
!!I don't know if it useful. don't delete.
!!!if $wims_class=$wims_superclass and $class_type=4
!! !set level_cnt
=!record
0 of wimshome
/log/classes
/$wims_class/levels
!! !set level_cnt=!linecnt $level_cnt
!! !set participate_
=!defof user_participate in wimshome
/log/classes
/$wims_class/.users
/$wims_user
!! !set supervise_
=!defof user_supervise in wimshome
/log/classes
/$wims_class/.users
/$wims_user
!! !for le_ from 1 to $level_cnt
!! !defread wimshome
/log/classes
/$wims_class/$le/forum
/.def
!! !if $mb_defined!=yes and ,$wims_class/$le_/ isin ,$participate_,$supervise_ and $mb_readpolicy!=owner
!! !set name_c
=!defof class_description in wimshome
/log/classes
/$wims_class/$le_/.def
!! <div class="menuitem">
!! !read ./adm/oneitem.phtml forum,1,module=adm/forum/mboard&forum=classes/$wims_class/$le_
!! <small>($name_c)</small>
!! </div
><!--end menuitem
-->
!! !endif
!!!endif
!ifval $dcnt+$n+$m+$v>0 and $is_interclass!=yes
<div class="itemsep"></div>
<div class="menuitem">
!read ./adm/oneitem.phtml myscore,1,module=adm/class/userlist
</div
><!--end menuitem
-->
!if $wims_showlivret!=no
!set livret_nbcomp
=!recordcnt wimshome
/log/classes
/$wims_class/livret
/.comps
!if $livret_nbcomp >0
<div class="menuitem">
!read ./adm/oneitem.phtml livret,1,module=adm/class/livret
</div
><!--end menuitem
-->
!endif
!endif
<div class="itemsep"></div>
!endif
!if $class_type isin 013
<div class="menuitem">
!read ./adm/oneitem.phtml account,1,module=adm/class/userlist&job=userprop
</div
><!--end menuitem
-->
!endif
!set class_ent1=!rows2lines $class_ent
!set class_ent_n0=!linecnt $class_ent1
!if $class_ent_n0>0
<div class="itemsep"></div><!--tailsep-->
!for i_=1 to $class_ent_n0
!set 1_=!line $i_ of $class_ent1
<div class="menuitem">
!read ./adm/oneitem.phtml $(1_[1]),2,$(1_[2]),external
</div
><!--end menuitem
-->
!endif
!if $wims_user=supervisor
<div class="itemsep"></div><!--tailsep-->
<div class="menuitem">
!read ./adm/oneitem.phtml backteacher,1,$
</div
><!--end menuitem
-->
!endif
</div
><!--end wimsmenu
-->
</div
><!--end wimsmenumodubox
-->
<div id="wimsmenubox" class="footer">
<div class="wimsmenu">
<div class="menublock">
<span class="menuitem">
!if $wims_superclass!=$wims_class and $wims_superclass!=$empty and $auth_method isitemof $auth_method_list
!read ./adm/oneitem.phtml U_oclass,1,module=adm/class/classes&type=authparticipant&auth_user=$ext_login&class=$wims_superclass
!else
!read ./adm/oneitem.phtml U_oclass,1,module=adm/class/classes&type=participant
!endif
</span
><!-- end menuitem
-->
</div
><!--end menublock
-->
<div class="menublock">
<span class="menuitem">
$supmail
</span
><!-- end menuitem
-->
</div
><!--end menublock
-->
<div class="menublock">
<span class="menuitem">
!read ./adm/oneitem.phtml pref,1,module=adm/light&phtml=useropts.phtml.$lang
</span
><!-- end menuitem
-->
</div
><!--end menublock
-->
!!<div class="menublock">
!!<span class="menuitem">
!!!read ./adm/oneitem.phtml passwd,1,module=adm/class/passwd
!!</span><!-- menuitem-->
!! </div
><!--end menublock
-->
</div
><!--end of wimsmenu
-->
</div
><!--end of wimsmenubox
-->
<div class="spacer"></div>
</div
><!--end of wimsbodybox
-->
</body>
</html>
<!-- end of
$wims_theme/user
.phtml
-->