Subversion Repositories wimsdev

Rev

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

  1. <!-- BEGIN of html/headmenu_user -->
  2. !read name.phtml.$lang
  3. !read themes/_lang/name.phtml.$lang
  4. !read themes/$wims_theme/lang/name.phtml.$lang
  5. !default wims_name_bgcolor=$wims_ref_bgcolor
  6. !if $wims_hm$wims_home_items$wims_link_close!=$empty
  7.   !goto defend
  8. !endif
  9.  
  10. !if $module=adm/class/tchat and $job=viewpage
  11.   !reset wims_hm,wims_home_items,wims_link_close
  12.   !let wims_hm=back,3,window.close();$wims_href_opener
  13.   !goto defend
  14. !endif
  15.  
  16. !reset 1_ home_
  17. !if _ isin $wims_session
  18.   !if _exam isin $wims_session
  19.     !set wims_pses=!translate _ to , in $wims_session
  20.     !set wims_pses=!item 1 of $wims_pses
  21.     !set wims_pser=!randint 1,99999
  22.     !set wims_href_opener=window.opener.location='$wims_ref_name?session=$wims_pses.1&+cmd=reply&+job=student&+randomizer=$wims_pser';
  23.     !! ---------- progressbar in case of course mode
  24.     !if $(wims_exrandomlist[3;])=1
  25.       !readproc examprogressbar.proc
  26.       !set 1_=!append line progress,0,&nbsp;$wims_progressbar&nbsp; to $1_
  27.     !endif
  28.     !! ---------- add timer on page
  29.     <script>
  30.       !read js/chronoid.js
  31.     </script>
  32.     !set 1_=!append line chrono,0,&nbsp;<span id="chrono_exam"></span>&nbsp;<script>clockid($wims_exam_remain,"chrono_exam");</script> to $1_
  33.   !endif
  34.   !if $module=adm/class/tchat
  35.     !if $job!=close
  36.       !set 1_=!append line tchatclose,1,cmd=reply&module=adm/class/tchat&job=close to $1_
  37.     !endif
  38.   !else
  39.     !set 1_=!append line back,3,window.close();$wims_href_opener to $1_
  40.   !endif
  41. !else
  42.   !if $module!=home or ($module=home and $seq!=$empty)
  43.     !set home_=!append line class_home,1,session=$wims_session.1 to $home_
  44.   !else
  45.     !set home_=!append line class_home,8, to $home_
  46.   !endif
  47. !endif
  48.  
  49. !!! deconnexion link
  50.  
  51. !if _ notin $wims_session
  52.   !if $class_cas_auth!=$empty
  53.     !if $wims_user=supervisor
  54.       !set wims_link_close=!append line visitor,1,cmd=close&module=adm/class/classes&type=supervisor&class_auth=$class_cas_auth to $wims_link_close
  55.     !else
  56.       !if $wims_class!=$empty
  57.         !set wims_link_close=!append line visitor,1,cmd=close&module=adm/class/classes&type=participant&class_auth=$class_cas_auth to $wims_link_close
  58.       !else
  59.         !set wims_link_close=!append line visitor,1,cmd=close&class_auth=$wims_cas_auth to $wims_link_close
  60.       !endif
  61.     !endif
  62.   !else
  63.     !if $wims_user=supervisor
  64.       !set wims_link_close=!append line visitor,1,cmd=close&module=adm/class/classes&type=supervisor to $wims_link_close
  65.     !else
  66.      !!!set registered=!record 0 of wimshome/$wims_sesdir/examreg.1
  67.      !if $registered!=$empty
  68. !! during an exam.
  69.         !set wims_link_close=!append line endexam,1,module=adm/class/exam&cmd=reply&job=scorereg to $wims_link_close
  70.       !else
  71.         !if $wims_user=anonymous
  72.           !set wims_link_close=!append line visitor,1,cmd=close&module=adm/class/classes&type=example to $wims_link_close
  73.         !else
  74.           !set wims_link_close=!append line visitor,1,cmd=close&module=adm/class/classes&type=participant to $wims_link_close
  75.         !endif
  76.       !endif
  77.     !endif
  78.   !endif
  79. !endif
  80.  
  81. !if _check isin $wims_session
  82.   !! it is the case for examlog or exolog or freeworklog
  83.   !set ckstep=$special_parm
  84.   !distribute item $wims_check into ckmodule,ckuser,cksession,ckexo,cksteps,score
  85.   !set qstr=module=$ckmodule&+cmd=new&+job=examcheck&+checkuser=$ckuser&+checksession=$cksession&+checkexo=$ckexo
  86.   !set 2_=$wims_page_name : &nbsp;
  87.   !ifval $ckstep>1
  88.     !set 2_=$2_<a href="$wims_ref_name?session=$session&+$qstr&+checkstep=1">1</a>&nbsp;
  89.     !if $ckstep=2
  90.       !set 2_=$(2_)2&nbsp;
  91.     !else
  92.       !if $ckstep=3
  93.         !set 2_=$(2_)<a href="$wims_ref_name?session=$session&+$qstr&+checkstep=2">2</a>&nbsp;3&nbsp;
  94.       !else
  95.         !set 2_=$(2_)&nbsp;...&nbsp;<a href="$wims_ref_name?session=$session&+$qstr&+checkstep=$[$ckstep-1]">$[$ckstep-1]</a>&nbsp;$ckstep&nbsp;
  96.       !endif
  97.     !endif
  98.   !else
  99.     !set 2_=$2_ 1 &nbsp;
  100.   !endif
  101.   !if $ckstep<$cksteps
  102.     !ifval $ckstep<$cksteps-2
  103.       !set 2_=$2_<a href="$wims_ref_name?session=$session&+$qstr&+checkstep=$[$ckstep+1]">$[$ckstep+1]</a>&nbsp;...&nbsp;<a href="$wims_ref_name?session=$session&+$qstr&+checkstep=$cksteps">$cksteps</a>
  104.     !else
  105.       !ifval $ckstep=$cksteps-2
  106.         !set 2_=$2_<a href="$wims_ref_name?session=$session&+$qstr&+checkstep=$[$ckstep+1]">$[$ckstep+1]</a>&nbsp;<a href="$wims_ref_name?session=$session&+$qstr&+checkstep=$cksteps">$cksteps</a>
  107.       !else
  108.         !ifval $ckstep=$cksteps-1
  109.           !set 2_=$2_<a href="$wims_ref_name?session=$session&+$qstr&+checkstep=$[$ckstep+1]">$[$ckstep+1]</a>
  110.         !endif
  111.       !endif
  112.     !endif
  113.   !endif
  114.   !set 1_=!append line nav,0,$2_ to $1_
  115.   !set 3_=!translate internal - to , in $ckexo
  116.   !set 3_=!item -1 of $3_
  117.   !if $wims_user=supervisor
  118.     !if $ckexo=file and $wims_checktitle!=$empty
  119.       !set tmp=$wims_checktitle
  120.     !else
  121.       !set tmp=$ckuser: $3_=$module,$cksteps steps, $score/10
  122.     !endif
  123.   !else
  124.     !set tmp=
  125.   !endif
  126.   !set 2_=<small>$tmp.</small>
  127.   !reset tmp
  128.   !set wims_hm=!append line score,0,$2_ to $1_
  129.   !goto defend
  130. !endif
  131. !!!if adm/forum notin $module and _ notin $wims_session \
  132. !!  and $wims_sheet=$empty
  133.  !!!set 1_=!append line forum,1,module=adm/forum/mboard to $1_
  134. !!!endif
  135. !!if $cmd=intro
  136. !! !set 1_=!append line work,1,module=$module&cmd=new to $1_
  137. !!endif
  138. !if _exam isin $wims_session
  139.   !set 1_=!append line tools,4,module=home,tool to $1_
  140. !endif
  141. !!!if _ notin $wims_session and adm/ notin $module and $cmd notwordof help ref
  142.  !!!set 1_=!append line reference,4,module=$module&cmd=ref&special_parm=$cmd,ref to $1_
  143. !!!endif
  144. :ariane_sheet
  145. !if ($wims_sequence>0 or $m_wims_sequence>0) \
  146.   and (adm/sheet isin $module or $module_category!=adm or $module=adm/doc)
  147.   !set tmp_=$m_wims_sequence
  148.   !default tmp_=$wims_sequence
  149.   !if $wims_user=supervisor
  150.     !set wims_ariane=!append line sequence,1,module=adm/class/sequence&seq=$tmp_\
  151. to $wims_ariane
  152.   !else
  153.     !set wims_ariane=!append line sequence,1,module=home&seq=$tmp_#sh$wims_sheet to $wims_ariane
  154.  !endif
  155.   !reset tmp_
  156.   !set wims_ariane_self=no
  157. !else
  158.   !if adm/doc isin $module and $wims_user!=supervisor
  159.     !set wims_ariane=!append line doc,8 to $wims_ariane
  160.     !set wims_ariane_self=no
  161.   !endif
  162.   !if adm/class/freework isin $module
  163.     !set wims_ariane=!append line Freework $freework,1,module=adm/class/freework&freework=$freework to $wims_ariane
  164.     !set wims_ariane_self=no
  165.   !endif
  166. !endif
  167. !if $wims_sheet>0 or P isin $wims_sheet
  168.    !if swork=$(wims_listexo[1])
  169.      !set wims_ariane=!append line swork,1,module=adm/class/swork& to $wims_ariane
  170.    !else
  171.      !set wims_ariane=!append line sheet,1,module=adm/sheet&sh=$wims_sheet#ex$wims_exo to $wims_ariane
  172.   !endif
  173.    !set wims_ariane_self=no
  174. !else
  175.    !if adm/sheet isin $module
  176.      !set wims_ariane=!append line sheet,8 to $wims_ariane
  177.      !set wims_ariane_self=no
  178.    !endif
  179. !endif
  180.  
  181. !if $job=print or $printing=yes
  182.   !!goto defend
  183. !endif
  184. !if $cmd=help or $cmd=hint
  185.   !set 1_=!append line resume,1,cmd=resume to $1_
  186. !endif
  187. !if $module_has_intro=yes and $cmd notwordof intro help and \
  188.     $wims_sheet=$empty and $wims_fwnumber=$empty and exam notin $wims_session \
  189.     and mfeed notin $wims_session and $wims_freework=$empty \
  190.     and ($wims_user=$empty or $wims_user=supervisor)
  191.   !if $wims_theme!=default
  192.     !set wims_ariane=!append line intro,1,module=$module&cmd=intro&special_parm=$special_parm&special_parm2=$special_parm2&special_parm3=$special_parm3&special_parm4=$special_parm4 to $wims_ariane
  193.     !set wims_ariane_self=no
  194.   !else
  195.     !set 1_=!append line intro,1,module=$module&cmd=intro&special_parm=$special_parm&special_parm2=$special_parm2&special_parm3=$special_parm3&special_parm4=$special_parm4 to $1_
  196.   !endif
  197. !endif
  198. !if $wims_fwnumber!=$empty
  199.     !set wims_ariane=!append line freework,1,module=adm/class/freework&cmd=new&freework=$(wims_fwnumber) to $wims_ariane
  200.     !set wims_ariane_self=no
  201. !endif
  202. !! ------------ add link for sendbug (TEST TO BE IMPROVED ?)
  203. !! TODO : change name of the window to open should be deleted when
  204. !if $wims_class!=$empty and $wims_user=supervisor and adm/ notin $module and classes/ notin $module and devel/ notin $module and $module!=home and $cmd!=intro
  205.   !let number_=!randint 1,1000
  206.   !set 1_=!append line sendbug,4,module=adm/sendbug&cmd=new,sendbug$(number_) to $1_
  207. !endif
  208. !if $module_has_help=yes and $cmd notwordof intro help and _exam notin $wims_session
  209.   !if $module_help=$empty or $module_help=popup
  210.     !set 1_=!append line help,4,module=$module&cmd=help&special_parm=$wims_help_parm,mhelp to $1_
  211.   !else
  212.     !set 1_=!append line help,1,module=$module&cmd=help&special_parm=$wims_help_parm to $1_
  213.   !endif
  214. !endif
  215.  
  216. !if $wims_theme_version=0
  217.   !if _ notin $wims_session
  218.     !set 1_=!append line whelp,4,module=help/main&$wims_helper,help to $1_
  219.   !endif
  220. !endif
  221.  
  222. !!********* Link: "About"
  223. !if $module_has_about=yes and $cmd notwordof help and $module!=home \
  224.     and _exam notin $wims_session and _mfeed notin $wims_session \
  225.     and ($wims_user iswordof supervisor developper or $wims_user=$empty)
  226.   !set 1_=!append line about,4,module=$module&cmd=help&special_parm=about,mhelp,,$wims_name_module_infos ($module) to $1_
  227. !endif
  228.  
  229. !set wims_hm=$1_
  230. !set wims_home_items=$home_
  231. :defend
  232. !set wims_hm_cnt=!linecnt $wims_hm
  233. !set wims_home_items_cnt=!linecnt $wims_home_items
  234. !set wims_link_close_cnt=!linecnt $wims_link_close
  235. !set wims_ariane_cnt=!linecnt $wims_ariane
  236. !read themes.phtml header
  237. <!--BEGINSUPVIEW-->
  238. <div class="wimsbody">
  239. !read themes/_widgets/adminalert.phtml
  240. <!-- END of html/headmenu_user -->
  241. !read themes/_widgets/freeworkmanage.phtml head
  242.