Subversion Repositories wimsdev

Rev

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

  1. <!-- begin of user.phtml -->
  2. !! Class participant page theme.
  3. !nocache
  4. !if $module!=home
  5.  !exit
  6. !endif
  7. !!!!! provisoire
  8.  
  9. !set wims_name_cdt=$U_cdt
  10. !set wims_name_forum=$N_Mboard
  11. !set wims_name_myscore=$U_myscore
  12. !set wims_name_account=$U_account
  13. !set wims_name_U_oclass=$U_oclass
  14. !set wims_name_V_Chpref=$V_Chpref
  15. !set wims_name_passwd=$V_Chpass
  16. !!!!
  17.  
  18. !set home_theme=yes
  19.  
  20. !set percents=!getscorepercent
  21. !set class_homepage=!getdef class_homepage in wimshome/log/classes/$wims_class/.def
  22. !set etest=!record 0 of wimshome/log/classes/$wims_class/.parmreg/$wims_user.exam
  23. !set n_=!wordcnt $etest
  24.  
  25. !if / isin $class_homepage and _tool notin $wims_session
  26.  !set deffile=wimshome/log/classes/$wims_class/doc/$class_homepage.def
  27.  !set t_=!getdef titb in $deffile
  28.  !if $t_=$empty or $n_>=4
  29.   !goto normal
  30.  !endif
  31.  !read ./userhome.phtml
  32.  !goto end
  33. !endif
  34.  
  35. :normal
  36. !read classlogo.phtml
  37. !read ./adm/title.phtml 2\
  38. $wims_classname <small>($(wims_name_$class_typename))</small>
  39. !if $class_logo!=
  40. <div class="menuitem">
  41. <div id="wimslogo$class_logoside">
  42. <img src="$class_logo" border=0 alt="class logo" align=left>
  43. </div><!--wimslogo-->
  44. </div><!-- menuitem-->
  45. !endif
  46.  
  47. <div class="wims_classes_direct">
  48. !if $wims_superclass=$empty or $wims_superclass=$wims_class
  49.   $wims_institutionname
  50. !else
  51. <span class="wims_classes_direct_portal">
  52.  !href module=adm/class/classes&type=authparticipant&class=$wims_superclass&auth_user=$wims_user $wims_institutionname
  53. </span>
  54.  !if / isin $class_parent and $class_type=1
  55.   !set pname=!defof class_description in wimshome/log/classes/$class_parent/.def
  56.   /
  57.  <span class="wims_classes_direct_class">
  58.   !href module=adm/class/classes&type=authparticipant&class=$class_parent&auth_user=$wims_user $pname
  59.  </span>
  60.  !endif
  61. !endif
  62. </div>
  63. !!<br clear=all></div><div class=wimsbody>
  64.  
  65. !if _tool isin $wims_session
  66.  !read ./tools.phtml
  67.  !goto end
  68. !endif
  69.  
  70. !set supmail=!mailurl $wims_supervisormail $wims_supervisor
  71.  
  72. !if $n_>=4
  73.  !distribute words $etest into h_,s_,t_,n_
  74.  !set r_=!record 0 of wimshome/sessions/$s_/examreg.$n_
  75.  !set now=$wims_nowseconds
  76.  !set ws=!translate _ to $ $ in $wims_session
  77.  !set ws=!word 1 of $ws
  78.  !set sm=!record 0 of wimshome/log/classes/$wims_class/.E$n_
  79.  !if $r_!=$empty and $s_!=$ws and $t_>$now and $sm!=#
  80.  $U_examworking
  81.   !if $h_=$httpd_REMOTE_ADDR
  82.    !href session=$s_&module=adm/class/exam.$lang&job=student&exam=$n_ $U_examcont
  83.   !else
  84.    $U_examdouble
  85.    !sh rm -f ../sessions/$ws/var.stat >/dev/null
  86.   !endif
  87.   !goto end
  88.  !endif
  89.  !if $t_<$now or $r_=$empty
  90.   !writefile wimshome/log/classes/$wims_class/.parmreg/$wims_user.exam
  91.  !endif
  92. !endif
  93. $U_greet
  94. !!<small>
  95. !!!if $class_type isin 234
  96. !! !href module=adm/class/userlist&job=userprop $U_account
  97. !! &nbsp;
  98. !!!endif
  99. !!!href target=wims_help module=help/main&chapter=3 $N_help
  100. !!</small>
  101.  
  102. !if & isin $newmsgcnt or $newmsgcnt>0
  103.  <br>
  104.  !href module=adm/forum/mboard $U_newmsg
  105. !endif
  106.  
  107. <p>
  108. <div class="wims_class_motd">
  109. !read ./wimshome/log/classes/$wims_class/.motd
  110. </div><!--wims_class_motd-->
  111. !let test2=!record 0 of wimshome/log/classes/$wims_class/motd/$wims_user
  112. !let test=!record 0 of wimshome/log/classes/$wims_class/motd/.$wims_user
  113. !if # notin $test and $test2!=$empty
  114. <div class="wims_class_pmotd">
  115.  !read ./wimshome/log/classes/$wims_class/motd/$wims_user
  116.  &nbsp; [
  117.  !href module=adm/class/motd $N_hide
  118. ] </div><!--wims_class_pmotd-->
  119. !endif
  120.  
  121. <p>
  122. !if $class_type>=2
  123.  !read ./subclasses.phtml
  124.  !set is_interclass=yes
  125. !endif
  126. !set seq_cnt=!record 0 of wimshome/log/classes/$wims_class/seq/.sequences
  127. !set seq_cnt=!line 1 of $seq_cnt
  128. !set seq_open=!defof sequence_open in wimshome/log/classes/$wims_class/seq/.def
  129. !set seq_reverse=!defof sequence_reverse in wimshome/log/classes/$wims_class/seq/.def
  130. !if $seq_open=yes and $seq_cnt>0
  131.  !if $seq>0
  132.   !read ./sequence.phtml $seq
  133.   !reset seq
  134.  !else
  135.   !for i=1 to $seq_cnt
  136.      !if $seq_reverse=yes
  137.       !set u=$[$seq_cnt+1-$i]
  138.      !else
  139.       !set u=$i
  140.      !endif
  141.     !read ./sequence.phtml $u
  142.   !next
  143.  !endif
  144.   !goto endbar
  145. !endif
  146.  
  147. !set dcnt=!recordcnt wimshome/log/classes/$wims_class/doc/.index
  148. !for i=1 to $dcnt
  149.  !set d_=!record $i of wimshome/log/classes/$wims_class/doc/.index
  150.  !distribute lines $d_ into s_,t_,a_,e_,c_,o_
  151.  !if $o_>0
  152.   !set ds_list=!append line $s_ to $ds_list
  153.   !set dt_list=!append line $t_ to $dt_list
  154.  !endif
  155. !next i
  156. !set dcnt=!linecnt $ds_list
  157.  
  158. !set dpcnt=!recordcnt wimshome/log/classes/$wims_class/doc/.docindex
  159. !for i=1 to $dpcnt
  160.  !set d__=!record $i of wimshome/log/classes/$wims_class/doc/.docindex
  161.  !distribute lines $d__ into s_,t_,ti_,de_,o_
  162.  !if $o_>0
  163.   !set dps_list=!append line $s_ to $dps_list
  164.   !set dpt_list=!append line $t_ to $dpt_list
  165.   !set dpti_list=!append line $ti_ to $dpti_list
  166.   !set dpde_list=!append line $de_ to $dpde_list
  167.  !endif
  168. !next i
  169. !set dpcnt=!linecnt $dps_list
  170.  
  171. !set t=!recordcnt wimshome/log/classes/$wims_class/sheets/.sheets
  172. !set wlist=!record 0 of wimshome/log/classes/$wims_class/sheets/.weight
  173. !set aclist=
  174. !for i=1 to $t
  175.  !set s_$i=!record $i of wimshome/log/classes/$wims_class/sheets/.sheets
  176.  !set a_=!line 1 of $(s_$i)
  177.  !if $a_>=1 and $a_<=2
  178.   !set aclist=!append item $i to $aclist
  179.  !endif
  180. !next i
  181. !set n=!itemcnt $aclist
  182. !set t=!recordcnt wimshome/log/classes/$wims_class/exams/.exams
  183. !set aelist=
  184. !for i=1 to $t
  185.  !set e_$i=!record $i of wimshome/log/classes/$wims_class/exams/.exams
  186.  !set a_=!line 1 of $(e_$i)
  187.  !if $a_>=1 and $a_<=2
  188.   !set aelist=!append item $i to $aelist
  189.  !endif
  190. !next i
  191. !set m=!itemcnt $aelist
  192. !set t=!recordcnt wimshome/log/classes/$wims_class/vote/.votes
  193. !set avlist=
  194. !for i=1 to $t
  195.  !set v_$i=!record $i of wimshome/log/classes/$wims_class/vote/.votes
  196.  !set a_=!line 1 of $(v_$i)
  197.  !if $a_>=1 and $a_<=2
  198.   !set avlist=!append item $i to $avlist
  199.  !endif
  200. !next i
  201. !set v=!itemcnt $avlist
  202.  
  203. !ifval $dcnt+$dpcnt+$n+$m+$v=0
  204.  !if $is_interclass!=yes
  205.  $U_nosheet
  206.  !endif
  207. !else
  208.  !if $is_interclass!=yes
  209.  !!$U_assign
  210.  !!<div class="wims_user_myscore">
  211. !! !href module=adm/class/userlist.$lang $U_myscore
  212. !!</div>
  213.  !endif
  214.  !if $dcnt>0
  215.   <table class="wims_user_doc_table">
  216.   !for i=1 to $dcnt
  217.    !set s_=!line $i of $ds_list
  218.    !set t_=!line $i of $dt_list
  219.    <tr class="wims_user_doc"><td class="wims_user_doc_type">$U_Doc</td><td colspan=3>
  220.    !href module=adm/doc.$lang?job=read&doc=$s_&block=main $t_
  221.    </td></tr>
  222.   !next i
  223.   </table>
  224.   <p>
  225.  !endif
  226.  !if $dpcnt>0
  227.   <table class="wims_user_docp_table">
  228.   !for i=1 to $dpcnt
  229.    !set s_=!line $i of $dps_list
  230.    !set t_=!line $i of $dpt_list
  231.    <tr class="wims_user_docp"><td class="wims_user_doc_type">$U_Doc</td><td colspan=3>
  232.     !href module=$s_&$t_ $(dpti_list[$i;])
  233.    </td></tr>
  234.   !next i
  235.   </table>
  236.   <p>
  237.  !endif
  238.  !if $n >0
  239.   <table class="wims_user_sheet_table">
  240.   !for i=1 to $n
  241.    !set se=!item $i of $aclist
  242.    !distribute lines $(s_$se) into ac,t_,ti,de
  243.    <tr class="wims_user_sheet"><td class="wims_user_sheet_type">$U_Sheet $se. <td class="wims_user_sheet_desc">
  244.   !href module=adm/sheet&sh=$se $ti
  245.   </td><td class="wims_user_sheet_expire">
  246.    !if $ac>=2
  247.     $U_expired
  248.    !else
  249.     !if showshexpire iswordof $class_option
  250.      !read misc/expire.phtml.$lang $t_
  251.     !endif
  252.    !endif
  253.    </td>
  254.    !set pe=!line $se of $percents
  255.    !set p1=!word 1 of $pe
  256.    !set p2=!word 2 of $pe
  257.    <td class="wims_user_sheet_score">
  258.    !if $p1!=$empty
  259.     $p1% $U_done, $U_average $[$p2]/10
  260.    !else
  261.     &nbsp;
  262.    !endif
  263.    </td><td>
  264.    !if showshweight iswordof $class_option
  265.     ($U_weight
  266.      !line $i of $wlist
  267.     )
  268.    !endif
  269.    </td>
  270.    </tr>
  271.   !next i
  272.   </table><p>
  273.  !endif
  274.  !if $m>0
  275.  <table class="wims_user_exam_table">
  276.  !for i=1 to $m
  277.   !set se=!item $i of $aelist
  278.   !distribute lines $(e_$se) into ac,t_,s_,ti,de
  279.   <tr class="wims_user_exam"><td class="wims_user_exam_type">$U_Exam $se. </td>
  280.   <td class="wims_user_exam_desc">
  281.   !href module=adm/class/exam&job=student&exam=$se $ti
  282.   </td><td class="wims_user_exam_expire">
  283.   !if $ac>=2
  284.    $U_expired
  285.   !else
  286.    !if showexexpire iswordof $class_option
  287.     !read misc/expire.phtml.$lang $t_
  288.    !else
  289.     &nbsp;
  290.    !endif
  291.   !endif
  292.   </td></tr>
  293.  !next i
  294.  </table>
  295.  <p>
  296.  !endif
  297.  !if $v>0
  298.  <table class="wims_user_vote_table">
  299.  !for i=1 to $v
  300.   !set sv=!item $i of $avlist
  301.   !distribute lines $(v_$sv) into ac,ti
  302.   <tr class="wims_user_vote"><td class="wims_user_vote_type">$U_Vote $i</td><td class="wims_user_vote_desc">
  303.   !href module=adm/vote&job=read&vote=$sv $ti
  304.   </td><td class="wims_user_vote_expire">
  305.   !if $ac>=2
  306.    $U_expired
  307.   !else
  308.    &nbsp;
  309.   !endif
  310.   </td>
  311.  !next i
  312.  </table><p>
  313. !endif
  314. !endif
  315.  
  316. :endbar
  317. </div><!--wimsbody-->
  318. </div><!--wimspagebox-->
  319. <div id="wimsmenumodubox" style="background-color:$wims_ref_bgcolor;">
  320. <div class="wimsmenu">
  321. !if $exist_cdt=yes
  322. <div class="menuitem">
  323.   !read ./adm/oneitem.phtml cdt,1,module=adm/class/cdt
  324. </div><!--menuitem-->
  325. !endif
  326. !set forum_policy=!defof mb_readpolicy in wimshome/log/classes/$wims_class/forum/.def
  327. !reset name_c
  328. !if $forum_policy!=owner
  329.   !if $class_superclass!=
  330.    !set name_c=!defof class_description in wimshome/log/classes/$wims_class/.def
  331.    !set name_c=<small>($name_c)</small>
  332.   !endif
  333.  <div class="menuitem">
  334. !read ./adm/oneitem.phtml forum,1,module=adm/forum/mboard
  335.  $name_c
  336.  </div><!--menuitem-->
  337. !endif
  338. !!! the following allows to have forums in level. I comment because
  339. !!I don't know if it useful. don't delete.
  340. !!!if $wims_class=$wims_superclass and $class_type=4
  341. !!  !set level_cnt=!record 0 of wimshome/log/classes/$wims_class/levels
  342. !!  !set level_cnt=!linecnt $level_cnt
  343. !!  !set participate_=!defof user_participate in wimshome/log/classes/$wims_class/.users/$wims_user
  344. !!  !set supervise_=!defof user_supervise in wimshome/log/classes/$wims_class/.users/$wims_user
  345. !!  !for le_ from 1 to $level_cnt
  346. !!     !defread wimshome/log/classes/$wims_class/$le/forum/.def
  347. !!   !if $mb_defined!=yes and ,$wims_class/$le_/ isin ,$participate_,$supervise_ and $mb_readpolicy!=owner
  348. !!    !set name_c=!defof class_description in wimshome/log/classes/$wims_class/$le_/.def
  349. !!     <div class="menuitem">
  350. !!      !read ./adm/oneitem.phtml forum,1,module=adm/forum/mboard&forum=classes/$wims_class/$le_
  351. !!      <small>($name_c)</small>
  352. !!     </div><!--menuitem-->
  353. !!    !endif
  354. !!  !next
  355. !!!endif
  356. !ifval $dcnt+$n+$m+$v>0 and $is_interclass!=yes
  357. <div class="itemsep"></div><!--itemsep-->
  358. <div class="menuitem">
  359. !read ./adm/oneitem.phtml myscore,1,module=adm/class/userlist.$lang
  360. </div><!--menuitem-->
  361.   !set livret_nbcomp=!recordcnt wimshome/log/classes/$wims_class/livret/.comps
  362.  !if $livret_nbcomp >0
  363. <div class="menuitem">
  364. !read ./adm/oneitem.phtml livret,1,module=adm/class/livret
  365. </div><!--menuitem-->
  366.   !endif
  367. <div class="itemsep"></div><!--itemsep-->
  368. !endif
  369. !if $class_type isin 013
  370. <div class="menuitem">
  371. !read ./adm/oneitem.phtml account,1,module=adm/class/userlist&job=userprop
  372. </div><!--menuitem-->
  373. !endif
  374. !if $class_ent_n0>0
  375. <div class="itemsep"></div><!--tailsep-->
  376. !set class_ent1=!rows2lines $class_ent
  377. !set class_ent_n0=!linecnt $class_ent1
  378. !for i_=1 to $class_ent_n0
  379.   !set 1_=!line $i_ of $class_ent1
  380.    <div class="menuitem">
  381.    !read ./adm/oneitem.phtml $(1_[1]),2,$(1_[2]),external
  382.    </div><!--menuitem-->
  383. !next i_
  384. !endif
  385. !if $wims_user=supervisor
  386.  <div class="itemsep"></div><!--tailsep-->
  387.  <div class="menuitem">
  388.  !read ./adm/oneitem.phtml backteacher,1,$
  389.  </div><!--menuitem-->
  390. !endif
  391.  
  392. </div><!--wimsmenu-->
  393. </div><!--wimsmenumodubox-->
  394. <div id="wimsmenubox" style="background-color:$wims_ref_bgcolor;">
  395. <div class="wimsmenu">
  396. <div class="menublock">
  397. <span class="menuitem">
  398. !read ./adm/oneitem.phtml U_oclass,1,module=adm/class/classes&type=participant
  399. </span><!-- menuitem-->
  400. <span class="menuitem">
  401. !read ./adm/oneitem.phtml mail,5,$wims_supervisormail,$V_Wsup
  402. </span><!-- menuitem-->
  403. </div><!--end menublock-->
  404. <div class="menublock">
  405. <span class="menuitem">
  406. !read ./adm/oneitem.phtml V_Chpref,1,module=adm/light&phtml=useropts.phtml.$lang
  407. </span><!-- menuitem-->
  408. <span class="menuitem">
  409. !read ./adm/oneitem.phtml passwd,1,module=adm/class/passwd
  410. </span><!-- menuitem-->
  411. </div><!--end menublock-->
  412. </div><!--wimsmenu-->
  413. </div><!--wimsmenubox-->
  414. </div><!--wimsbodybox-->
  415. <div id="wimstailbox">
  416. <div class="wimstail">
  417. <div class="tailitem">
  418. WIMS-$wims_version@$httpd_HTTP_HOST
  419. </div><!--tailitem-->
  420. :end
  421. !if $wims_user=supervisor
  422.  <div class="tailitem">
  423.  !href $ $SU_Bhome
  424.  </div><!--tailitem-->
  425. !endif
  426. </div><!--wimstail-->
  427. </div><!--wimstailbox-->
  428. </body>
  429. </html>
  430. <!-- end of user.phtml -->
  431.  
  432.