Subversion Repositories wimsdev

Rev

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

  1. <!-- BEGIN of html/headmenu_* -->
  2. !read name.phtml.$lang
  3. !read themes/$wims_theme/lang/name.phtml.$lang
  4. !default wims_name_bgcolor=$wims_ref_bgcolor
  5. !if $wims_hm$wims_home_items$wims_link_close!=$empty
  6.  !goto defend
  7. !endif
  8.  
  9. !reset 1_ home_
  10. !if _ isin $wims_session
  11.  !if _exam isin $wims_session
  12.   !set wims_pses=!translate _ to , in $wims_session
  13.   !set wims_pses=!item 1 of $wims_pses
  14.   !set wims_pser=!randint 1,99999
  15.   !set wims_href_opener=window.opener.location='$wims_ref_name?session=$wims_pses.1&+cmd=reply&+job=student&+randomizer=$wims_pser';
  16.  !endif
  17.  !set 1_=!append line back,3,window.close();$wims_href_opener to $1_
  18. !else
  19.   !if $module!=home or ($module=home and $seq!=$empty)
  20.    !set home_=!append line class_home,1,session=$wims_session.1 to $home_
  21.   !else
  22.    !set home_=!append line class_home,8, to $home_
  23.   !endif
  24. !endif
  25.  
  26. !!! deconnexion link
  27.  
  28. !if _ notin $wims_session
  29.  !if $class_cas_auth!=$empty
  30.   !if $wims_user=supervisor
  31.      !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
  32.   !else
  33.    !if $wims_class!=$empty
  34.      !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
  35.    !else
  36.     !set wims_link_close=!append line visitor,1,cmd=close&class_auth=$wims_cas_auth to $wims_link_close
  37.    !endif
  38.   !endif
  39.  !else
  40.   !if $wims_user=supervisor
  41.     !set wims_link_close=!append line visitor,1,cmd=close&module=adm/class/classes&type=supervisor to $wims_link_close
  42.   !else
  43.      !if $wims_user=anonymous
  44.        !set wims_link_close=!append line visitor,1,cmd=close&module=adm/class/classes&type=example to $wims_link_close
  45.      !else
  46. !! FIXME this never happens as _ is not in $wims_session !
  47.        !if _exam notin $wims_session
  48.          !set wims_link_close=!append line visitor,1,cmd=close&module=adm/class/classes&type=participant to $wims_link_close
  49.        !endif
  50.     !endif
  51.   !endif
  52.  !endif
  53. !endif
  54.  
  55. !if _check isin $wims_session
  56. !! it is the case for examlog or exolog
  57.  !set ckstep=$special_parm
  58.  !distribute item $wims_check into ckmodule,ckuser,cksession,ckexo,cksteps,score
  59.  !set qstr=module=$ckmodule&+cmd=new&+job=examcheck&+checkuser=$ckuser&+checksession=$cksession&+checkexo=$ckexo
  60.  !set 2_=$wims_page_name : &nbsp;
  61.  !ifval $ckstep>1
  62.   !set 2_=$2_<a href="$wims_ref_name?session=$session&+$qstr&+checkstep=1">1</a>&nbsp;
  63.   !if $ckstep=2
  64.    !set 2_=$(2_)2&nbsp;
  65.   !else
  66.    !if $ckstep=3
  67.     !set 2_=$(2_)<a href="$wims_ref_name?session=$session&+$qstr&+checkstep=2">2</a>&nbsp;3&nbsp;
  68.    !else
  69.     !set 2_=$(2_)&nbsp;...&nbsp;<a href="$wims_ref_name?session=$session&+$qstr&+checkstep=$[$ckstep-1]">$[$ckstep-1]</a>&nbsp;$ckstep&nbsp;
  70.    !endif
  71.   !endif
  72.  !else
  73.   !set 2_=$2_ 1 &nbsp;
  74.  !endif
  75.  !if $ckstep<$cksteps
  76.   !ifval $ckstep<$cksteps-2
  77.    !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>
  78.   !else
  79.    !ifval $ckstep=$cksteps-2
  80.     !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>
  81.    !else
  82.     !ifval $ckstep=$cksteps-1
  83.      !set 2_=$2_<a href="$wims_ref_name?session=$session&+$qstr&+checkstep=$[$ckstep+1]">$[$ckstep+1]</a>
  84.     !endif
  85.    !endif
  86.   !endif
  87.  !endif
  88.  !set 1_=!append line nav,0,$2_ to $1_
  89.  !set 3_=!translate internal - to , in $ckexo
  90.  !set 3_=!item -1 of $3_
  91.  !set 2_=<small>$ckuser: $3_=$module. $cksteps steps, $score/10.</small>
  92.  !set wims_hm=!append line score,0,$2_ to $1_
  93.  !goto defend
  94. !endif
  95. !!!if adm/forum notin $module and _ notin $wims_session \
  96. !!      and $wims_sheet=$empty
  97.  !!!set 1_=!append line forum,1,module=adm/forum/mboard to $1_
  98. !!!endif
  99. !!if $cmd=intro
  100. !! !set 1_=!append line work,1,module=$module&cmd=new to $1_
  101. !!endif
  102. !if _exam isin $wims_session
  103.  !set 1_=!append line tools,4,module=home,tool to $1_
  104. !endif
  105. !!!if _ notin $wims_session and adm/ notin $module and $cmd notwordof help ref
  106.  !!!set 1_=!append line reference,4,module=$module&cmd=ref&special_parm=$cmd,ref to $1_
  107. !!!endif
  108. :ariane_sheet
  109. !if ($wims_sequence>0 or $m_wims_sequence>0) and (adm/sheet isin $module or $module_category!=adm or $module=adm/doc)
  110.   !set tmp_=$m_wims_sequence
  111.   !default tmp_=$wims_sequence
  112.   !if $wims_user=supervisor
  113.     !set wims_ariane=!append line sequence,1,module=adm/class/sequence&seq=$tmp_\
  114. to $wims_ariane
  115.   !else
  116.     !set wims_ariane=!append line sequence,1,module=home&seq=$tmp_ to $wims_ariane
  117.   !endif
  118.   !reset tmp_
  119.   !set wims_ariane_self=no
  120. !else
  121.   !if adm/doc isin $module and $wims_user!=supervisor
  122.     !set wims_ariane=!append line doc,8 to $wims_ariane
  123.     !set wims_ariane_self=no
  124.   !endif
  125. !endif
  126. !if $wims_sheet>0 or P isin $wims_sheet
  127.    !set wims_ariane=!append line sheet,1,module=adm/sheet&sh=$wims_sheet to $wims_ariane
  128.    !set wims_ariane_self=no
  129. !else
  130.    !if adm/sheet isin $module
  131.      !set wims_ariane=!append line sheet,8 to $wims_ariane
  132.      !set wims_ariane_self=no
  133.    !endif
  134. !endif
  135.  
  136. !if $job=print or $printing=yes
  137.  !!goto defend
  138. !endif
  139. !if $cmd=help or $cmd=hint
  140.  !set 1_=!append line resume,1,cmd=resume to $1_
  141. !endif
  142. !if $module_has_intro=yes and $cmd notwordof intro help and \
  143.         $wims_sheet=$empty and exam notin $wims_session and mfeed notin $wims_session
  144.    !if $wims_theme!=default
  145.      !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
  146.      !set wims_ariane_self=no
  147.    !else
  148.      !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_
  149.    !endif
  150. !endif
  151. !if $module_has_help=yes and $cmd notwordof intro help and _exam notin $wims_session
  152.  !if $module_help=$empty or $module_help=popup
  153.    !set 1_=!append line help,4,module=$module&cmd=help&special_parm=$wims_help_parm,mhelp to $1_
  154.  !else
  155.    !set 1_=!append line help,1,module=$module&cmd=help&special_parm=$wims_help_parm to $1_
  156.  !endif
  157. !endif
  158.  
  159. !if $wims_theme_version=0
  160.   !if _ notin $wims_session
  161.     !set 1_=!append line whelp,4,module=help/main&$wims_helper,help to $1_
  162.   !endif
  163. !endif
  164.  
  165. !!********* Link: "About"
  166. !if $module_has_about=yes and $cmd notwordof help and $module!=home \
  167.   and _exam notin $wims_session and _mfeed notin $wims_session \
  168.   and (adm notin $module or $wims_user iswordof supervisor developper or $wims_user=$empty)
  169.   !set 1_=!append line about,4,module=$module&cmd=help&special_parm=about,mhelp,,$wims_name_module_infos ($module) to $1_
  170. !endif
  171.  
  172. !set wims_hm=$1_
  173. !set wims_home_items=$home_
  174. :defend
  175. !set wims_hm_cnt=!linecnt $wims_hm
  176. !set wims_home_items_cnt=!linecnt $wims_home_items
  177. !set wims_link_close_cnt=!linecnt $wims_link_close
  178. !set wims_ariane_cnt=!linecnt $wims_ariane
  179. !read themes.phtml header
  180. <div class="wimsbody">
  181. <!-- END of html/headmenu_* -->
  182.