Subversion Repositories wimsdev

Rev

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

  1. !! called also for a teacher of a portal or classgroup
  2.  
  3. <!-- begin of Nikaia/user.phtml -->
  4. !! Class participant page theme.
  5. !nocache
  6. !if $module!=home
  7.  !exit
  8. !endif
  9. !!initialisation
  10. !set home_theme=yes
  11.  
  12. !set percents=!getscorepercent
  13. !set class_homepage=!getdef class_homepage in wimshome/log/classes/$wims_class/.def
  14. !set etest=!record 0 of wimshome/log/classes/$wims_class/.parmreg/$wims_user.exam
  15. !set n_=!wordcnt $etest
  16.  
  17. !if / isin $class_homepage and _tool notin $wims_session
  18.   !set deffile=wimshome/log/classes/$wims_class/doc/$class_homepage.def
  19.   !set t_=!getdef titb in $deffile
  20.   !if $t_=$empty or $n_>=4
  21.     !goto normal
  22.   !endif
  23.   !read ./userhome.phtml
  24.   !goto end
  25. !endif
  26.  
  27. :normal
  28. !read classlogo.phtml
  29. !if $class_logo!=$empty
  30.   <div id="classlogo" class="float_$class_logoside">
  31.     <img src="$class_logo" alt="class logo" />
  32.   </div>
  33. !endif
  34.  
  35. !read ./adm/title.phtml 2\
  36.  <span class="wims_classname">$wims_classname</span> <span class="wims_class_typename">($(wims_name_$class_typename))</span>
  37.  
  38. !read adm/class/initclass $wims_superclass, auth
  39.  
  40. !!FIXME
  41. !!if $auth_method isitemof $auth_method_list
  42.    !!set wims_user_ext=!defof user_external_auth in wimshome/log/classes/$wims_superclass/.users/$wims_user
  43. !!endif
  44. !!default wims_user_ext=$wims_user
  45.  
  46. !! (MC) the following seems to be needed for groupement to go back to
  47. !! the superclass (is it sufficient to change the name of the variable
  48. !! in the links below?)
  49. !default wims_user_ext=$ext_login
  50.  
  51. !!<div class="wims_classes_direct">
  52. !!!if $wims_superclass=$empty or $wims_superclass=$wims_class
  53. !!  $wims_institutionname
  54. !!!else
  55. !!  <span class="wims_classes_direct_portal">
  56. !!   !href module=adm/class/classes&type=authparticipant&class=$wims_superclass&auth_user=$wims_user_ext $wims_institutionname
  57. !!  </span>
  58. !!  !if / isin $class_parent and $class_type=1
  59. !!    !set pname=!defof class_description in wimshome/log/classes/$class_parent/.def
  60. !!  / $
  61. !!   <span class="wims_classes_direct_class">
  62. !!  !href module=adm/class/classes&type=authparticipant&class=$class_parent&auth_user=$wims_user_ext $pname
  63. !! </span>
  64. !! !endif
  65. !!!endif
  66. !!</div> <!--wims_classes_direct-->
  67.  
  68. <div class="wims_content">
  69.  
  70. !if _tool isin $wims_session
  71.   !read ./tools.phtml
  72.   !goto end
  73. !endif
  74.  
  75. !if $n_>=4
  76.   !distribute words $etest into h_,s_,t_,n_
  77.   !set r_=!record 0 of wimshome/sessions/$s_/examreg.$n_
  78.   !set now=$wims_nowseconds
  79.   !set ws=!translate _ to $ $ in $wims_session
  80.   !set ws=!word 1 of $ws
  81.   !set sm=!record 0 of wimshome/log/classes/$wims_class/.E$n_
  82.   !if $r_!=$empty and $s_!=$ws and $t_>$now and $sm!=#
  83.    <span class="wims_warning">$wims_name_warning</span>.
  84.     $U_examworking
  85.     !if $h_=$httpd_REMOTE_ADDR
  86.       !href session=$s_&module=adm/class/exam&job=student&exam=$n_ $U_examcont
  87.     !else
  88.       $U_examdouble
  89.       !sh rm -f ../sessions/$ws/var.stat >/dev/null
  90.     !endif
  91.     !goto end
  92.   !endif
  93.   !if $t_<$now or $r_=$empty
  94.     !writefile wimshome/log/classes/$wims_class/.parmreg/$wims_user.exam
  95.   !endif
  96. !endif
  97. <p class="wims_greetings">$U_greet</p>
  98.  
  99. !if & isin $newmsgcnt or $newmsgcnt>0
  100.   <p class="wims_msg info">
  101.     !href module=adm/forum/mboard $U_newmsg
  102.   </p>
  103. !endif
  104.  
  105. !if $wims_supconnectshowed=yes and $wims_supervisorconnected!=$empty
  106.   <p class="wims_connected">$U_supconnected</p>
  107. !endif
  108.  
  109. !read themes/_widgets/motd.phtml
  110.  
  111. !if $class_type>=2
  112.   !read ./subclasses.phtml
  113.   !set is_interclass=yes
  114. !endif
  115.  
  116. !set seq_cnt=!record 0 of wimshome/log/classes/$wims_class/seq/.sequences
  117. !set seq_cnt=!line 1 of $seq_cnt
  118. !set seq_open=!defof sequence_open in wimshome/log/classes/$wims_class/seq/.def
  119.  
  120. !if $seq_open=yes
  121.   !if $seq_cnt>0
  122.     !read themes/_widgets/sequence.phtml
  123.   !endif
  124.   !goto endbar
  125. !endif
  126.  
  127. !!define variable $dcnt and dpcnt
  128. !read themes/_widgets/user_vardoc.phtml
  129. !read themes/_widgets/user_vardocp.phtml
  130.  
  131. !!define variable $n
  132. !read themes/_widgets/user_varsheet.phtml
  133.  
  134. !!define variable $m
  135. !read themes/_widgets/user_varexam.phtml
  136.  
  137. !!define variable $v
  138. !read themes/_widgets/user_varvote.phtml
  139.  
  140. !!define variable $gr
  141. !read themes/_widgets/user_varmanual.phtml
  142.  
  143. !!define variable $tcnt
  144. !read themes/_widgets/user_vartool.phtml
  145.  
  146. !!define variable $fwcnt
  147. !read themes/_widgets/user_varfreework.phtml
  148.  
  149. !!define variable $gcnt
  150. !read themes/_widgets/user_varglossary.phtml
  151. <div id="widget_user_list">
  152.   !ifval $dcnt+$dpcnt+$n+$m+$v+$tcnt+$gcnt>1
  153.     !if $jquery_defined=yes
  154.       !read adm/tabscript user_list
  155.     !endif
  156.     <ul id="wims_user_summary">
  157.       !if $[$dcnt+$dpcnt]>0
  158.         <li><a class="wims_doc_item" href="#wims_user_doc">$wims_name_Docs</a></li>
  159.       !endif
  160.       !if $n>0
  161.         <li><a class="wims_sheet_item" href="#wims_user_sheet">$wims_name_Sheets</a></li>
  162.       !endif
  163.       !if $m>0
  164.         <li><a class="wims_exam_item" href="#wims_user_exam">$wims_name_Examens</a></li>
  165.       !endif
  166.       !if $v>0
  167.         <li><a class="wims_vote_item" href="#wims_user_vote">$wims_name_Votes</a></li>
  168.       !endif
  169.       !if $tcnt+$gcnt>0
  170.         <li><a class="wims_tool_item" href="#wims_user_tool">$wims_name_tools</a></li>
  171.       !endif
  172.       !if $fwcnt>0
  173.         <li><a class="wims_freework_item" href="#wims_user_freework">$wims_name_Freeworks</a></li>
  174.       !endif
  175.     </ul>
  176.   !endif
  177.  
  178.   !read themes/_widgets/userdoc.phtml
  179.   !read themes/_widgets/usersheet.phtml
  180.   !read themes/_widgets/userexam.phtml
  181.   !read themes/_widgets/uservote.phtml
  182.   !read themes/_widgets/usertool.phtml
  183.   !read themes/_widgets/userfreework.phtml
  184. </div>
  185.  
  186. !read adm/class/seq_legend.phtml
  187. <br class="clearall" />
  188.  
  189. !ifval $dcnt+$dpcnt+$n+$m+$v+$tcnt=0
  190.   !if $is_interclass!=yes
  191.     <div class="wims_msg info">$U_nosheet</div>
  192.   !endif
  193. !endif
  194.  
  195. :endbar
  196. </div><!--wims_content-->
  197. </div><!--wimsbody-->
  198. </div><!--wimspagebox-->
  199.  
  200.  
  201. !read themes/_procs/usermenumodubox.proc
  202. !set wims_homeref_n0=!linecnt $wims_rm_0
  203.  
  204. !!must have read user*.phtml,  with *=sheet, exam must be read before
  205. !distribute items ul,li into div0,div1
  206. !read themes/_widgets/menumodubox.phtml
  207. !read themes/_widgets/usermenubox.phtml
  208. !reset div0 div1
  209.  
  210. !read themes/_widgets/topback.phtml
  211. </div><!--end of wimsbodybox-->
  212.  
  213. :end
  214. !read themes/_widgets/session_warn.phtml
  215. !read themes/_widgets/footer_foundation.phtml
  216. </body>
  217. </html>
  218. <!-- end of Nikaia/user.phtml -->
  219.