Subversion Repositories wimsdev

Rev

Rev 18052 | Rev 18057 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
7270 bpr 1
!read getparm $module_init_parm wksheet
18052 bpr 2
!setdef wims_wksheet=$get_wksheet in wimshome/sessions/$wims_session/var.stat
7270 bpr 3
 
14431 bpr 4
!if \ isin $parm1
12490 bpr 5
  !for p in 1
6
    !set parm$p=!slashsubst $(parm$p)
7
  !next p
23 reyssat 8
!endif
18009 bpr 9
 
23 reyssat 10
!set add=$parm1
11
!if ? isin $add
12
  !set add=!translate internal ? to , in $add
13
  !set add=!item 2 of $add
14
!endif
15
!set eq==
18009 bpr 16
!!for exercices and tools in a class, syntax of the form numero_sheet/numero_exercise
23 reyssat 17
!if $eq notin $add and $wims_class>0 and / isin $add \
12490 bpr 18
    and $prim iswordof exercise tool
19
  !set add=!translate internal / to $ $ in $add
20
  !distribute words $add into sh,ex
21
  !set l_=!record $ex of wimshome/log/classes/$wims_class/sheets/.sheet$sh
18014 bpr 22
  !set sev=!record 0 of wimshome/log/classes/$wims_class/sheets/.severity
23
  !set sev=!line $sh+1 of $sev
12490 bpr 24
  !distribute lines $l_ into m_,p_,a_,b_,t_,d_
25
  !set m_exotitle=$t_
26
  !set m_exodescription=$d_
27
  !set prompt=!item 2 to -1 of $parms
28
  !default prompt=$t_
18014 bpr 29
  !read docu/scoreprint $sh/$ex,$sev
12490 bpr 30
  !href target=wims_exo cmd=new&module=$m_&worksheet=$sh&$p_ $prompt
31
  !exit
23 reyssat 32
!endif
18052 bpr 33
!set add=!translate internal &+ to & in $add
34
!read getparm $add wksheet
23 reyssat 35
!set add=!translate internal & to $ $ in $add
36
!set n=!wordcnt $add
37
!reset nadd,lmod,lses,lcmd
38
!for i=1 to $n
12490 bpr 39
  !set l=!word $i of $add
40
  !set ll=!translate = to , in $l
41
  !distribute items $ll into l1,l2
42
  !if $l1=cmd and $l2 iswordof intro help close
43
    !set lcmd=$l2
44
  !endif
45
  !if $l1=module
46
    !set lmod=$l2
47
  !endif
18053 bpr 48
  !if $l1 notwordof module cmd session worksheet wksheet
12490 bpr 49
    !set nadd=$nadd $l
50
  !endif
23 reyssat 51
!next i
52
!default lmod=home
53
!default lcmd=new
18009 bpr 54
!set nadd=!trim $nadd
23 reyssat 55
!set nadd=!translate internal $ $ to & in $nadd
56
!set prompt=!item 2 to -1 of $parms
6810 czzmrn 57
!default prompt=!module title_$lang $lmod
23 reyssat 58
!default prompt=!module title $lmod
59
 
747 bpr 60
!default prompt=$n_unknown
23 reyssat 61
 
62
!if $prim=exercise
10032 bpr 63
  !reset ww_
18009 bpr 64
  !if $get_wksheet!=$empty and $get_wksheet!=0
65
    !set ww_=&worksheet=$get_wksheet
18032 bpr 66
    !set work=!getexoindex $lmod $nadd sheet=$get_wksheet
18014 bpr 67
    !if $work!=$empty
68
      !read docu/scoreprint $work
69
    !endif
10032 bpr 70
  !endif
18009 bpr 71
  !href target=wims_exo module=$lmod&cmd=$lcmd&$nadd$ww_ $prompt
10032 bpr 72
  !if $lcmd=new
12490 bpr 73
    !set nadd=!replace internal &+ by & in $nadd
74
    !set nadd=!char 2 to -1 of $nadd
75
    !set sheetdata=$sheetdata\
23 reyssat 76
:$lmod\
77
$nadd\
78
10\
79
1\
80
$prompt\
5378 bpr 81
\
82
\
83
\
84
module=$module&doc=$doc&block=$block&cmd=new,9\
23 reyssat 85
 
12490 bpr 86
  !endif
23 reyssat 87
!endif
88
!if $prim=tool
12490 bpr 89
  !href target=wims_tool module=$lmod&cmd=$lcmd$nadd $prompt
23 reyssat 90
!endif
91
!if $prim=doc
12490 bpr 92
  !href target=wims_doc module=$lmod&cmd=$lcmd$nadd $prompt
23 reyssat 93
!endif
94
!if $prim=example
12490 bpr 95
  !href target=wims_example module=$lmod&cmd=$lcmd$nadd $prompt
23 reyssat 96
!endif
97
!if $prim=help
12490 bpr 98
  !href target=wims_help module=$lmod&cmd=$lcmd$nadd $prompt
23 reyssat 99
!endif
100
!if $prim=adm
12490 bpr 101
  !href module=$lmod&cmd=$lcmd$nadd $prompt
23 reyssat 102
!endif
18009 bpr 103
!if $prim=glose
104
  !set lcmd=reply
105
  !set nadd=!replace internal & by &special_parm= in $nadd
106
  !href module=adm/tool/glossary&cmd=$lcmd$nadd&job=main prompt
107
!endif