Subversion Repositories wimsdev

Rev

Rev 18046 | Rev 18052 | 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
2
 
18009 bpr 3
!setdef wims_wksheet=$get_wksheet in wimshome/sessions/$wims_session/var.stat
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
18051 bpr 33
!set add=!translate internal &+ to $ $ in $add
23 reyssat 34
!set add=!translate internal & to $ $ in $add
35
!set n=!wordcnt $add
36
!reset nadd,lmod,lses,lcmd
37
!for i=1 to $n
12490 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
18009 bpr 47
  !if $l1 notwordof module cmd session lang worksheet
12490 bpr 48
    !set nadd=$nadd $l
49
  !endif
23 reyssat 50
!next i
51
!default lmod=home
52
!default lcmd=new
18009 bpr 53
!set nadd=!trim $nadd
23 reyssat 54
!set nadd=!translate internal $ $ to & in $nadd
55
!set prompt=!item 2 to -1 of $parms
6810 czzmrn 56
!default prompt=!module title_$lang $lmod
23 reyssat 57
!default prompt=!module title $lmod
58
 
747 bpr 59
!default prompt=$n_unknown
23 reyssat 60
 
61
!if $prim=exercise
10032 bpr 62
  !reset ww_
18009 bpr 63
  !if $get_wksheet!=$empty and $get_wksheet!=0
64
    !set ww_=&worksheet=$get_wksheet
18032 bpr 65
    !set work=!getexoindex $lmod $nadd sheet=$get_wksheet
18014 bpr 66
    !if $work!=$empty
67
      !read docu/scoreprint $work
68
    !endif
10032 bpr 69
  !endif
18009 bpr 70
  !href target=wims_exo module=$lmod&cmd=$lcmd&$nadd$ww_ $prompt
10032 bpr 71
  !if $lcmd=new
12490 bpr 72
    !set nadd=!replace internal &+ by & in $nadd
73
    !set nadd=!char 2 to -1 of $nadd
74
    !set sheetdata=$sheetdata\
23 reyssat 75
:$lmod\
76
$nadd\
77
10\
78
1\
79
$prompt\
5378 bpr 80
\
81
\
82
\
83
module=$module&doc=$doc&block=$block&cmd=new,9\
23 reyssat 84
 
12490 bpr 85
  !endif
23 reyssat 86
!endif
87
!if $prim=tool
12490 bpr 88
  !href target=wims_tool module=$lmod&cmd=$lcmd$nadd $prompt
23 reyssat 89
!endif
90
!if $prim=doc
12490 bpr 91
  !href target=wims_doc module=$lmod&cmd=$lcmd$nadd $prompt
23 reyssat 92
!endif
93
!if $prim=example
12490 bpr 94
  !href target=wims_example module=$lmod&cmd=$lcmd$nadd $prompt
23 reyssat 95
!endif
96
!if $prim=help
12490 bpr 97
  !href target=wims_help module=$lmod&cmd=$lcmd$nadd $prompt
23 reyssat 98
!endif
99
!if $prim=adm
12490 bpr 100
  !href module=$lmod&cmd=$lcmd$nadd $prompt
23 reyssat 101
!endif
18009 bpr 102
!if $prim=glose
103
  !set lcmd=reply
104
  !set nadd=!replace internal & by &special_parm= in $nadd
105
  !href module=adm/tool/glossary&cmd=$lcmd$nadd&job=main prompt
106
!endif