Subversion Repositories wimsdev

Rev

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

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