Subversion Repositories wimsdev

Rev

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

  1.  
  2. !if _check isin $session or $wims_mode=popup
  3.  !exit
  4. !endif
  5.  
  6. !if _test isin $session and $wims_hacked_variables!=$empty
  7.  <p><b>WIMS WARNING</b>. The following variables of your module could be hacked
  8.  by students using manually modified http addresses! You might want to put more
  9.  strict permissions to them in var.def, in order to build a secure exercise module.
  10.  <p><tt><b>$wims_hacked_variables</b></tt>
  11.  <p>
  12. !endif
  13.  
  14. !read name.phtml.$module_language
  15. !default wims_homeref_bgcolor=$wims_ref_bgcolor
  16. !if exam isin $wims_session
  17.  !set wims_hr_r=$[max(0,$wims_exam_remain)]
  18.  !set wims_hr_rm=$[floor($wims_hr_r/60)]
  19.  !set wims_hr_rs=!char 2,3 of $[$wims_hr_r%60+100]
  20.  !set wims_homeref_special=$wims_name_examremain $wims_hr_rm:$wims_hr_rs ($wims_name_whenloaded)
  21.  !goto rmend
  22. !endif
  23.  
  24. !if $wims_rm_1!=$empty
  25.  !goto rm2
  26. !endif
  27. !reset 1_
  28. !if _ isin $wims_subsession
  29.  !set 1_=!append line back2,3,window.close() to $1_
  30. !else
  31.  !set 1_=!append line home,1,session=$wims_session.1 to $1_
  32. !endif
  33. !if $wims_sheet>0
  34.  !set 1_=!append line sheet,1,module=adm/class/sheet&sheet=$wims_sheet to $1_
  35. !endif
  36. !if P isin $wims_sheet
  37.  !set 1_=!append line sheet,1,module=adm/sheet&sh=$wims_sheet to $1_
  38. !endif
  39. !if $cmd=help or $cmd=hint
  40.  !set 1_=!append line resume,1,cmd=resume to $1_
  41. !endif
  42. !if $module_has_intro=yes and $cmd notwordof intro help and\
  43.         $wims_sheet=$empty and exam notin $wims_session
  44.  !set 1_=!append line intro,1,module=$module&cmd=intro&special_parm=$wims_intro_parm to $1_
  45. !endif
  46. !if $module_has_help=yes and $cmd notwordof intro help
  47.  !if $module_help=$empty or $module_help=popup
  48.   !set 1_=!append line help,4,module=$module&cmd=help&special_parm=$wims_help_parm,mhelp to $1_
  49.  !else
  50.   !set 1_=!append line help,1,module=$module&cmd=help&special_parm=$wims_help_parm to $1_
  51.  !endif
  52. !endif
  53. !if $module_has_about=yes and $cmd notwordof help intro
  54.  !set 1_=!append line about,4,module=$module&cmd=help&special_parm=about,mhelp to $1_
  55. !endif
  56. !set wims_rm_1=$1_
  57.  
  58. :rm2
  59. !if $wims_rm_2!=$empty
  60.  !goto rmend
  61. !endif
  62. !reset 2_
  63. !if $module_author!=$empty and @ isin $module_address
  64.  !set wims_homeref_author_num=!itemcnt $module_author
  65.  !if $wims_homeref_author_num>1
  66.   !set 3_=$wims_name_authors:
  67.  !else
  68.   !set 3_=$wims_name_author:
  69.  !endif
  70.  !set 4_=!mailurl $module_address $module_author\
  71. WIMS $module_title [$module_language]
  72.  !set 2_=!append line author,0,$3_ $4_ to $2_
  73. !endif
  74. !if $module_translator!=$empty and $module_translator_address!=$empty
  75.  !set 3_=!mailurl $module_translator_address $module_translator\
  76. WIMS $module_title [$module_language]
  77.  !set 2_=!append line trans,0,$wims_name_translatedby $3_ to $2_
  78. !endif
  79. !set 2_=!append line syou,0,$wims_name_syou to $2_
  80. !set 2_=!append line class,0,$wims_classname ($wims_institutionname) to $2_
  81. !if $cmd!=intro and $cmd!=help and $module!=home and \
  82.         ../adm/ notin ../$module and \
  83.         (../devel/ notin ../$module or $wims_devel_modules iswordof open)
  84.  !set wims_homeref_parm=!replace % by %25 in $module_init_parm
  85.  !set wims_homeref_parm=!replace + by %2B in $module_init_parm
  86.  !set wims_homeref_parm=!replace & by %26 in $module_init_parm
  87.  !set 2_=!append line add,1,module=adm/class/addmodule&dir=$module&scoring=$module_scoring&iniparm=$wims_homeref_parm to $2_
  88. !endif
  89. !if $wims_developer!=$empty and COPYING isin $module_copyright and ../classes/ notin ../$module
  90.  !set V_=!char 1 of $module
  91.  !set M_=!translate internal / to , in $module
  92.  !set M_=!item 1 of $M_
  93.  !if $V_ isin ABCDEFGHIJKLMNOPQRTSUVWXYZ or $M_ iswordof local contrib tool
  94.   !set 2_=!append line modify,1,module=adm/modtool&original=$module to $2_
  95.  !endif
  96. !endif
  97. !set 2_=!append line time,0,Server time: $wims_now to $2_
  98. !set wims_rm_2=$2_
  99.  
  100. :rmend
  101. !set wims_homeref_n1=!linecnt $wims_rm_1
  102. !set wims_homeref_n2=!linecnt $wims_rm_2
  103. </div>
  104.  
  105. !read themes.phtml tail
  106. !robottrap
  107.  
  108.