Subversion Repositories wimsdev

Rev

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