Subversion Repositories wimsdev

Rev

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

  1. !read getparm $module_init_parm wksheet
  2.  
  3. !set testw=!replace internal & by $\
  4. $ in $module_init_parm
  5. !set testw=!replace internal = by , in $testw
  6. !set testw=!select $testw where column 1=wksheet
  7. !set wksheet=!nospace $(testw[2])
  8.  
  9. !setdef wims_wksheet=$wksheet in wimshome/sessions/$wims_session/var.stat
  10.  
  11. !if \ isin $parm1
  12.  !for p in 1
  13.   !set parm$p=!slashsubst $(parm$p)
  14.  !next p
  15. !endif
  16. !set add=$parm1
  17. !if ? isin $add
  18.   !set add=!translate internal ? to , in $add
  19.   !set add=!item 2 of $add
  20. !endif
  21. !set eq==
  22. !if $eq notin $add and $wims_class>0 and / isin $add \
  23.         and $prim iswordof exercise tool
  24.  !set add=!translate internal / to $ $ in $add
  25.  !distribute words $add into sh,ex
  26.  !set l_=!record $ex of wimshome/log/classes/$wims_class/sheets/.sheet$sh
  27.  !distribute lines $l_ into m_,p_,a_,b_,t_,d_
  28.  !set m_exotitle=$t_
  29.  !set m_exodescription=$d_
  30.  !set prompt=!item 2 to -1 of $parms
  31.  !default prompt=$t_
  32.  !href target=wims_exo cmd=new&module=$m_&worksheet=$sh&$p_ $prompt
  33.  !exit
  34. !endif
  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 lang
  49.    !set nadd=$nadd $l
  50.  !endif
  51. !next i
  52. !default lmod=home
  53. !default lcmd=new
  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.   !reset ww_
  63.   !if $wksheet!=$empty
  64.    !set ww_=&worksheet=$wksheet
  65.   !endif
  66.   !href target=wims_exo module=$lmod&cmd=$lcmd$nadd$ww_ $prompt
  67.   !if $lcmd=new
  68.    !set nadd=!replace internal &+ by & in $nadd
  69.    !set nadd=!char 2 to -1 of $nadd
  70.    !set sheetdata=$sheetdata\
  71. :$lmod\
  72. $nadd\
  73. 10\
  74. 1\
  75. $prompt\
  76. \
  77. \
  78. \
  79. module=$module&doc=$doc&block=$block&cmd=new,9\
  80.  
  81.  !endif
  82. !endif
  83. !if $prim=tool
  84.  !href target=wims_tool module=$lmod&cmd=$lcmd$nadd $prompt
  85. !endif
  86. !if $prim=doc
  87.  !href target=wims_doc module=$lmod&cmd=$lcmd$nadd $prompt
  88. !endif
  89. !if $prim=example
  90.  !href target=wims_example module=$lmod&cmd=$lcmd$nadd $prompt
  91. !endif
  92. !if $prim=help
  93.  !href target=wims_help module=$lmod&cmd=$lcmd$nadd $prompt
  94. !endif
  95. !if $prim=adm
  96.  !href module=$lmod&cmd=$lcmd$nadd $prompt
  97. !endif
  98.