Subversion Repositories wimsdev

Rev

Rev 7270 | Rev 7492 | 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.  
  25.  !href target=wims_exo cmd=new&module=$m_&worksheet=$sh&$p_ $prompt
  26.  !exit
  27. !endif
  28. !set add=!translate internal & to $ $ in $add
  29. !set n=!wordcnt $add
  30. !reset nadd,lmod,lses,lcmd
  31. !for i=1 to $n
  32.  !set l=!word $i of $add
  33.  !set ll=!translate = to , in $l
  34.  !distribute items $ll into l1,l2
  35.  !if $l1=cmd and $l2 iswordof intro help close
  36.    !set lcmd=$l2
  37.  !endif
  38.  !if $l1=module
  39.    !set lmod=$l2
  40.  !endif
  41.  !if $l1 notwordof module cmd session lang
  42.    !set nadd=$nadd $l
  43.  !endif
  44. !next i
  45. !default lmod=home
  46. !default lcmd=new
  47. !set nadd0=!translate internal $ $ to & in $nadd
  48.  
  49. !if $wksheet!=$empty
  50.   !set nadd=$nadd worksheet=$wksheet
  51. !endif
  52. !set nadd=!translate internal $ $ to & in $nadd
  53. !set prompt=!item 2 to -1 of $parms
  54. !default prompt=!module title_$lang $lmod
  55. !default prompt=!module title $lmod
  56.  
  57. !default prompt=$n_unknown
  58.  
  59. !if $prim=exercise
  60.  !href target=wims_exo module=$lmod&cmd=$lcmd$nadd $prompt
  61.  !if $lcmd=new
  62.   !set nadd0=!replace internal &+ by & in $nadd0
  63.   !set nadd0=!char 2 to -1 of $nadd0
  64.   !set sheetdata=$sheetdata\
  65. :$lmod\
  66. $nadd0\
  67. 10\
  68. 1\
  69. $prompt\
  70. \
  71. \
  72. \
  73. module=$module&block=$block&cmd=new,9\
  74.  
  75. !!module=$module&doc=$doc&block=$block&cmd=new,9\
  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.  
  94.