Subversion Repositories wimsdev

Rev

Rev 17872 | Rev 18406 | 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.  
  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. !!for exercices and tools in a class, syntax of the form numero_sheet/numero_exercise
  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.   !distribute lines $(m_infoexo$ex_) into m_,p_,a_,b_,t_,d_
  19.   !set prompt=!item 2 to -1 of $parms
  20.   !default prompt=$t_
  21.   !href session=$wims_session&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
  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=Unknown activity
  48.  
  49. !if $prim=tool
  50.   !href target=wims_tool module=$lmod&cmd=$lcmd$nadd $prompt
  51. !else
  52.   !href module=$lmod&cmd=$lcmd$nadd $prompt
  53. !endif
  54.