Subversion Repositories wimsdev

Rev

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

  1. !if \ isin $parm1
  2.   !for p in 1
  3.     !set parm$p=!slashsubst $(parm$p)
  4.   !next p
  5. !endif
  6. !set add=$parm1
  7. !if ? isin $add
  8.   !set add=!translate internal ? to , in $add
  9.   !set add=!item 2 of $add
  10. !endif
  11. !set eq==
  12. !!for exercices and tools in a class, syntax of the form sheet_exercise/numero_exercise
  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.   !distribute lines $(m_infoexo$ex_) into m_,p_,a_,b_,t_,d_
  18.   !set prompt=!item 2 to -1 of $parms
  19.   !default prompt=$t_
  20.   !href session=$wims_session&cmd=new&module=$m_&worksheet=$sh_&$p_ $prompt
  21.   !exit
  22. !endif
  23. !set add=!translate internal & to $ $ in $add
  24. !set n=!wordcnt $add
  25. !reset nadd,lmod,lses,lcmd
  26. !for i=1 to $n
  27.   !set l=!word $i of $add
  28.   !set ll=!translate = to , in $l
  29.   !distribute items $ll into l1,l2
  30.   !if $l1=cmd and $l2 iswordof intro help close
  31.     !set lcmd=$l2
  32.   !endif
  33.   !if $l1=module
  34.     !set lmod=$l2
  35.   !endif
  36.   !if $l1 notwordof module cmd session
  37.     !set nadd=$nadd $l
  38.   !endif
  39. !next i
  40. !default lmod=home
  41. !default lcmd=new
  42. !set nadd=!translate internal $ $ to & in $nadd
  43. !set prompt=!item 2 to -1 of $parms
  44. !default prompt=!module title $lmod
  45.  
  46. !default prompt=Unknown activity
  47.  
  48. !if $prim=tool
  49.   !href target=wims_tool module=$lmod&cmd=$lcmd$nadd $prompt
  50. !else
  51.   !href module=$lmod&cmd=$lcmd$nadd $prompt
  52. !endif
  53.