Subversion Repositories wimsdev

Rev

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