Subversion Repositories wimsdev

Rev

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