File: target.phtml

package info (click to toggle)
wims 2%3A4.29a%2Bdfsg1-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 185,704 kB
  • sloc: xml: 366,687; javascript: 120,570; ansic: 62,341; java: 62,170; sh: 7,744; perl: 3,937; yacc: 3,217; cpp: 1,915; lex: 1,805; makefile: 1,084; lisp: 914; pascal: 601; python: 520; php: 318; asm: 7
file content (118 lines) | stat: -rw-r--r-- 3,206 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
!read getparm $module_init_parm wksheet

!if \ isin $parm1
  !for p in 1
    !set parm$p=!slashsubst $(parm$p)
  !next p
!endif

!set add=$parm1
!set parms=!slashsubst $(parms)
!if ? isin $add
  !set add=!translate internal ? to , in $add
  !set add=!item 2 of $add
!endif
!set eq==
!!for exercices and tools in a class, syntax of the form numero_sheet/numero_exercise
!if $eq notin $add and $wims_class>0 and / isin $add \
    and $prim iswordof exercise tool
  !set add=!translate internal / to $ $ in $add
  !distribute words $add into sh,ex
  !set l_=!record $ex of wimshome/log/classes/$wims_class/sheets/.sheet$sh
  !set sev=!record 0 of wimshome/log/classes/$wims_class/sheets/.severity
  !set sev=!line $sh+1 of $sev
  !distribute lines $l_ into m_,p_,a_,b_,t_,d_
  !set m_exotitle=$t_
  !set m_exodescription=$d_
  !set prompt=!item 2 to -1 of $parms
  !default prompt=$t_
  !read docu/scoreprint $sh/$ex,$sev
  !href target=wims_exo cmd=new&module=$m_&worksheet=$sh&$p_ $prompt
  !exit
!endif
!set add=!replace internal &+ by & in $add
!set add=!replace internal %2F by / in $add
!set add=!translate internal & to $ $ in $add
!set n=!wordcnt $add
!reset nadd lmod lses lcmd
!for i=1 to $n
  !set l=!word $i of $add
  !set ll=!translate = to , in $l
  !distribute items $ll into l1,l2
  !if $l1=cmd and $l2 iswordof intro help close
    !set lcmd=$l2
  !endif
  !if $l1=module
    !set lmod=$l2
  !endif
  !if $l1 notwordof module cmd session worksheet
    !set nadd=$nadd $l
  !endif
!next i
!default lmod=home
!default lcmd=new
!set nadd=!trim $nadd
!set nadd=!translate internal $ $ to & in $nadd
!set prompt=!item 2 to -1 of $parms
!default prompt=!module title_$lang $lmod
!default prompt=!module title $lmod

!default prompt=$n_unknown

!if $prim=exercise
  !!use also docsh in adm/class/adddoc/adddocsh.proc
  !read docu/docsh $nadd
  !set nadd=$docsh_out
  !reset ww_
  !if $get_wksheet!=0 and $get_wksheet!=$empty
    !if $get_wksheet>0
      !set ww_=&worksheet=$get_wksheet
    !endif
    !read getparm $nadd$ww_ worksheet cmd
    !if $get_worksheet!=$empty
      !set work=!getexoindex module=$lmod param=$nadd sheet=$get_worksheet
    !else
      !set work=!getexoindex module=$lmod param=$nadd
    !endif
    !if $work!=$empty
      !read docu/scoreprint $work
      !default ww_=&worksheet=$tmp_sheet
    !endif
  !endif
  !href target=wims_exo module=$lmod&cmd=$lcmd&$nadd$ww_ $prompt
  !if $lcmd=new
    !set nadd=!replace internal &+ by & in $nadd
    !set nadd=!char 2 to -1 of $nadd
    !set sheetdata=$sheetdata\
:$lmod\
$nadd\
10\
1\
$prompt\
\
\
\
module=$module&block=$block&cmd=new,9\

  !endif
!endif
!if $prim=tool
  !href target=wims_tool module=$lmod&cmd=$lcmd&$nadd $prompt
!endif
!if $prim=doc
  !href target=wims_doc module=$lmod&cmd=$lcmd&$nadd $prompt
!endif
!if $prim=example
  !href target=wims_example module=$lmod&cmd=$lcmd&$nadd $prompt
!endif
!if $prim=help
  !href target=wims_help module=$lmod&cmd=$lcmd&$nadd $prompt
!endif
!if $prim=adm
  !href module=$lmod&cmd=$lcmd&$nadd $prompt
!endif
!if $prim=glose
  !set lcmd=reply
  !set nadd=!replace internal & by &special_parm= in $nadd
  !href module=adm/tool/glossary&cmd=$lcmd$nadd&job=main prompt
!endif