Subversion Repositories wimsdev

Rev

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