Subversion Repositories wimsdev

Rev

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