Subversion Repositories wimsdev

Rev

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