Subversion Repositories wimsdev

Rev

Rev 18344 | Go to most recent revision | 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
10
!if ? isin $add
11
  !set add=!translate internal ? to , in $add
12
  !set add=!item 2 of $add
13
!endif
14
!set eq==
18009 bpr 15
!!for exercices and tools in a class, syntax of the form numero_sheet/numero_exercise
20 reyssat 16
!if $eq notin $add and $wims_class>0 and / isin $add \
14431 bpr 17
    and $prim iswordof exercise tool
12733 bpr 18
  !set add=!translate internal / to $ $ in $add
19
  !distribute words $add into sh,ex
20
  !set l_=!record $ex of wimshome/log/classes/$wims_class/sheets/.sheet$sh
18016 bpr 21
  !set sev=!record 0 of wimshome/log/classes/$wims_class/sheets/.severity
22
  !set sev=!line $sh+1 of $sev
12733 bpr 23
  !distribute lines $l_ into m_,p_,a_,b_,t_,d_
24
  !set m_exotitle=$t_
25
  !set m_exodescription=$d_
26
  !set prompt=!item 2 to -1 of $parms
27
  !default prompt=$t_
18014 bpr 28
  !read docu/scoreprint $sh/$ex,$sev
12733 bpr 29
  !href target=wims_exo cmd=new&module=$m_&worksheet=$sh&$p_ $prompt
30
  !exit
20 reyssat 31
!endif
18051 bpr 32
!set add=!replace internal &+ by & in $add
33
!set add=!replace internal %2F by / in $add
20 reyssat 34
!set add=!translate internal & to $ $ in $add
35
!set n=!wordcnt $add
18344 bpr 36
!reset nadd lmod lses lcmd
20 reyssat 37
!for i=1 to $n
12733 bpr 38
  !set l=!word $i of $add
39
  !set ll=!translate = to , in $l
40
  !distribute items $ll into l1,l2
41
  !if $l1=cmd and $l2 iswordof intro help close
42
    !set lcmd=$l2
43
  !endif
44
  !if $l1=module
45
    !set lmod=$l2
46
  !endif
18053 bpr 47
  !if $l1 notwordof module cmd session worksheet
12733 bpr 48
    !set nadd=$nadd $l
49
  !endif
20 reyssat 50
!next i
51
!default lmod=home
52
!default lcmd=new
18009 bpr 53
!set nadd=!trim $nadd
7279 bpr 54
!set nadd=!translate internal $ $ to & in $nadd
20 reyssat 55
!set prompt=!item 2 to -1 of $parms
6811 czzmrn 56
!default prompt=!module title_$lang $lmod
20 reyssat 57
!default prompt=!module title $lmod
58
 
59
!default prompt=$n_unknown
60
 
61
!if $prim=exercise
18051 bpr 62
  !!use also docsh in adm/class/adddoc/adddocsh.proc
63
  !read docu/docsh $nadd
64
  !set nadd=$docsh_out
18009 bpr 65
  !reset ww_
18348 bpr 66
  !if $get_wksheet!=0 and $get_wksheet!=$empty
67
    !if $get_wksheet>0
68
      !set ww_=&worksheet=$get_wksheet
69
    !endif
70
    !read getparm $nadd$ww_ worksheet cmd
71
    !if $get_worksheet!=$empty
72
      !set work=!getexoindex module=$lmod param=$nadd sheet=$get_worksheet
73
    !else
74
      !set work=!getexoindex module=$lmod param=$nadd
75
    !endif
76
    !if $work!=$empty
77
      !read docu/scoreprint $work
78
      !default ww_=&worksheet=$tmp_sheet
79
    !endif
18009 bpr 80
  !endif
81
  !href target=wims_exo module=$lmod&cmd=$lcmd&$nadd$ww_ $prompt
12733 bpr 82
  !if $lcmd=new
18009 bpr 83
    !set nadd=!replace internal &+ by & in $nadd
84
    !set nadd=!char 2 to -1 of $nadd
12733 bpr 85
    !set sheetdata=$sheetdata\
20 reyssat 86
:$lmod\
18009 bpr 87
$nadd\
20 reyssat 88
10\
89
1\
90
$prompt\
5378 bpr 91
\
92
\
93
\
94
module=$module&block=$block&cmd=new,9\
20 reyssat 95
 
12733 bpr 96
  !endif
20 reyssat 97
!endif
98
!if $prim=tool
18223 bpr 99
  !href target=wims_tool module=$lmod&cmd=$lcmd&$nadd $prompt
20 reyssat 100
!endif
101
!if $prim=doc
18223 bpr 102
  !href target=wims_doc module=$lmod&cmd=$lcmd&$nadd $prompt
20 reyssat 103
!endif
104
!if $prim=example
18223 bpr 105
  !href target=wims_example module=$lmod&cmd=$lcmd&$nadd $prompt
20 reyssat 106
!endif
107
!if $prim=help
18223 bpr 108
  !href target=wims_help module=$lmod&cmd=$lcmd&$nadd $prompt
20 reyssat 109
!endif
110
!if $prim=adm
18223 bpr 111
  !href module=$lmod&cmd=$lcmd&$nadd $prompt
20 reyssat 112
!endif
12733 bpr 113
!if $prim=glose
114
  !set lcmd=reply
18009 bpr 115
  !set nadd=!replace internal & by &special_parm= in $nadd
116
  !href module=adm/tool/glossary&cmd=$lcmd$nadd&job=main prompt
12733 bpr 117
!endif