Subversion Repositories wimsdev

Rev

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

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