Subversion Repositories wimsdev

Rev

Rev 18348 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
18009 bpr 1
!read getparm $module_init_parm wksheet
7270 bpr 2
 
20 reyssat 3
!if \ isin $parm1
12733 bpr 4
  !for p in 1
5
    !set parm$p=!slashsubst $(parm$p)
6
  !next p
20 reyssat 7
!endif
18009 bpr 8
 
20 reyssat 9
!set add=$parm1
18406 bpr 10
!set parms=!slashsubst $(parms)
20 reyssat 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
20 reyssat 17
!if $eq notin $add and $wims_class>0 and / isin $add \
14431 bpr 18
    and $prim iswordof exercise tool
12733 bpr 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
18016 bpr 22
  !set sev=!record 0 of wimshome/log/classes/$wims_class/sheets/.severity
23
  !set sev=!line $sh+1 of $sev
12733 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
12733 bpr 30
  !href target=wims_exo cmd=new&module=$m_&worksheet=$sh&$p_ $prompt
31
  !exit
20 reyssat 32
!endif
18051 bpr 33
!set add=!replace internal &+ by & in $add
34
!set add=!replace internal %2F by / in $add
20 reyssat 35
!set add=!translate internal & to $ $ in $add
36
!set n=!wordcnt $add
18344 bpr 37
!reset nadd lmod lses lcmd
20 reyssat 38
!for i=1 to $n
12733 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
12733 bpr 49
    !set nadd=$nadd $l
50
  !endif
20 reyssat 51
!next i
52
!default lmod=home
53
!default lcmd=new
18009 bpr 54
!set nadd=!trim $nadd
7279 bpr 55
!set nadd=!translate internal $ $ to & in $nadd
20 reyssat 56
!set prompt=!item 2 to -1 of $parms
6811 czzmrn 57
!default prompt=!module title_$lang $lmod
20 reyssat 58
!default prompt=!module title $lmod
59
 
60
!default prompt=$n_unknown
61
 
62
!if $prim=exercise
18051 bpr 63
  !!use also docsh in adm/class/adddoc/adddocsh.proc
64
  !read docu/docsh $nadd
65
  !set nadd=$docsh_out
18009 bpr 66
  !reset ww_
18348 bpr 67
  !if $get_wksheet!=0 and $get_wksheet!=$empty
68
    !if $get_wksheet>0
69
      !set ww_=&worksheet=$get_wksheet
70
    !endif
71
    !read getparm $nadd$ww_ worksheet cmd
72
    !if $get_worksheet!=$empty
73
      !set work=!getexoindex module=$lmod param=$nadd sheet=$get_worksheet
74
    !else
75
      !set work=!getexoindex module=$lmod param=$nadd
76
    !endif
77
    !if $work!=$empty
78
      !read docu/scoreprint $work
79
      !default ww_=&worksheet=$tmp_sheet
80
    !endif
18009 bpr 81
  !endif
82
  !href target=wims_exo module=$lmod&cmd=$lcmd&$nadd$ww_ $prompt
12733 bpr 83
  !if $lcmd=new
18009 bpr 84
    !set nadd=!replace internal &+ by & in $nadd
85
    !set nadd=!char 2 to -1 of $nadd
12733 bpr 86
    !set sheetdata=$sheetdata\
20 reyssat 87
:$lmod\
18009 bpr 88
$nadd\
20 reyssat 89
10\
90
1\
91
$prompt\
5378 bpr 92
\
93
\
94
\
95
module=$module&block=$block&cmd=new,9\
20 reyssat 96
 
12733 bpr 97
  !endif
20 reyssat 98
!endif
99
!if $prim=tool
18223 bpr 100
  !href target=wims_tool module=$lmod&cmd=$lcmd&$nadd $prompt
20 reyssat 101
!endif
102
!if $prim=doc
18223 bpr 103
  !href target=wims_doc module=$lmod&cmd=$lcmd&$nadd $prompt
20 reyssat 104
!endif
105
!if $prim=example
18223 bpr 106
  !href target=wims_example module=$lmod&cmd=$lcmd&$nadd $prompt
20 reyssat 107
!endif
108
!if $prim=help
18223 bpr 109
  !href target=wims_help module=$lmod&cmd=$lcmd&$nadd $prompt
20 reyssat 110
!endif
111
!if $prim=adm
18223 bpr 112
  !href module=$lmod&cmd=$lcmd&$nadd $prompt
20 reyssat 113
!endif
12733 bpr 114
!if $prim=glose
115
  !set lcmd=reply
18009 bpr 116
  !set nadd=!replace internal & by &special_parm= in $nadd
117
  !href module=adm/tool/glossary&cmd=$lcmd$nadd&job=main prompt
12733 bpr 118
!endif