Subversion Repositories wimsdev

Rev

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