!!##preparation of the "bottom menu"
!if _check isin $session or $wims_mode=popup or yes isin $wims_lightpopup
!endif
!if _test isin $session and $wims_hacked_variables!=$empty
<p><b>WIMS WARNING</b>. The following variables of your module could be hacked
by students using manually modified http addresses! You might want to put more
strict permissions to them in var.def, in order to build a secure exercise module.
<p><tt><b>$wims_hacked_variables</b></tt>
<p>
!endif
!read name.phtml.$lang
!default wims_homeref_bgcolor=$wims_ref_bgcolor
!if exam isin $wims_session
!set wims_hr_r
=$
[max(0,$wims_exam_remain)]
!set wims_hr_rm
=$
[floor($wims_hr_r/60)]
!set wims_hr_rs=!char 2,3 of $[$wims_hr_r%60+100]
!set wims_homeref_special=$wims_name_examremain $wims_hr_rm:$wims_hr_rs ($wims_name_whenloaded)
!goto rmend
!endif
!if $wims_rm_1=no
!goto local
!endif
!if $wims_rm_1!=$empty
!goto rm2
!endif
!if _ isin $wims_subsession
!set 1_=!append line back2,3,window.close() to $1_
!else
!set 1_=!append line class_home,1,session=$wims_session.1 to $1_
!endif
!!if $wims_sheet>0
!! !set 1_=!append line sheetmanagement,1,module=adm/class/sheet&sheet=$wims_sheet to $1_
!!endif
!!if P isin $wims_sheet
!! !set 1_=!append line sheet,1,module=adm/sheet&sh=$wims_sheet to $1_
!!endif
!if $wims_sheet>0 or P isin $wims_sheet
!if $wims_sheet>0
!set tmp_=sheetmanagement,1,module=adm/class/sheet&sheet=$wims_sheet
!else
!set tmp_=sheet,1,module=adm/sheet&sh=$wims_sheet&
!endif
!set 1_=!append line $tmp_ to $1_
!let wims_menu_items=!append line $tmp_ to $wims_menu_items
!if $wims_exo>1
!let wims_menu_items=!append line previousseries,1,module=home&directworksheet=$wims_sheet.$[$wims_exo-1] to $wims_menu_items
!endif
!if $wims_exo<$wims_sheetmax
!let wims_menu_items=!append line nextseries,1,module=home&directworksheet=$wims_sheet.$[$wims_exo+1] to $wims_menu_items
!endif
!endif
!if $cmd=help or $cmd=hint
!set 1_=!append line resume,1,cmd=resume to $1_
!endif
!if $module_has_intro=yes and $cmd notwordof intro help and\
$wims_sheet=$empty and exam notin $wims_session
!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_
!endif
!if $module_has_help=yes and $cmd notwordof intro help
!if $module_help=$empty or $module_help=popup
!set 1_=!append line help,4,module=$module&cmd=help&special_parm=$wims_help_parm,mhelp to $1_
!else
!set 1_=!append line help,1,module=$module&cmd=help&special_parm=$wims_help_parm to $1_
!endif
!endif
!if $module_has_about=yes and $cmd notwordof help intro
!set 1_=!append line about,4,module=$module&cmd=help&special_parm=about,mhelp to $1_
!endif
!if print isin $job,$job2 or $print!=
!set 1_=!append line print,3,window.print() to $1_
!endif
!set wims_rm_1=$1_
:local
!if $wims_developer!=$empty and COPYING isin $module_copyright and ../classes/ notin ../$module
!set V_=!char 1 of $module
!set M_=!translate internal / to , in $module
!set M_=!item 1 of $M_
!if $V_ isin ABCDEFGHIJKLMNOPQRTSUVWXYZ or $M_ iswordof local contrib tool
!set 1_=!append line modify,1,module=adm/modtool&original=$module to $1_
!endif
!endif
!if $wims_user=supervisor and _adm/doc notin _$module and adddoc notin $module and (document iswordof $module_category or tool iswordof $module_category)
!if document iswordof $module_category
!set wims_homeref_parm=block=$block&doc=$doc
!endif
!set
1_
=!append line adddoc
,1,module
=adm
/class/adddoc
&dir=$module&iniparm
=$wims_homeref_parm to $
1_
!endif
!if $special_parm4=$empty
!if $cmd!=intro and $cmd!=help and $module!=home and \
../adm/ notin ../$module and \
(../devel/ notin ../$module or $wims_devel_modules iswordof open)
!set wims_homeref_parm=!replace % by %25 in $module_init_parm
!set wims_homeref_parm=!replace + by %2B in $wims_homeref_parm
!set wims_homeref_parm=!replace & by %26 in $wims_homeref_parm
!set
1_
=!append line add
,1,module
=adm
/class/addmodule
&dir=$module&scoring
=$module_scoring&iniparm
=$wims_homeref_parm to $
1_
!endif
!if $wims_user=supervisor and exam notin $session and \
..classes/ notin ..$module and ..adm/ notin ..$module and \
..devel/ notin ..$module and \
GNU isin $module_copyright and \
_check notin $session and \
$class_importation!=no and\
$thisexo!=
!set 1_=!append line import,1,module=adm/createxo&existing=$thisexo&catmodule=$module to $1_
!endif
!else
!! ---------------------------------------------- place pour ajouter le lien vers la modification de serie dans une feuille
!if $cmd!=intro and $cmd!=help and $module!=home and \
../adm/ notin ../$module and \
(../devel/ notin ../$module or $wims_devel_modules iswordof open)
!set wims_homeref_parm=!replace % by %25 in $module_init_parm
!set wims_homeref_parm=!replace + by %2B in $wims_homeref_parm
!set wims_homeref_parm=!replace & by %26 in $wims_homeref_parm
!set
1_
=!append line chseries
,1,module
=adm
/class/sheet
&dir=$module&scoring
=$module_scoring&iniparm
=$wims_homeref_parm&job
=chseries
&num
=$special_parm4 to $
1_
!endif
!endif
!set 1_=!append line $wims_menu_items to $1_
!set wims_rm_0=$1_
!set wims_rm_3=!append line $wims_menu_tabs to $wims_rm_3
:rm2
!if $wims_rm_2!=$empty
!goto rmend
!endif
!if $module_author!=$empty and @ isin $module_address
!set wims_homeref_author_num=!itemcnt $module_author
!if $wims_homeref_author_num>1
!set 3_=$wims_name_authors:
!else
!set 3_=$wims_name_author:
!endif
!set 4_=!mailurl $module_address $module_author\
WIMS $module_title [$module_language]
!set 2_=!append line author,0,$3_ $4_ to $2_
!endif
!set mod_transl=$(module_translator_$lang)
!if $module_transl!=$empty
!set module_translator=$mod_transl
!set module_translator_address=$(module_translator_address_$lang)
!endif
!if $module_translator!=$empty and $module_translator_address!=$empty
!set 3_=!mailurl $module_translator_address $module_translator\
WIMS $module_title [$module_language]
!set 2_=!append line trans,0,$wims_name_translatedby $3_ to $2_
!endif
!if $wims_theme_version>=1
!endif
!set 2_=!append line syou,0,$wims_name_syou to $2_
!set 2_=!append line class,0,$wims_classname ($wims_institutionname) to $2_
!set
2_
=!append line
time,0,Server
time: $wims_now to $
2_
!set wims_rm_2=$2_
:rmend
!set wims_homeref_n1=!linecnt $wims_rm_1
!set wims_homeref_n2=!linecnt $wims_rm_2
!set wims_homeref_n0=!linecnt $wims_rm_0
!set wims_homeref_n3=!linecnt $wims_rm_3
!!</div><!--div dans homeref_supervisor-->
!read themes.phtml tail
!robottrap