Subversion Repositories wimsdev

Rev

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

  1. <!-- begin of $wims_theme/user.phtml -->
  2. !! Class participant page theme.
  3. !nocache
  4. !if $module!=home
  5.  !exit
  6. !endif
  7. !!initialisation
  8. !set home_theme=yes
  9.  
  10. !set percents=!getscorepercent
  11. !set class_homepage=!getdef class_homepage in wimshome/log/classes/$wims_class/.def
  12. !set etest=!record 0 of wimshome/log/classes/$wims_class/.parmreg/$wims_user.exam
  13. !set n_=!wordcnt $etest
  14.  
  15. !if / isin $class_homepage and _tool notin $wims_session
  16.  !set deffile=wimshome/log/classes/$wims_class/doc/$class_homepage.def
  17.  !set t_=!getdef titb in $deffile
  18.  !if $t_=$empty or $n_>=4
  19.   !goto normal
  20.  !endif
  21.  !read ./userhome.phtml
  22.  !goto end
  23. !endif
  24.  
  25. :normal
  26. !read classlogo.phtml
  27. !if $class_logo!=
  28.  <div id="classlogo" class="float_$class_logoside">
  29.   <img src="$class_logo" alt="class logo" />
  30.  </div>
  31. !endif
  32.  
  33. !read ./adm/title.phtml 2\
  34.  <span class="wims_classname">$wims_classname</span> <span class="wims_class_typename">($(wims_name_$class_typename))</span>
  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. <div class="wims_classes_direct">
  45. !if $wims_superclass=$empty or $wims_superclass=$wims_class
  46.   $wims_institutionname
  47. !else
  48.   <span class="wims_classes_direct_portal">
  49.    !href module=adm/class/classes&type=authparticipant&class=$wims_superclass&auth_user=$wims_user_ext $wims_institutionname
  50.   </span>
  51.   !if / isin $class_parent and $class_type=1
  52.     !set pname=!defof class_description in wimshome/log/classes/$class_parent/.def
  53.   / $
  54.  <span class="wims_classes_direct_class">
  55.   !href module=adm/class/classes&type=authparticipant&class=$class_parent&auth_user=$wims_user_ext $pname
  56.  </span>
  57.  !endif
  58. !endif
  59. </div> <!--wims_classes_direct-->
  60.  
  61. !if _tool isin $wims_session
  62.  !read ./tools.phtml
  63.  !goto end
  64. !endif
  65.  
  66. !if $n_>=4
  67.  !distribute words $etest into h_,s_,t_,n_
  68.  !set r_=!record 0 of wimshome/sessions/$s_/examreg.$n_
  69.  !set now=$wims_nowseconds
  70.  !set ws=!translate _ to $ $ in $wims_session
  71.  !set ws=!word 1 of $ws
  72.  !set sm=!record 0 of wimshome/log/classes/$wims_class/.E$n_
  73.  !if $r_!=$empty and $s_!=$ws and $t_>$now and $sm!=#
  74.  <span class="wims_warning">$wims_name_warning</span>.
  75.   $U_examworking
  76.   !if $h_=$httpd_REMOTE_ADDR
  77.    !href session=$s_&module=adm/class/exam&job=student&exam=$n_ $U_examcont
  78.   !else
  79.    $U_examdouble
  80.    !sh rm -f ../sessions/$ws/var.stat >/dev/null
  81.   !endif
  82.   !goto end
  83.  !endif
  84.  !if $t_<$now or $r_=$empty
  85.   !writefile wimshome/log/classes/$wims_class/.parmreg/$wims_user.exam
  86.  !endif
  87. !endif
  88. <p class="wims_greetings">$U_greet</p>
  89.  
  90. !if & isin $newmsgcnt or $newmsgcnt>0
  91.  <p class="wims_newmsg">
  92.  !href module=adm/forum/mboard $U_newmsg
  93.  </p>
  94. !endif
  95.  
  96. !if $wims_supconnectshowed=yes and $wims_supervisorconnected!=$empty
  97.  <p class="wims_connected">$U_supconnected</p>
  98. !endif
  99.  
  100. !read themes/_widgets/motd.phtml
  101.  
  102. !if $class_type>=2
  103.  !read ./subclasses.phtml
  104.  !set is_interclass=yes
  105. !endif
  106.  
  107. !set seq_cnt=!record 0 of wimshome/log/classes/$wims_class/seq/.sequences
  108. !set seq_cnt=!line 1 of $seq_cnt
  109. !set seq_open=!defof sequence_open in wimshome/log/classes/$wims_class/seq/.def
  110.  
  111. !if $seq_open=yes
  112.   !if $seq_cnt>0
  113.     !read themes/_widgets/sequence.phtml
  114.   !endif
  115.   !goto endbar
  116. !endif
  117.  
  118. !read themes/_widgets/user_vardoc.phtml
  119. !read themes/_widgets/user_vardocp.phtml
  120. !read themes/_widgets/user_varsheet.phtml
  121. !read themes/_widgets/user_varexam.phtml
  122. !read themes/_widgets/user_varvote.phtml
  123.  
  124. !ifval $dcnt+$dpcnt+$n+$m+$v>1
  125.  <div id="widget_user_list">
  126.  !if $jquery_defined=yes
  127.   !read adm/tabscript user_list
  128.  !endif
  129. <ul id="wims_user_summary">
  130.  !if $[$dcnt+$dpcnt]>0
  131.   <li><a href="#wims_user_doc">$wims_name_Docs</a></li>
  132.  !endif
  133.  !if $n>0
  134.   <li><a href="#wims_user_sheet">$wims_name_Sheets</a></li>
  135.  !endif
  136.  !if $m>0
  137.   <li><a href="#wims_user_exam">$wims_name_Examens</a></li>
  138.  !endif
  139.  !if $v>0
  140.   <li><a href="#wims_user_vote">$wims_name_Votes</a></li>
  141.  !endif
  142. </ul>
  143. !!define variable $dcnt and $ dpcnt
  144. !read themes/_widgets/userdoc.phtml
  145. !!define variable $n
  146. !read themes/_widgets/usersheet.phtml
  147. !!define variable $m
  148. !read themes/_widgets/userexam.phtml
  149. !!define variable $v
  150. !read themes/_widgets/uservote.phtml
  151. </div>
  152. !endif
  153. !ifval $dcnt+$dpcnt+$n+$m+$v=0
  154.  !if $is_interclass!=yes
  155.    $U_nosheet
  156.  !endif
  157. !endif
  158.  
  159. :endbar
  160. </div><!--wimsbody-->
  161. </div><!--wimspagebox-->
  162.  
  163. !!must have read user*.phtml,  with *=sheet, exam must be read before
  164. !distribute items div,div into div0,div1
  165.  
  166. !read themes/_procs/usermenumodubox.proc
  167. !set wims_homeref_n0=!linecnt $wims_rm_0
  168. !!read themes/_widgets/usermenumodubox_accordion.phtml
  169. !read themes/_widgets/menumodubox.phtml
  170.  
  171. !read themes/_widgets/topback.phtml
  172.  
  173. !distribute items div,span into div0,div1
  174. !!read themes/_widgets/usermenubox.phtml
  175. !reset div0 div1
  176.  <br class="clearall" />
  177. </div><!--end of wimsbodybox-->
  178. :end
  179. </body>
  180. </html>
  181. <!-- end of $wims_theme/user.phtml -->
  182.  
  183.