Subversion Repositories wimsdev

Rev

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

  1. !read getparm $module_init_parm wksheet
  2.  
  3. !if \ isin $parm1
  4.   !for p in 1
  5.     !set parm$p=!slashsubst $(parm$p)
  6.   !next p
  7. !endif
  8.  
  9. !set add=$parm1
  10. !if ? isin $add
  11.   !set add=!translate internal ? to , in $add
  12.   !set add=!item 2 of $add
  13. !endif
  14. !set eq==
  15. !!for exercices and tools in a class, syntax of the form numero_sheet/numero_exercise
  16. !if $eq notin $add and $wims_class>0 and / isin $add \
  17.     and $prim iswordof exercise tool
  18.   !set add=!translate internal / to $ $ in $add
  19.   !distribute words $add into sh,ex
  20.   !set l_=!record $ex of wimshome/log/classes/$wims_class/sheets/.sheet$sh
  21.   !set sev=!record 0 of wimshome/log/classes/$wims_class/sheets/.severity
  22.   !set sev=!line $sh+1 of $sev
  23.   !distribute lines $l_ into m_,p_,a_,b_,t_,d_
  24.   !set m_exotitle=$t_
  25.   !set m_exodescription=$d_
  26.   !set prompt=!item 2 to -1 of $parms
  27.   !default prompt=$t_
  28.   !read docu/scoreprint $sh/$ex,$sev
  29.   !href target=wims_exo cmd=new&module=$m_&worksheet=$sh&$p_ $prompt
  30.   !exit
  31. !endif
  32. !set add=!replace internal &+ by & in $add
  33. !set add=!replace internal %2F by / in $add
  34. !set add=!translate internal & to $ $ in $add
  35. !set n=!wordcnt $add
  36. !reset nadd lmod lses lcmd
  37. !for i=1 to $n
  38.   !set l=!word $i of $add
  39.   !set ll=!translate = to , in $l
  40.   !distribute items $ll into l1,l2
  41.   !if $l1=cmd and $l2 iswordof intro help close
  42.     !set lcmd=$l2
  43.   !endif
  44.   !if $l1=module
  45.     !set lmod=$l2
  46.   !endif
  47.   !if $l1 notwordof module cmd session worksheet
  48.     !set nadd=$nadd $l
  49.   !endif
  50. !next i
  51. !default lmod=home
  52. !default lcmd=new
  53. !set nadd=!trim $nadd
  54. !set nadd=!translate internal $ $ to & in $nadd
  55. !set prompt=!item 2 to -1 of $parms
  56. !default prompt=!module title_$lang $lmod
  57. !default prompt=!module title $lmod
  58.  
  59. !default prompt=$n_unknown
  60.  
  61. !if $prim=exercise
  62.   !!use also docsh in adm/class/adddoc/adddocsh.proc
  63.   !read docu/docsh $nadd
  64.   !set nadd=$docsh_out
  65.   !reset ww_
  66.   !if $get_wksheet!=0 and $get_wksheet!=$empty
  67.     !if $get_wksheet>0
  68.       !set ww_=&worksheet=$get_wksheet
  69.     !endif
  70.     !read getparm $nadd$ww_ worksheet cmd
  71.     !if $get_worksheet!=$empty
  72.       !set work=!getexoindex module=$lmod param=$nadd sheet=$get_worksheet
  73.     !else
  74.       !set work=!getexoindex module=$lmod param=$nadd
  75.     !endif
  76.     !if $work!=$empty
  77.       !read docu/scoreprint $work
  78.       !default ww_=&worksheet=$tmp_sheet
  79.     !endif
  80.   !endif
  81.   !href target=wims_exo module=$lmod&cmd=$lcmd&$nadd$ww_ $prompt
  82.   !if $lcmd=new
  83.     !set nadd=!replace internal &+ by & in $nadd
  84.     !set nadd=!char 2 to -1 of $nadd
  85.     !set sheetdata=$sheetdata\
  86. :$lmod\
  87. $nadd\
  88. 10\
  89. 1\
  90. $prompt\
  91. \
  92. \
  93. \
  94. module=$module&block=$block&cmd=new,9\
  95.  
  96.   !endif
  97. !endif
  98. !if $prim=tool
  99.   !href target=wims_tool module=$lmod&cmd=$lcmd&$nadd $prompt
  100. !endif
  101. !if $prim=doc
  102.   !href target=wims_doc module=$lmod&cmd=$lcmd&$nadd $prompt
  103. !endif
  104. !if $prim=example
  105.   !href target=wims_example module=$lmod&cmd=$lcmd&$nadd $prompt
  106. !endif
  107. !if $prim=help
  108.   !href target=wims_help module=$lmod&cmd=$lcmd&$nadd $prompt
  109. !endif
  110. !if $prim=adm
  111.   !href module=$lmod&cmd=$lcmd&$nadd $prompt
  112. !endif
  113. !if $prim=glose
  114.   !set lcmd=reply
  115.   !set nadd=!replace internal & by &special_parm= in $nadd
  116.   !href module=adm/tool/glossary&cmd=$lcmd$nadd&job=main prompt
  117. !endif
  118.