Subversion Repositories wimsdev

Rev

Rev 18217 | Rev 18345 | 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
18343 bpr 39
!reset nadd,lmod,lses,lcmd naddw nadd1
23 reyssat 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
18343 bpr 50
  !if $l1 notwordof module cmd session wksheet worksheet
12490 bpr 51
    !set nadd=$nadd $l
52
  !endif
18343 bpr 53
  !if $l1 iswordof worksheet
54
    !set naddw=$l
55
  !endif
23 reyssat 56
!next i
57
!default lmod=home
58
!default lcmd=new
18009 bpr 59
!set nadd=!trim $nadd
23 reyssat 60
!set nadd=!translate internal $ $ to & in $nadd
18343 bpr 61
!set nadd1=$nadd
62
!if $naddw!=
63
  !set nadd1=$nadd&$naddw
64
!endif
23 reyssat 65
!set prompt=!item 2 to -1 of $parms
6810 czzmrn 66
!default prompt=!module title_$lang $lmod
23 reyssat 67
!default prompt=!module title $lmod
68
 
747 bpr 69
!default prompt=$n_unknown
23 reyssat 70
 
71
!if $prim=exercise
10032 bpr 72
  !reset ww_
18009 bpr 73
  !if $get_wksheet!=$empty and $get_wksheet!=0
74
    !set ww_=&worksheet=$get_wksheet
18089 bpr 75
    !set work=!getexoindex module=$lmod param=$nadd sheet=$get_wksheet
18014 bpr 76
    !if $work!=$empty
77
      !read docu/scoreprint $work
78
    !endif
10032 bpr 79
  !endif
18343 bpr 80
  !href target=wims_exo module=$lmod&cmd=$lcmd&$nadd1$ww_ $prompt
10032 bpr 81
  !if $lcmd=new
12490 bpr 82
    !set nadd=!replace internal &+ by & in $nadd
83
    !set nadd=!char 2 to -1 of $nadd
84
    !set sheetdata=$sheetdata\
23 reyssat 85
:$lmod\
86
$nadd\
87
10\
88
1\
89
$prompt\
5378 bpr 90
\
91
\
92
\
93
module=$module&doc=$doc&block=$block&cmd=new,9\
23 reyssat 94
 
12490 bpr 95
  !endif
23 reyssat 96
!endif
97
!if $prim=tool
18215 bpr 98
  !href target=wims_tool module=$lmod&cmd=$lcmd&$nadd $prompt
23 reyssat 99
!endif
100
!if $prim=doc
18217 bpr 101
  !href target=wims_doc module=$lmod&cmd=$lcmd&$nadd $prompt
23 reyssat 102
!endif
103
!if $prim=example
18215 bpr 104
  !href target=wims_example module=$lmod&cmd=$lcmd&$nadd $prompt
23 reyssat 105
!endif
106
!if $prim=help
18215 bpr 107
  !href target=wims_help module=$lmod&cmd=$lcmd&$nadd $prompt
23 reyssat 108
!endif
109
!if $prim=adm
12490 bpr 110
  !href module=$lmod&cmd=$lcmd$nadd $prompt
23 reyssat 111
!endif
18009 bpr 112
!if $prim=glose
113
  !set lcmd=reply
114
  !set nadd=!replace internal & by &special_parm= in $nadd
115
  !href module=adm/tool/glossary&cmd=$lcmd$nadd&job=main prompt
116
!endif