Subversion Repositories wimsdev

Rev

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

  1. !!##language independant
  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 m_exotitle=$t_
  20.  !set m_exodescription=$d_
  21.  !set prompt=!item 2 to -1 of $parms
  22.  !default prompt=$t_
  23.  !href target=wims_exo cmd=new&module=$m_&worksheet=$sh&$p_ $prompt
  24.  !exit
  25. !endif
  26. !set add=!translate internal & to $ $ in $add
  27. !set n=!wordcnt $add
  28. !reset nadd,lmod,lses,lcmd
  29. !for i=1 to $n
  30.  !set l=!word $i of $add
  31.  !set ll=!translate = to , in $l
  32.  !distribute items $ll into l1,l2
  33.  !if $l1=cmd and $l2 iswordof intro help close
  34.    !set lcmd=$l2
  35.  !endif
  36.  !if $l1=module
  37.    !set lmod=$l2
  38.  !endif
  39.  !if $l1 notwordof module cmd session lang
  40.    !set nadd=$nadd $l
  41.  !endif
  42. !next i
  43. !default lmod=home
  44. !default lcmd=new
  45. !set nadd=!translate internal $ $ to & in $nadd
  46. !set prompt=!item 2 to -1 of $parms
  47. !default prompt=!module title_$lang $lmod
  48. !default prompt=!module title $lmod
  49.  
  50. !default prompt=$n_unknown
  51.  
  52. !if $prim=exercise
  53.  !href target=wims_exo module=$lmod&cmd=$lcmd$nadd $prompt
  54.  !if $lcmd=new
  55.   !set nadd=!replace internal &+ by & in $nadd
  56.   !set nadd=!char 2 to -1 of $nadd
  57.   !set sheetdata=$sheetdata\
  58. :$lmod\
  59. $nadd\
  60. 10\
  61. 1\
  62. $prompt\
  63. \
  64. \
  65. \
  66. module=$module&block=$block&cmd=new,9\
  67.  
  68.  !endif
  69. !endif
  70. !if $prim=tool
  71.  !href target=wims_tool module=$lmod&cmd=$lcmd$nadd $prompt
  72. !endif
  73. !if $prim=doc
  74.  !href target=wims_doc module=$lmod&cmd=$lcmd$nadd $prompt
  75. !endif
  76. !if $prim=example
  77.  !href target=wims_example module=$lmod&cmd=$lcmd$nadd $prompt
  78. !endif
  79. !if $prim=help
  80.  !href target=wims_help module=$lmod&cmd=$lcmd$nadd $prompt
  81. !endif
  82. !if $prim=adm
  83.  !href module=$lmod&cmd=$lcmd$nadd $prompt
  84. !endif
  85.  
  86.