Subversion Repositories wimsdev

Rev

Rev 13840 | Rev 14308 | 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 $wims_theme/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. !read themes/_widgets/classtitle.phtml
  35.  
  36. !read adm/class/initclass $wims_superclass, auth
  37.  
  38. !!FIXME
  39. !!!if $auth_method isitemof $auth_method_list
  40. !!   !set wims_user_ext=!defof user_external_auth in wimshome/log/classes/$wims_superclass/.users/$wims_user
  41. !!!endif
  42. !!default wims_user_ext=$wims_user
  43.  
  44. !! (MC) the following seems to be needed for groupement to go back to
  45. !! the superclass (is it sufficient to change the name of the variable
  46. !! in the links below?)
  47. !default wims_user_ext=$ext_login
  48.  
  49. !!<div class="wims_classes_direct">
  50. !!!if $wims_superclass=$empty or $wims_superclass=$wims_class
  51. !!!else
  52. !!  <span class="wims_classes_direct_portal">
  53. !!   !href module=adm/class/classes&type=authparticipant&class=$wims_superclass&auth_user=$wims_user_ext $wims_institutionname
  54. !!  </span>
  55. !!  !if / isin $class_parent and $class_type=1
  56. !!   !set pname=!defof class_description in wimshome/log/classes/$class_parent/.def
  57. !! / $
  58. !!<span class="wims_classes_direct_class">
  59. !!  !href module=adm/class/classes&type=authparticipant&class=$class_parent&auth_user=$wims_user_ext $pname
  60. !! </span>
  61. !! !endif
  62. !!!endif
  63. !!</div> <!--wims_classes_direct-->
  64.  
  65. !if _tool isin $wims_session
  66.   !read ./tools.phtml
  67.   !goto end
  68. !endif
  69.  
  70. !if $n_>=4
  71.   !distribute words $etest into h_,s_,t_,n_
  72.   !set r_=!record 0 of wimshome/sessions/$s_/examreg.$n_
  73.   !set now=$wims_nowseconds
  74.   !set ws=!translate _ to $ $ in $wims_session
  75.   !set ws=!word 1 of $ws
  76.   !set sm=!record 0 of wimshome/log/classes/$wims_class/.E$n_
  77.   !if $r_!=$empty and $s_!=$ws and $t_>$now and $sm!=#
  78.    <span class="wims_warning">$wims_name_warning</span>.
  79.     $U_examworking
  80.     !if $h_=$httpd_REMOTE_ADDR
  81.       !href session=$s_&module=adm/class/exam&job=student&exam=$n_ $U_examcont
  82.     !else
  83.       $U_examdouble
  84.       !sh rm -f ../sessions/$ws/var.stat >/dev/null
  85.     !endif
  86.     !goto end
  87.   !endif
  88.   !if $t_<$now or $r_=$empty
  89.     !writefile wimshome/log/classes/$wims_class/.parmreg/$wims_user.exam
  90.   !endif
  91. !endif
  92. <p class="wims_greetings">$U_greet</p>
  93.  
  94. !if & isin $newmsgcnt or $newmsgcnt>0
  95.   <p class="wims_msg info">
  96.   !href module=adm/forum/mboard $U_newmsg
  97.   </p>
  98. !endif
  99.  
  100. !if $wims_supconnectshowed=yes and $wims_supervisorconnected!=$empty
  101.   <p class="wims_connected">$U_supconnected</p>
  102. !endif
  103.  
  104. !read themes/_widgets/motd.phtml
  105.  
  106. !if $class_type>=2
  107.   !read ./subclasses.phtml
  108.   !set is_interclass=yes
  109. !endif
  110.  
  111. !set seq_cnt=!record 0 of wimshome/log/classes/$wims_class/seq/.sequences
  112. !set seq_cnt=!line 1 of $seq_cnt
  113. !set seq_open=!defof sequence_open in wimshome/log/classes/$wims_class/seq/.def
  114.  
  115. !if $seq_open=yes
  116.   !if $seq_cnt>0
  117.     !read themes/_widgets/sequence.phtml
  118.   !endif
  119.   !goto endbar
  120. !endif
  121.  
  122. !read themes/_widgets/user_vardoc.phtml
  123. !read themes/_widgets/user_vardocp.phtml
  124. !read themes/_widgets/user_varsheet.phtml
  125. !read themes/_widgets/user_varexam.phtml
  126. !read themes/_widgets/user_varvote.phtml
  127. !read themes/_widgets/user_vartool.phtml
  128. !read themes/_widgets/user_varglossary.phtml
  129. !read themes/_widgets/user_varfreework.phtml
  130.  
  131. <div id="widget_user_list">
  132.  
  133. !ifval $gcnt+$tcnt+$dcnt+$dpcnt+$n+$m+$v>1
  134.   !if $jquery_defined=yes
  135.     !read adm/tabscript user_list
  136.   !endif
  137.   <ul id="wims_user_summary">
  138.   !if $[$dcnt+$dpcnt]>0
  139.     <li><a class="wims_doc_item" href="#wims_user_doc">$wims_name_Docs</a></li>
  140.   !endif
  141.   !if $n>0
  142.     <li><a class="wims_sheet_item" href="#wims_user_sheet">$wims_name_Sheets</a></li>
  143.   !endif
  144.   !if $m>0
  145.     <li><a class="wims_exam_item" href="#wims_user_exam">$wims_name_Examens</a></li>
  146.   !endif
  147.   !if $v>0
  148.     <li><a class="wims_vote_item" href="#wims_user_vote">$wims_name_Votes</a></li>
  149.   !endif
  150.   !if $gcnt+$tcnt>0
  151.     <li><a class="wims_tool_item" href="#wims_user_tool">$wims_name_tools</a></li>
  152.   !endif
  153.   !if $fwcnt>0
  154.     <li><a class="wims_freework_item" href="#wims_user_freework">$wims_name_Freeworks</a></li>
  155.   !endif
  156.   </ul>
  157. !endif
  158.  
  159. !read themes/_widgets/userdoc.phtml
  160. !read themes/_widgets/usersheet.phtml
  161. !read themes/_widgets/userexam.phtml
  162. !read themes/_widgets/uservote.phtml
  163. !read themes/_widgets/user_varmanual.phtml
  164. !read themes/_widgets/usertool.phtml
  165. !read themes/_widgets/userfreework.phtml
  166.  
  167. </div>
  168.  
  169. !ifval $gcnt+$tcnt+$dcnt+$dpcnt+$n+$m+$v=0
  170.   !if $is_interclass!=yes
  171.     <div class="wims_msg info">$U_nosheet</div>
  172.   !endif
  173. !endif
  174.  
  175. :endbar
  176. </div><!--wimsbody-->
  177. </div><!--wimspagebox-->
  178.  
  179. !!must have read user*.phtml,  with *=sheet, exam must be read before
  180. !distribute items div,div into div0,div1
  181.  
  182. !read themes/_procs/usermenumodubox.proc
  183. !set wims_homeref_n0=!linecnt $wims_rm_0
  184. !!read themes/_widgets/usermenumodubox_accordion.phtml
  185. !read themes/_widgets/menumodubox.phtml
  186.  
  187. !read themes/_widgets/topback.phtml
  188.  <br class="clearall" />
  189. </div><!--end of wimsbodybox-->
  190. :end
  191. !read themes/_widgets/session_warn.phtml
  192. !read themes/_widgets/footer_foundation.phtml
  193.  
  194. </body>
  195. </html>
  196. <!-- end of $wims_theme/user.phtml -->
  197.