Subversion Repositories wimsdev

Rev

Rev 2233 | Rev 2865 | 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
  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. !if $wims_sheet>0
  39.  !set 1_=!append line sheetmanagement,1,module=adm/class/sheet&sheet=$wims_sheet to $1_
  40. !endif
  41. !if P isin $wims_sheet
  42.  !set 1_=!append line sheet,1,module=adm/sheet&sh=$wims_sheet to $1_
  43. !endif
  44. !if $cmd=help or $cmd=hint
  45.  !set 1_=!append line resume,1,cmd=resume to $1_
  46. !endif
  47. !if $module_has_intro=yes and $cmd notwordof intro help and\
  48.         $wims_sheet=$empty and exam notin $wims_session
  49.  !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_
  50. !endif
  51. !if $module_has_help=yes and $cmd notwordof intro help
  52.  !if $module_help=$empty or $module_help=popup
  53.   !set 1_=!append line help,4,module=$module&cmd=help&special_parm=$wims_help_parm,mhelp to $1_
  54.  !else
  55.   !set 1_=!append line help,1,module=$module&cmd=help&special_parm=$wims_help_parm to $1_
  56.  !endif
  57. !endif
  58. !if $module_has_about=yes and $cmd notwordof help intro
  59.  !set 1_=!append line about,4,module=$module&cmd=help&special_parm=about,mhelp to $1_
  60. !endif
  61. !if print isin $job,$job2 or $print!=
  62.   !set 1_=!append line print,3,window.print() to $1_
  63. !endif
  64. !set wims_rm_1=$1_
  65. :local
  66. !reset 1_
  67. !if $wims_developer!=$empty and COPYING isin $module_copyright and ../classes/ notin ../$module
  68.  !set V_=!char 1 of $module
  69.  !set M_=!translate internal / to , in $module
  70.  !set M_=!item 1 of $M_
  71.  !if $V_ isin ABCDEFGHIJKLMNOPQRTSUVWXYZ or $M_ iswordof local contrib tool
  72.   !set 1_=!append line modify,1,module=adm/modtool&original=$module to $1_
  73.  !endif
  74. !endif
  75. !if $wims_user=supervisor and _adm/doc notin _$module and adddoc notin $module and (document iswordof $module_category or tool iswordof $module_category)
  76.   !if document iswordof $module_category
  77.     !set wims_homeref_parm=block=$block&doc=$doc
  78.   !endif
  79.   !set 1_=!append line adddoc,1,module=adm/class/adddoc&dir=$module&iniparm=$wims_homeref_parm to $1_
  80. !endif
  81. !if $special_parm4=$empty
  82. !if $cmd!=intro and $cmd!=help and $module!=home and \
  83.         ../adm/ notin ../$module and \
  84.         (../devel/ notin ../$module or $wims_devel_modules iswordof open)
  85.  !set wims_homeref_parm=!replace % by %25 in $module_init_parm
  86.  !set wims_homeref_parm=!replace + by %2B in $wims_homeref_parm
  87.  !set wims_homeref_parm=!replace & by %26 in $wims_homeref_parm
  88.  !set 1_=!append line add,1,module=adm/class/addmodule&dir=$module&scoring=$module_scoring&iniparm=$wims_homeref_parm to $1_
  89. !endif
  90. !if $wims_user=supervisor and exam notin $session and \
  91.         ..classes/ notin ..$module and ..adm/ notin ..$module and \
  92.         ..devel/ notin ..$module and \
  93.         GNU isin $module_copyright and \
  94.         _check notin $session and \
  95.         $class_importation!=no and\
  96.         $thisexo!=
  97.   !set 1_=!append line import,1,module=adm/createxo&existing=$thisexo&catmodule=$module to $1_
  98. !endif
  99. !else
  100. !! ---------------------------------------------- place pour ajouter le lien vers la modification de serie dans une feuille
  101.  !if $cmd!=intro and $cmd!=help and $module!=home and \
  102.         ../adm/ notin ../$module and \
  103.         (../devel/ notin ../$module or $wims_devel_modules iswordof open)
  104.   !set wims_homeref_parm=!replace % by %25 in $module_init_parm
  105.   !set wims_homeref_parm=!replace + by %2B in $wims_homeref_parm
  106.   !set wims_homeref_parm=!replace & by %26 in $wims_homeref_parm
  107.   !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_
  108.  !endif
  109. !endif
  110. !set 1_=!append line $wims_menu_items to $1_
  111. !set wims_rm_0=$1_
  112. !set wims_rm_3=!append line $wims_menu_tabs to $wims_rm_3
  113. :rm2
  114. !if $wims_rm_2!=$empty
  115.  !goto rmend
  116. !endif
  117. !reset 2_
  118. !if $module_author!=$empty and @ isin $module_address
  119.  !set wims_homeref_author_num=!itemcnt $module_author
  120.  !if $wims_homeref_author_num>1
  121.   !set 3_=$wims_name_authors:
  122.  !else
  123.   !set 3_=$wims_name_author:
  124.  !endif
  125.  !set 4_=!mailurl $module_address $module_author\
  126. WIMS $module_title [$module_language]
  127.  !set 2_=!append line author,0,$3_ $4_ to $2_
  128. !endif
  129.  
  130. !set mod_transl=$(module_translator_$lang)
  131. !if $module_transl!=$empty
  132.    !set module_translator=$mod_transl
  133.    !set module_translator_address=$(module_translator_address_$lang)
  134. !endif
  135.  
  136. !if $module_translator!=$empty and $module_translator_address!=$empty
  137.  !set 3_=!mailurl $module_translator_address $module_translator\
  138. WIMS $module_title [$module_language]
  139.  !set 2_=!append line trans,0,$wims_name_translatedby $3_ to $2_
  140. !endif
  141. !set 2_=!append line syou,0,$wims_name_syou to $2_
  142. !set 2_=!append line class,0,$wims_classname ($wims_institutionname) to $2_
  143. !set 2_=!append line time,0,Server time: $wims_now to $2_
  144. !set wims_rm_2=$2_
  145.  
  146. :rmend
  147. !set wims_homeref_n1=!linecnt $wims_rm_1
  148. !set wims_homeref_n2=!linecnt $wims_rm_2
  149. !set wims_homeref_n0=!linecnt $wims_rm_0
  150. !set wims_homeref_n3=!linecnt $wims_rm_3
  151. </div>
  152.  
  153. !read themes.phtml tail
  154. !robottrap
  155.  
  156.