Subversion Repositories wimsdev

Rev

Rev 7074 | Rev 7759 | 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!=$empty
  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. <div class="wims_content">
  71.  
  72. !if _tool isin $wims_session
  73.  !read ./tools.phtml
  74.  !goto end
  75. !endif
  76. !set supmail=!mailurl $wims_supervisormail $wims_name_mail
  77. !set supmail=!replace internal <a by <a class="mail" in $supmail
  78. !if $n_>=4
  79.  !distribute words $etest into h_,s_,t_,n_
  80.  !set r_=!record 0 of wimshome/sessions/$s_/examreg.$n_
  81.  !set now=$wims_nowseconds
  82.  !set ws=!translate _ to $ $ in $wims_session
  83.  !set ws=!word 1 of $ws
  84.  !set sm=!record 0 of wimshome/log/classes/$wims_class/.E$n_
  85.  !if $r_!=$empty and $s_!=$ws and $t_>$now and $sm!=#
  86.  <span class="wims_warning">$wims_name_warning</span>.
  87.   $U_examworking
  88.   !if $h_=$httpd_REMOTE_ADDR
  89.    !href session=$s_&module=adm/class/exam&job=student&exam=$n_ $U_examcont
  90.   !else
  91.    $U_examdouble
  92.    !sh rm -f ../sessions/$ws/var.stat >/dev/null
  93.   !endif
  94.   !goto end
  95.  !endif
  96.  !if $t_<$now or $r_=$empty
  97.   !writefile wimshome/log/classes/$wims_class/.parmreg/$wims_user.exam
  98.  !endif
  99. !endif
  100. $U_greet
  101.  
  102. !if & isin $newmsgcnt or $newmsgcnt>0
  103.  <p class="wims_newmsg">
  104.  !href module=adm/forum/mboard $U_newmsg
  105.  </p>
  106. !endif
  107.  
  108. !if $wims_supconnectshowed=yes and $wims_supervisorconnected!=$empty
  109.  <p>$U_supconnected</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. !ifval $dcnt+$dpcnt+$n+$m+$v=0
  139.  !if $is_interclass!=yes
  140.    $U_nosheet
  141.  !endif
  142. !endif
  143.  
  144. :endbar
  145. </div><!--wims_content-->
  146. </div><!--wimsbody-->
  147. </div><!--wimspagebox-->
  148.  
  149.  <br class="clearall" />
  150.  
  151.  
  152. !!must have read user*.phtml,  with *=sheet, exam must be read before
  153. !distribute items div,ul into div0,div1
  154. !read themes/_widgets/usermenumodubox.phtml
  155.  
  156. !distribute items ul,li into div0,div1
  157. !read themes/_widgets/usermenubox.phtml
  158. !reset div0 div1
  159.  
  160. </div><!--end of wimsbodybox-->
  161. :end
  162. </body>
  163. </html>
  164. <!-- end of $wims_theme/user.phtml -->
  165.  
  166.