Subversion Repositories wimsdev

Rev

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

  1. <!-- begin of $wims_theme/user.phtml -->
  2.  
  3. !! Class participant page theme.
  4. !nocache
  5. !if $module!=home
  6.  !exit
  7. !endif
  8. !!initialisation
  9. !set home_theme=yes
  10.  
  11. !set class_authidp=!defof class_authidp in wimshome/log/classes/$wims_superclass/.def
  12. !set auth_method_list=cas,ldap,php
  13. !set auth_method=$(class_authidp[1;])
  14. !if $(class_authidp[1;]) isitemof $auth_method_list
  15.   !set ext_login=$wims_external_auth
  16. !endif
  17. !default ext_login=$wims_user
  18.  
  19. !set percents=!getscorepercent
  20. !set class_homepage=!getdef class_homepage in wimshome/log/classes/$wims_class/.def
  21. !set etest=!record 0 of wimshome/log/classes/$wims_class/.parmreg/$wims_user.exam
  22. !set n_=!wordcnt $etest
  23.  
  24. !if / isin $class_homepage and _tool notin $wims_session
  25.  !set deffile=wimshome/log/classes/$wims_class/doc/$class_homepage.def
  26.  !set t_=!getdef titb in $deffile
  27.  !if $t_=$empty or $n_>=4
  28.   !goto normal
  29.  !endif
  30.  !read ./userhome.phtml
  31.  !goto end
  32. !endif
  33.  
  34. :normal
  35. !read classlogo.phtml
  36. !if $class_logo!=
  37.  <div id="wimslogo$class_logoside">
  38.   <img src="$class_logo" alt="class logo"/>
  39.  </div>
  40. !endif
  41.  
  42. !read ./adm/title.phtml 2\
  43.  <span class="wims_classname">$wims_classname</span> <span class="wims_class_typename">($(wims_name_$class_typename))</span>
  44.  
  45. !read adm/class/initclass $wims_superclass, auth
  46.  
  47. !!FIXME
  48. !if $auth_method isitemof $auth_method_list
  49.    !set wims_user_ext=!defof user_external_auth in wimshome/log/classes/$wims_superclass/.users/$wims_user
  50. !endif
  51. !default wims_user_ext=$wims_user
  52.  
  53. <div class="wims_classes_direct">
  54. !if $wims_superclass=$empty or $wims_superclass=$wims_class
  55.   $wims_institutionname
  56. !else
  57.   <span class="wims_classes_direct_portal">
  58.    !href module=adm/class/classes&type=authparticipant&class=$wims_superclass&auth_user=$wims_user_ext $wims_institutionname
  59.   </span>
  60.   !if / isin $class_parent and $class_type=1
  61.     !set pname=!defof class_description in wimshome/log/classes/$class_parent/.def
  62.   /
  63.  <span class="wims_classes_direct_class">
  64.   !href module=adm/class/classes&type=authparticipant&class=$class_parent&auth_user=$wims_user_ext $pname
  65.  </span>
  66.  !endif
  67. !endif
  68. </div> <!--wims_classes_direct-->
  69.  
  70. !if _tool isin $wims_session
  71.  !read ./tools.phtml
  72.  !goto end
  73. !endif
  74. !set supmail=!mailurl $wims_supervisormail $wims_name_mail
  75. !set supmail=!replace internal <a by <a class="mail" in $supmail
  76. !if $n_>=4
  77.  !distribute words $etest into h_,s_,t_,n_
  78.  !set r_=!record 0 of wimshome/sessions/$s_/examreg.$n_
  79.  !set now=$wims_nowseconds
  80.  !set ws=!translate _ to $ $ in $wims_session
  81.  !set ws=!word 1 of $ws
  82.  !set sm=!record 0 of wimshome/log/classes/$wims_class/.E$n_
  83.  !if $r_!=$empty and $s_!=$ws and $t_>$now and $sm!=#
  84.  <span class="wims_warning">$wims_name_warning</span>.
  85.   $U_examworking
  86.   !if $h_=$httpd_REMOTE_ADDR
  87.    !href session=$s_&module=adm/class/exam&job=student&exam=$n_ $U_examcont
  88.   !else
  89.    $U_examdouble
  90.    !sh rm -f ../sessions/$ws/var.stat >/dev/null
  91.   !endif
  92.   !goto end
  93.  !endif
  94.  !if $t_<$now or $r_=$empty
  95.   !writefile wimshome/log/classes/$wims_class/.parmreg/$wims_user.exam
  96.  !endif
  97. !endif
  98. $U_greet
  99.  
  100. !if & isin $newmsgcnt or $newmsgcnt>0
  101.  <p class="wims_newmsg">
  102.  !href module=adm/forum/mboard $U_newmsg
  103.  </p>
  104. !endif
  105.  
  106. !if $wims_supconnectshowed=yes and $wims_supervisorconnected!=$empty
  107.  <p>
  108.  $U_supconnected
  109.  </p>
  110. !endif
  111.  
  112. !read themes/_widgets/motd.phtml
  113.  
  114. !if $class_type>=2
  115.  !read ./subclasses.phtml
  116.  !set is_interclass=yes
  117. !endif
  118.  
  119. !set seq_cnt=!record 0 of wimshome/log/classes/$wims_class/seq/.sequences
  120. !set seq_cnt=!line 1 of $seq_cnt
  121. !set seq_open=!defof sequence_open in wimshome/log/classes/$wims_class/seq/.def
  122.  
  123. !if $seq_open=yes and $seq_cnt>0
  124.   !read themes/_widgets/sequence.phtml
  125.   !goto endbar
  126. !endif
  127. !!define variable $dcnt
  128. !read themes/_widgets/userdoc.phtml
  129. !!define variable dpcnt
  130. !read themes/_widgets/userdocp.phtml
  131. !!define variable $n
  132. !read themes/_widgets/usersheet.phtml
  133. !!define variable $m
  134. !read themes/_widgets/userexam.phtml
  135. !!define variable $v
  136. !read themes/_widgets/uservote.phtml
  137.  
  138.  
  139. !ifval $dcnt+$dpcnt+$n+$m+$v=0
  140.  !if $is_interclass!=yes
  141.    $U_nosheet
  142.  !endif
  143. !endif
  144.  
  145. :endbar
  146. </div><!--wimsbody-->
  147. </div><!--wimspagebox-->
  148.  
  149. !!must have read user*.phtml,  with *=sheet, exam must be read before
  150. !distribute items div,ul into div0,div1
  151. !read themes/_widgets/usermenumodubox.phtml
  152.  
  153. !distribute items ul,li into div0,div1
  154. !read themes/_widgets/usermenubox.phtml
  155. !reset div0 div1
  156.  <br class="clearall"/>
  157. </div><!--end of wimsbodybox-->
  158. :end
  159. </body>
  160. </html>
  161. <!-- end of $wims_theme/user.phtml -->
  162.  
  163.