Subversion Repositories wimsdev

Rev

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

  1. !!##preparation of the "bottom menu"
  2.  
  3. !if _check isin $session or $wims_mode=popup or yes isin $wims_lightpopup
  4.  !exit
  5. !endif
  6.  
  7. !if _test isin $session and $wims_hacked_variables!=$empty
  8.  <p><b>WIMS WARNING</b>. The following variables of your module could be hacked
  9.  by students using manually modified http addresses! You might want to put more
  10.  strict permissions to them in var.def, in order to build a secure exercise module.
  11.  <p><tt><b>$wims_hacked_variables</b></tt>
  12.  <p>
  13. !endif
  14.  
  15. !read name.phtml.$lang
  16. !default wims_homeref_bgcolor=$wims_ref_bgcolor
  17. !if exam isin $wims_session
  18.  !set wims_hr_r=$[max(0,$wims_exam_remain)]
  19.  !set wims_hr_rm=$[floor($wims_hr_r/60)]
  20.  !set wims_hr_rs=!char 2,3 of $[$wims_hr_r%60+100]
  21.  !set wims_homeref_special=$wims_name_examremain $wims_hr_rm:$wims_hr_rs ($wims_name_whenloaded)
  22.  !goto rmend
  23. !endif
  24.  
  25. !if $wims_rm_1=no
  26.  !reset wims_rm_1
  27.  !goto local
  28. !endif
  29. !if $wims_rm_1!=$empty
  30.  !goto rm2
  31. !endif
  32. !reset 1_
  33. !if _ isin $wims_subsession
  34.  !set 1_=!append line back2,3,window.close() to $1_
  35. !else
  36.  !set 1_=!append line class_home,1,session=$wims_session.1 to $1_
  37. !endif
  38.  
  39. !!if $wims_sheet>0
  40. !! !set 1_=!append line sheetmanagement,1,module=adm/class/sheet&sheet=$wims_sheet to $1_
  41. !!endif
  42. !!if P isin $wims_sheet
  43. !! !set 1_=!append line sheet,1,module=adm/sheet&sh=$wims_sheet to $1_
  44. !!endif
  45.  
  46. !if $wims_sheet>0 or P isin $wims_sheet
  47.  !if $wims_sheet>0
  48.   !set tmp_=sheetmanagement,1,module=adm/class/sheet&sheet=$wims_sheet
  49.  !else
  50.   !set tmp_=sheet,1,module=adm/sheet&sh=$wims_sheet&
  51.  !endif
  52.  !set 1_=!append line $tmp_ to $1_
  53.  !let wims_menu_items=!append line $tmp_ to $wims_menu_items
  54.  !if $wims_exo>1
  55.   !let wims_menu_items=!append line previousseries,1,module=home&directworksheet=$wims_sheet.$[$wims_exo-1] to $wims_menu_items
  56.  !endif
  57.  !if $wims_exo<$wims_sheetmax
  58.   !let wims_menu_items=!append line nextseries,1,module=home&directworksheet=$wims_sheet.$[$wims_exo+1] to $wims_menu_items
  59.  !endif
  60. !endif
  61.  
  62. !if $cmd=help or $cmd=hint
  63.  !set 1_=!append line resume,1,cmd=resume to $1_
  64. !endif
  65. !if $module_has_intro=yes and $cmd notwordof intro help and\
  66.         $wims_sheet=$empty and exam notin $wims_session
  67.  !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_
  68. !endif
  69. !if $module_has_help=yes and $cmd notwordof intro help
  70.  !if $module_help=$empty or $module_help=popup
  71.   !set 1_=!append line help,4,module=$module&cmd=help&special_parm=$wims_help_parm,mhelp to $1_
  72.  !else
  73.   !set 1_=!append line help,1,module=$module&cmd=help&special_parm=$wims_help_parm to $1_
  74.  !endif
  75. !endif
  76. !if $module_has_about=yes and $cmd notwordof help intro
  77.  !set 1_=!append line about,4,module=$module&cmd=help&special_parm=about,mhelp to $1_
  78. !endif
  79. !if print isin $job,$job2 or $print!=
  80.   !set 1_=!append line print,3,window.print() to $1_
  81. !endif
  82. !set wims_rm_1=$1_
  83. :local
  84. !reset 1_
  85. !if $wims_developer!=$empty and COPYING isin $module_copyright and ../classes/ notin ../$module
  86.  !set V_=!char 1 of $module
  87.  !set M_=!translate internal / to , in $module
  88.  !set M_=!item 1 of $M_
  89.  !if $V_ isin ABCDEFGHIJKLMNOPQRTSUVWXYZ or $M_ iswordof local contrib tool
  90.   !set 1_=!append line modify,1,module=adm/modtool&original=$module to $1_
  91.  !endif
  92. !endif
  93. !if $wims_user=supervisor and _adm/doc notin _$module and adddoc notin $module and (document iswordof $module_category or tool iswordof $module_category)
  94.   !if document iswordof $module_category
  95.     !set wims_homeref_parm=block=$block&doc=$doc
  96.   !endif
  97.   !set 1_=!append line adddoc,1,module=adm/class/adddoc&dir=$module&iniparm=$wims_homeref_parm to $1_
  98. !endif
  99. !if $special_parm4=$empty
  100. !if $cmd!=intro and $cmd!=help and $module!=home and \
  101.         ../adm/ notin ../$module and \
  102.         (../devel/ notin ../$module or $wims_devel_modules iswordof open)
  103.  !set wims_homeref_parm=!replace % by %25 in $module_init_parm
  104.  !set wims_homeref_parm=!replace + by %2B in $wims_homeref_parm
  105.  !set wims_homeref_parm=!replace & by %26 in $wims_homeref_parm
  106.  !set 1_=!append line add,1,module=adm/class/addmodule&dir=$module&scoring=$module_scoring&iniparm=$wims_homeref_parm to $1_
  107. !endif
  108. !if $wims_user=supervisor and exam notin $session and \
  109.         ..classes/ notin ..$module and ..adm/ notin ..$module and \
  110.         ..devel/ notin ..$module and \
  111.         GNU isin $module_copyright and \
  112.         _check notin $session and \
  113.         $class_importation!=no and\
  114.         $thisexo!=
  115.   !set 1_=!append line import,1,module=adm/createxo&existing=$thisexo&catmodule=$module to $1_
  116. !endif
  117. !else
  118. !! ---------------------------------------------- place pour ajouter le lien vers la modification de serie dans une feuille
  119.  !if $cmd!=intro and $cmd!=help and $module!=home and \
  120.         ../adm/ notin ../$module and \
  121.         (../devel/ notin ../$module or $wims_devel_modules iswordof open)
  122.   !set wims_homeref_parm=!replace % by %25 in $module_init_parm
  123.   !set wims_homeref_parm=!replace + by %2B in $wims_homeref_parm
  124.   !set wims_homeref_parm=!replace & by %26 in $wims_homeref_parm
  125.   !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_
  126.  !endif
  127. !endif
  128. !set 1_=!append line $wims_menu_items to $1_
  129. !set wims_rm_0=$1_
  130. !set wims_rm_3=!append line $wims_menu_tabs to $wims_rm_3
  131. :rm2
  132. !if $wims_rm_2!=$empty
  133.  !goto rmend
  134. !endif
  135. !reset 2_
  136. !if $module_author!=$empty and @ isin $module_address
  137.  !set wims_homeref_author_num=!itemcnt $module_author
  138.  !if $wims_homeref_author_num>1
  139.   !set 3_=$wims_name_authors:
  140.  !else
  141.   !set 3_=$wims_name_author:
  142.  !endif
  143.  !set 4_=!mailurl $module_address $module_author\
  144. WIMS $module_title [$module_language]
  145.  !set 2_=!append line author,0,$3_ $4_ to $2_
  146. !endif
  147.  
  148. !set mod_transl=$(module_translator_$lang)
  149. !if $module_transl!=$empty
  150.    !set module_translator=$mod_transl
  151.    !set module_translator_address=$(module_translator_address_$lang)
  152. !endif
  153.  
  154. !if $module_translator!=$empty and $module_translator_address!=$empty
  155.  !set 3_=!mailurl $module_translator_address $module_translator\
  156. WIMS $module_title [$module_language]
  157.  !set 2_=!append line trans,0,$wims_name_translatedby $3_ to $2_
  158. !endif
  159. !if $wims_theme_version>=1
  160.  !reset 2_
  161. !endif
  162. !set 2_=!append line syou,0,$wims_name_syou to $2_
  163. !set 2_=!append line class,0,$wims_classname ($wims_institutionname) to $2_
  164. !set 2_=!append line time,0,Server time: $wims_now to $2_
  165. !set wims_rm_2=$2_
  166.  
  167. :rmend
  168. !set wims_homeref_n1=!linecnt $wims_rm_1
  169. !set wims_homeref_n2=!linecnt $wims_rm_2
  170. !set wims_homeref_n0=!linecnt $wims_rm_0
  171. !set wims_homeref_n3=!linecnt $wims_rm_3
  172. !!</div><!--div dans homeref_supervisor-->
  173.  
  174. !read themes.phtml tail
  175. !robottrap
  176.  
  177.  
  178.  
  179.