Subversion Repositories wimsdev

Rev

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

  1.  
  2. !read getparm $module_init_parm wksheet
  3. !if \ isin $parm1
  4.  !for p in 1
  5.   !set parm$p=!slashsubst $(parm$p)
  6.  !next p
  7. !endif
  8. !set add=$parm1
  9. !if ? isin $add
  10.   !set add=!translate internal ? to , in $add
  11.   !set add=!item 2 of $add
  12. !endif
  13. !set eq==
  14. !if $eq notin $add and $wims_class>0 and / isin $add \
  15.         and $prim iswordof exercise tool
  16.  !set add=!translate internal / to $ $ in $add
  17.  !distribute words $add into sh,ex
  18.  !set l_=!record $ex of wimshome/log/classes/$wims_class/sheets/.sheet$sh
  19.  !distribute lines $l_ into m_,p_,a_,b_,t_,d_
  20.  !set m_exotitle=$t_
  21.  !set m_exodescription=$d_
  22.  !set prompt=!item 2 to -1 of $parms
  23.  !default prompt=$t_
  24.  !href target=wims_exo cmd=new&module=$m_&worksheet=$sh&$p_ $prompt
  25.  !exit
  26. !endif
  27. !set add=!translate internal & to $ $ in $add
  28. !set n=!wordcnt $add
  29. !reset nadd,lmod,lses,lcmd
  30. !for i=1 to $n
  31.  !set l=!word $i of $add
  32.  !set ll=!translate = to , in $l
  33.  !distribute items $ll into l1,l2
  34.  !if $l1=cmd and $l2 iswordof intro help close
  35.    !set lcmd=$l2
  36.  !endif
  37.  !if $l1=module
  38.    !set lmod=$l2
  39.  !endif
  40.  !if $l1 notwordof module cmd session lang
  41.    !set nadd=$nadd $l
  42.  !endif
  43. !next i
  44. !default lmod=home
  45. !default lcmd=new
  46. !set nadd0=!translate internal $ $ to & in $nadd
  47.  
  48. !if $get_wksheet!=$empty
  49.   !set nadd=$nadd worksheet=$get_wksheet
  50. !endif
  51. !set nadd=!translate internal $ $ to & in $nadd
  52. !set prompt=!item 2 to -1 of $parms
  53. !default prompt=!module title_$lang $lmod
  54. !default prompt=!module title $lmod
  55.  
  56. !default prompt=$n_unknown
  57.  
  58. !if $prim=exercise
  59.  !href target=wims_exo module=$lmod&cmd=$lcmd$nadd $prompt
  60.  !if $lcmd=new
  61.   !set nadd0=!replace internal &+ by & in $nadd0
  62.   !set nadd0=!char 2 to -1 of $nadd0
  63.   !set sheetdata=$sheetdata\
  64. :$lmod\
  65. $nadd0\
  66. 10\
  67. 1\
  68. $prompt\
  69. \
  70. \
  71. \
  72. module=$module&block=$block&cmd=new,9\
  73.  
  74. !!module=$module&doc=$doc&block=$block&cmd=new,9\
  75.  
  76.  !endif
  77. !endif
  78. !if $prim=tool
  79.  !href target=wims_tool module=$lmod&cmd=$lcmd$nadd0 $prompt
  80. !endif
  81. !if $prim=doc
  82.  !href target=wims_doc module=$lmod&cmd=$lcmd$nadd0 $prompt
  83. !endif
  84. !if $prim=example
  85.  !href target=wims_example module=$lmod&cmd=$lcmd$nadd0 $prompt
  86. !endif
  87. !if $prim=help
  88.  !href target=wims_help module=$lmod&cmd=$lcmd$nadd0 $prompt
  89. !endif
  90. !if $prim=adm
  91.  !href module=$lmod&cmd=$lcmd$nadd0 $prompt
  92. !endif
  93.