Subversion Repositories wimsdev

Rev

Rev 4318 | Rev 4635 | 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.  <pre>$wims_hacked_variables</pre>
  12.  
  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.  
  34. !!********* Link #1 : "Close Window" or "Home" (Not Shown if Embedded)
  35. !if _ isin $wims_subsession
  36.  !set 1_=!append line back2,3,window.close() to $1_
  37. !else
  38.  !set 1_=!append line class_home,1,session=$wims_session.1 to $1_
  39. !endif
  40.  
  41. !!********* Link #2 : "Sheet"
  42. !if $wims_sheet>0 or P isin $wims_sheet
  43.  !if $wims_sheet>0
  44.   !set tmp_=sheetmanagement,1,module=adm/class/sheet&sheet=$wims_sheet
  45.  !else
  46.   !set tmp_=sheet,1,module=adm/sheet&sh=$wims_sheet&
  47.  !endif
  48.  !set 1_=!append line $tmp_ to $1_
  49.  !let wims_menu_items=!append line $tmp_ to $wims_menu_items
  50.  !if $wims_exo>1
  51.   !let wims_menu_items=!append line previousseries,1,module=home&directworksheet=$wims_sheet.$[$wims_exo-1] to $wims_menu_items
  52.  !endif
  53.  !if $wims_exo<$wims_sheetmax
  54.   !let wims_menu_items=!append line nextseries,1,module=home&directworksheet=$wims_sheet.$[$wims_exo+1] to $wims_menu_items
  55.  !endif
  56. !endif
  57.  
  58. !!********* Link #3 : "Resume"
  59. !if $cmd=help or $cmd=hint
  60.  !set 1_=!append line resume,1,cmd=resume to $1_
  61. !endif
  62.  
  63. !!********* Link #4 : "Introduction" (Not Shown if Embedded)
  64. !if $module_has_intro=yes and $cmd notwordof intro help and\
  65.         $wims_sheet=$empty and exam notin $wims_session
  66.  !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_
  67. !endif
  68.  
  69. !!********* Link #5 : "Help"
  70. !if $module_has_help=yes and $cmd notwordof intro help
  71.  !if $module_help=$empty or $module_help=popup
  72.   !set 1_=!append line help,4,module=$module&cmd=help&special_parm=$wims_help_parm,mhelp to $1_
  73.  !else
  74.   !set 1_=!append line help,1,module=$module&cmd=help&special_parm=$wims_help_parm to $1_
  75.  !endif
  76. !endif
  77.  
  78. !!********* Link #6 : "About"
  79. !if $module_has_about=yes and $cmd notwordof help intro
  80.  !set 1_=!append line about,4,module=$module&cmd=help&special_parm=about,mhelp to $1_
  81. !endif
  82. !if print isin $job,$job2 or $print!=
  83.   !set 1_=!append line print,3,window.print() to $1_
  84. !endif
  85. !set wims_rm_1=$1_
  86. :local
  87. !reset 1_
  88. !if $wims_developer!=$empty and COPYING isin $module_copyright and ../classes/ notin ../$module
  89.  !set V_=!char 1 of $module
  90.  !set M_=!translate internal / to , in $module
  91.  !set M_=!item 1 of $M_
  92.  !if $V_ isin ABCDEFGHIJKLMNOPQRTSUVWXYZ or $M_ iswordof local contrib tool
  93.   !set 1_=!append line modify,1,module=adm/modtool&original=$module to $1_
  94.  !endif
  95. !endif
  96. !if $wims_user=supervisor and _adm/doc notin _$module and adddoc notin $module and (document iswordof $module_category or tool iswordof $module_category)
  97.   !if document iswordof $module_category
  98.     !set wims_homeref_parm=block=$block&doc=$doc
  99.   !endif
  100.   !set 1_=!append line adddoc,1,module=adm/class/adddoc&dir=$module&iniparm=$wims_homeref_parm to $1_
  101. !endif
  102. !if $special_parm4=$empty
  103. !if $cmd!=intro and $cmd!=help and $module!=home and \
  104.         ../adm/ notin ../$module and \
  105.         (../devel/ notin ../$module or $wims_devel_modules iswordof open)
  106.  !set wims_homeref_parm=!replace % by %25 in $module_init_parm
  107.  !set wims_homeref_parm=!replace + by %2B in $wims_homeref_parm
  108.  !set wims_homeref_parm=!replace & by %26 in $wims_homeref_parm
  109.  !set 1_=!append line add,1,module=adm/class/addmodule&dir=$module&scoring=$module_scoring&iniparm=$wims_homeref_parm to $1_
  110. !endif
  111. !if $wims_user=supervisor and exam notin $session and \
  112.         ..classes/ notin ..$module and ..adm/ notin ..$module and \
  113.         ..devel/ notin ..$module and \
  114.         GNU isin $module_copyright and \
  115.         _check notin $session and \
  116.         $class_importation!=no and\
  117.         $thisexo!=
  118.   !set 1_=!append line import,1,module=adm/createxo&existing=$thisexo&catmodule=$module to $1_
  119. !endif
  120. !else
  121. !! ---------------------------------------------- place pour ajouter le lien vers la modification de serie dans une feuille
  122.  !if $cmd!=intro and $cmd!=help and $module!=home and \
  123.         ../adm/ notin ../$module and \
  124.         (../devel/ notin ../$module or $wims_devel_modules iswordof open)
  125.   !set wims_homeref_parm=!replace % by %25 in $module_init_parm
  126.   !set wims_homeref_parm=!replace + by %2B in $wims_homeref_parm
  127.   !set wims_homeref_parm=!replace & by %26 in $wims_homeref_parm
  128.   !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_
  129.  !endif
  130. !endif
  131. !set 1_=!append line $wims_menu_items to $1_
  132. !set wims_rm_0=$1_
  133. !set wims_rm_3=!append line $wims_menu_tabs to $wims_rm_3
  134. :rm2
  135. !if $wims_rm_2!=$empty
  136.  !goto rmend
  137. !endif
  138. !reset 2_
  139.  
  140. !!********* Link #8 : "Author(s)"
  141.  
  142. !if $module_author!=$empty and @ isin $module_address
  143.  !read namewriting.phtml $module_author
  144.  !set wims_homeref_author_num=$script_cnt
  145.  !if $wims_homeref_author_num>1
  146.   !set 3_=$wims_name_authors:
  147.  !else
  148.   !set 3_=$wims_name_author:
  149.  !endif
  150.  !set 4_=
  151.  !for ad=1 to $wims_homeref_author_num
  152.    !if $(module_address[$ad;])!= and @ isin $(module_address[$ad;])
  153.     !set 4__=!mailurl $(module_address[$ad;]) $(script_out[$ad])\
  154. WIMS $module_title [$module_language]
  155.    !else
  156.      !set 4__=$(script_out[$ad])
  157.    !endif  
  158.     !set 4_=!append item $4__ to $4_
  159.   !next
  160.   !set 2_=!append line author,0,$3_ $4_ to $2_
  161. !endif
  162.  
  163. !!********* Link #9 : "Translator(s)"
  164. !set mod_transl=$(module_translator_$lang)
  165. !if $module_transl!=$empty
  166.    !set module_translator=$mod_transl
  167.    !set module_translator_address=$(module_translator_address_$lang)
  168. !endif
  169.  
  170. !if $module_translator!=$empty and $module_translator_address!=$empty
  171.  !read namewriting.phtml $module_translator
  172.  !set module_translator=$(script_out[1])
  173.  !set 3_=!mailurl $module_translator_address $module_translator\
  174. WIMS $module_title [$module_language]
  175.  !set 2_=!append line trans,0,$wims_name_translatedby $3_ to $2_
  176. !endif
  177. !if $wims_theme_version>=1
  178.  !reset 2_
  179. !endif
  180. !set 2_=!append line syou,0,$wims_name_syou to $2_
  181. !set 2_=!append line class,0,$wims_classname ($wims_institutionname) to $2_
  182. !set 2_=!append line time,0,Server time: $wims_now to $2_
  183. !set wims_rm_2=$2_
  184.  
  185. :rmend
  186. !set wims_homeref_n1=!linecnt $wims_rm_1
  187. !set wims_homeref_n2=!linecnt $wims_rm_2
  188. !set wims_homeref_n0=!linecnt $wims_rm_0
  189. !set wims_homeref_n3=!linecnt $wims_rm_3
  190. !!</div><!--div dans homeref_supervisor-->
  191.  
  192. !read themes.phtml tail
  193. !robottrap
  194.