Subversion Repositories wimsdev

Rev

Rev 17872 | Rev 18406 | Go to most recent revision | 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
8
!if ? isin $add
9
  !set add=!translate internal ? to , in $add
10
  !set add=!item 2 of $add
11
!endif
12
!set eq==
17978 bpr 13
!!for exercices and tools in a class, syntax of the form numero_sheet/numero_exercise
20 reyssat 14
!if $eq notin $add and $wims_class>0 and / isin $add \
14432 bpr 15
    and $prim iswordof exercise tool
12785 bpr 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
20 reyssat 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
12785 bpr 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
20 reyssat 32
    !set lcmd=$l2
12785 bpr 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
20 reyssat 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
 
16655 guerimand 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
17870 bpr 53
!endif