Subversion Repositories wimsdev

Rev

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