Rev 18479 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
20 | reyssat | 1 | !if \ isin $parm1 |
14432 | bpr | 2 | !for p in 1 |
3 | !set parm$p=!slashsubst $(parm$p) |
||
4 | !next p |
||
20 | reyssat | 5 | !endif |
17978 | bpr | 6 | |
20 | reyssat | 7 | !set add=$parm1 |
18406 | bpr | 8 | !set parms=!slashsubst $(parms) |
20 | reyssat | 9 | !if ? isin $add |
10 | !set add=!translate internal ? to , in $add |
||
11 | !set add=!item 2 of $add |
||
12 | !endif |
||
13 | !set eq== |
||
17978 | bpr | 14 | !!for exercices and tools in a class, syntax of the form numero_sheet/numero_exercise |
20 | reyssat | 15 | !if $eq notin $add and $wims_class>0 and / isin $add \ |
14432 | bpr | 16 | and $prim iswordof exercise tool |
12785 | bpr | 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 |
||
20 | reyssat | 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 |
||
12785 | bpr | 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 |
||
20 | reyssat | 33 | !set lcmd=$l2 |
12785 | bpr | 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 |
||
20 | reyssat | 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 | |||
16655 | guerimand | 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 |
||
17870 | bpr | 54 | !endif |