Subversion Repositories wimsdev

Rev

Rev 7270 | Rev 10032 | 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.  !href target=wims_exo module=$lmod&cmd=$lcmd$nadd&worksheet=$wksheet $prompt
  63.  !if $lcmd=new
  64.   !set nadd=!replace internal &+ by & in $nadd
  65.   !set nadd=!char 2 to -1 of $nadd
  66.   !set sheetdata=$sheetdata\
  67. :$lmod\
  68. $nadd\
  69. 10\
  70. 1\
  71. $prompt\
  72. \
  73. \
  74. \
  75. module=$module&doc=$doc&block=$block&cmd=new,9\
  76.  
  77.  !endif
  78. !endif
  79. !if $prim=tool
  80.  !href target=wims_tool module=$lmod&cmd=$lcmd$nadd $prompt
  81. !endif
  82. !if $prim=doc
  83.  !href target=wims_doc module=$lmod&cmd=$lcmd$nadd $prompt
  84. !endif
  85. !if $prim=example
  86.  !href target=wims_example module=$lmod&cmd=$lcmd$nadd $prompt
  87. !endif
  88. !if $prim=help
  89.  !href target=wims_help module=$lmod&cmd=$lcmd$nadd $prompt
  90. !endif
  91. !if $prim=adm
  92.  !href module=$lmod&cmd=$lcmd$nadd $prompt
  93. !endif
  94.