Subversion Repositories wimsdev

Rev

Rev 10622 | Rev 11103 | 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!=
  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_newmsg">
  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.  
  128. <div id="widget_user_list">
  129.  
  130.   !ifval $dcnt+$dpcnt+$n+$m+$v>1
  131.     !if $jquery_defined=yes
  132.       !read adm/tabscript user_list
  133.     !endif
  134.     <ul id="wims_user_summary">
  135.       !if $[$dcnt+$dpcnt]>0
  136.         <li><a href="#wims_user_doc">$wims_name_Docs</a></li>
  137.       !endif
  138.       !if $n>0
  139.         <li><a href="#wims_user_sheet">$wims_name_Sheets</a></li>
  140.       !endif
  141.       !if $m>0
  142.         <li><a href="#wims_user_exam">$wims_name_Examens</a></li>
  143.       !endif
  144.       !if $v>0
  145.         <li><a href="#wims_user_vote">$wims_name_Votes</a></li>
  146.       !endif
  147.     </ul>
  148.   !endif
  149.  
  150.   !!define variable $dcnt and $ dpcnt
  151.   !read themes/_widgets/userdoc.phtml
  152.   !!define variable $n
  153.   !read themes/_widgets/usersheet.phtml
  154.   !!define variable $m
  155.   !read themes/_widgets/userexam.phtml
  156.   !!define variable $v
  157.   !read themes/_widgets/uservote.phtml
  158. </div>
  159.  
  160. !ifval $dcnt+$dpcnt+$n+$m+$v=0
  161.  !if $is_interclass!=yes
  162.   <div class="wims_msg info">$U_nosheet</div>
  163.  !endif
  164. !endif
  165.  
  166. :endbar
  167. </div><!--wimsbody-->
  168. </div><!--wimspagebox-->
  169.  
  170. !!must have read user*.phtml,  with *=sheet, exam must be read before
  171. !distribute items div,div into div0,div1
  172.  
  173. !read themes/_procs/usermenumodubox.proc
  174. !set wims_homeref_n0=!linecnt $wims_rm_0
  175. !!read themes/_widgets/usermenumodubox_accordion.phtml
  176. !read themes/_widgets/menumodubox.phtml
  177.  
  178. !read themes/_widgets/topback.phtml
  179.  
  180. !distribute items div,span into div0,div1
  181. !!read themes/_widgets/usermenubox.phtml
  182. !reset div0 div1
  183.  <br class="clearall" />
  184. </div><!--end of wimsbodybox-->
  185. :end
  186. </body>
  187. </html>
  188. <!-- end of $wims_theme/user.phtml -->
  189.  
  190.