Subversion Repositories wimsdev

Rev

Rev 12832 | Rev 14297 | 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 $gcnt
  147. !read themes/_widgets/user_varglossary.phtml
  148. <div id="widget_user_list">
  149.   !ifval $dcnt+$dpcnt+$n+$m+$v+$tcnt+$gcnt>1
  150.     !if $jquery_defined=yes
  151.       !read adm/tabscript user_list
  152.     !endif
  153.     <ul id="wims_user_summary">
  154.       !if $[$dcnt+$dpcnt]>0
  155.         <li><a class="wims_doc_item" href="#wims_user_doc">$wims_name_Docs</a></li>
  156.       !endif
  157.       !if $n>0
  158.         <li><a class="wims_sheet_item" href="#wims_user_sheet">$wims_name_Sheets</a></li>
  159.       !endif
  160.       !if $m>0
  161.         <li><a class="wims_exam_item" href="#wims_user_exam">$wims_name_Examens</a></li>
  162.       !endif
  163.       !if $v>0
  164.         <li><a class="wims_vote_item" href="#wims_user_vote">$wims_name_Votes</a></li>
  165.       !endif
  166.       !if $tcnt+$gcnt>0
  167.         <li><a class="wims_tool_item" href="#wims_user_tool">$wims_name_tools</a></li>
  168.       !endif
  169.     </ul>
  170.   !endif
  171.  
  172.   !read themes/_widgets/userdoc.phtml
  173.   !read themes/_widgets/usersheet.phtml
  174.   !read themes/_widgets/userexam.phtml
  175.   !read themes/_widgets/uservote.phtml
  176.   !read themes/_widgets/usertool.phtml
  177. </div>
  178.  
  179. !read adm/class/seq_legend.phtml
  180. <br class="clearall" />
  181.  
  182. !ifval $dcnt+$dpcnt+$n+$m+$v+$tcnt=0
  183.   !if $is_interclass!=yes
  184.     <div class="wims_msg info">$U_nosheet</div>
  185.   !endif
  186. !endif
  187.  
  188. :endbar
  189. </div><!--wims_content-->
  190. </div><!--wimsbody-->
  191. </div><!--wimspagebox-->
  192.  
  193.  
  194. !read themes/_procs/usermenumodubox.proc
  195. !set wims_homeref_n0=!linecnt $wims_rm_0
  196.  
  197. !!must have read user*.phtml,  with *=sheet, exam must be read before
  198. !distribute items ul,li into div0,div1
  199. !read themes/_widgets/menumodubox.phtml
  200. !read themes/_widgets/usermenubox.phtml
  201. !reset div0 div1
  202.  
  203. !read themes/_widgets/topback.phtml
  204. </div><!--end of wimsbodybox-->
  205.  
  206. :end
  207. !read themes/_widgets/session_warn.phtml
  208.  
  209. </body>
  210. </html>
  211. <!-- end of Nikaia/user.phtml -->
  212.