Subversion Repositories wimsdev

Rev

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