Rev 14441 | Rev 15763 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
5181 | guerimand | 1 | !read adm/language lang/names.phtml |
5195 | guerimand | 2 | !read adm/levelname.phtml |
23 | reyssat | 3 | !if robot isin $wims_session |
4 | error=bad_sheet |
||
5 | !exit |
||
6 | !endif |
||
7 | |||
8 | wims_trustfile=primitives/target.phtml |
||
10305 | guerimand | 9 | wims_prefix=class user tmp techvar |
23 | reyssat | 10 | wims_prefix2=$wims_prefix |
1932 | bpr | 11 | !set wims_backslash_insmath=yes |
23 | reyssat | 12 | wims_nw=deps prcnt empty job class_header data\ |
14348 | bpr | 13 | imagedir Imagedir Class_header wims_prefix wims_prefix2 |
23 | reyssat | 14 | !default prcnt=0 |
4801 | guerimand | 15 | |
4808 | guerimand | 16 | authscoresuspend=!defof class_authscoresuspend in wimshome/log/classes/$wims_class/.def |
12863 | czzmrn | 17 | wims_class_exolog=!defof class_exolog in wimshome/log/classes/$wims_class/.def |
4808 | guerimand | 18 | !default authscoresuspend=yes |
4884 | guerimand | 19 | !setdef wims_authscoresuspend=$authscoresuspend in wimshome/sessions/$wims_session/var.stat |
7664 | bpr | 20 | !set severity=!record 0 of wimshome/log/classes/$wims_class/sheets/.severity |
21 | !set severity=!line $sh+1 of $severity |
||
11106 | bpr | 22 | !distribute words $severity into severity_w,severity_s,severity_ss |
23 | !set tmp=!defof DF_SEVERITY in wimshome/public_html/bases/sys/define.conf |
||
24 | !distribute words $tmp into tmp_w,tmp_s,tmp_ss |
||
25 | !bound severity_w between 0 and 100000 default $tmp_w |
||
26 | !bound severity_s between integer 0 and 6 default $tmp_s |
||
27 | !bound severity_ss between integer 0 and 2 default $tmp_ss |
||
28 | !reset tmp tmp_w tmp_s tmp_ss |
||
29 | !set severity=$severity_w,$severity_s,$severity_ss |
||
7664 | bpr | 30 | !setdef wims_severity=$severity in wimshome/sessions/$wims_session/var.stat |
4808 | guerimand | 31 | !if $authscoresuspend=yes |
12476 | bpr | 32 | !if $job=suspend |
33 | wims_scorereg=suspend |
||
4808 | guerimand | 34 | !endif |
12476 | bpr | 35 | !if $job=reopen |
36 | wims_scorereg=$empty |
||
37 | !endif |
||
38 | !if ($job=suspend or $job=reopen) and $exo!=$empty |
||
39 | !let limit=!recordcnt wimshome/log/classes/$wims_class/sheets/.sheet$sh |
||
40 | !bound exo between 1 and $limit default 0 |
||
41 | !if $exo!=0 |
||
42 | !set ex=!record $exo of wimshome/log/classes/$wims_class/sheets/.sheet$sh |
||
43 | !distribute lines $ex into di,pa,require,we,ti,de |
||
44 | !setdef w_wims_scorereg=$wims_scorereg in wimshome/sessions/$wims_session/var |
||
45 | !restart module=$di&cmd=new&worksheet=$public$sh&$pa |
||
46 | !endif |
||
47 | !endif |
||
4808 | guerimand | 48 | !else |
12476 | bpr | 49 | wims_scorereg=$empty |
50 | !setdef w_wims_scorereg=$empty in wimshome/sessions/$wims_session/var |
||
23 | reyssat | 51 | !endif |
4801 | guerimand | 52 | |
1407 | bpr | 53 | !if $seq!= |
12476 | bpr | 54 | !set wims_sequence=$seq |
1407 | bpr | 55 | !endif |
23 | reyssat | 56 | |
57 | !bound job within read,raw,import,print default read |
||
58 | c=!char 1 of $sh |
||
59 | !if $c=P or $wims_class=$empty or / isin $sh |
||
12476 | bpr | 60 | public=P |
61 | !if $c=P |
||
62 | sh=!char 2 to -1 of $sh |
||
63 | !endif |
||
23 | reyssat | 64 | !endif |
65 | |||
66 | !if $job iswordof raw import and ($public!=P or $wims_user!=supervisor) |
||
12476 | bpr | 67 | job=read |
23 | reyssat | 68 | !endif |
69 | |||
70 | !if $public!=P |
||
12476 | bpr | 71 | !bound sh between integer 1 and 1024 default 0 |
7664 | bpr | 72 | |
12476 | bpr | 73 | !if $sh=0 |
74 | :badsheet |
||
75 | error=bad_sheet |
||
76 | !exit |
||
23 | reyssat | 77 | !endif |
12476 | bpr | 78 | data=wimshome/log/classes/$wims_class/sheets/.sheet$sh |
79 | sheet=!record $sh of wimshome/log/classes/$wims_class/sheets/.sheets |
||
14441 | guerimand | 80 | !if $wims_user!=supervisor |
81 | !! ------test if sheet is hidden for this user |
||
82 | h_=!line 9 of $sheet |
||
83 | !if $h_!=$empty |
||
84 | !readproc adm/vfilter/ishiddensheet.proc $h_ |
||
85 | !if $hidden_sheet=1 |
||
86 | error=sheet_hidden |
||
87 | !exit |
||
88 | !endif |
||
89 | !endif |
||
90 | !! -----end test |
||
91 | !endif |
||
12476 | bpr | 92 | !distribute lines $sheet into sheet_active,sheet_expiration,sheet_title,sheet_desc,sheet_docpage |
93 | !if $wims_user != supervisor and $sheet_active notin 12 |
||
94 | !distribute items $ into sheet_active,sheet_expiration,sheet_title,sheet_desc,sheet_docpage |
||
95 | !if $job=print |
||
96 | job=read |
||
97 | !endif |
||
23 | reyssat | 98 | !endif |
12476 | bpr | 99 | sheet_docpage=!word 1 of $sheet_docpage |
100 | !if $sheet_docpage!=$empty |
||
101 | docdef=wimshome/log/classes/$wims_class/doc/$sheet_docpage.def |
||
102 | doctit=!getdef titb in $docdef |
||
103 | !if $doctit=$empty |
||
104 | !reset docdef sheet_docpage |
||
105 | !endif |
||
106 | !endif |
||
107 | requires=!getscorerequire sheet=$sh |
||
108 | scores=!getscore sheet=$sh |
||
109 | means=!getscoremean sheet=$sh |
||
110 | bests=!getscorebest sheet=$sh |
||
111 | levels=!getscorelevel sheet=$sh |
||
12531 | bpr | 112 | alltries=!getscorealltries sheet=$sh |
12476 | bpr | 113 | !if $sheet_active=$empty |
114 | n=0 |
||
23 | reyssat | 115 | !else |
12476 | bpr | 116 | n=!recordcnt $data |
23 | reyssat | 117 | !endif |
12476 | bpr | 118 | !if $job=read and $n>0 |
119 | !read adm/mkdepsheet.proc $sh |
||
23 | reyssat | 120 | !endif |
12476 | bpr | 121 | exolog=!filelist $wims_home/$wims_sesdir/exolog.$sh.* |
122 | !else |
||
123 | dd=!record 0 of wimshome/$wims_sesdir/.sheets |
||
124 | !if / isin $sh |
||
125 | test=!positionof line $sh in $dd |
||
126 | !if $test=$empty |
||
127 | !appendfile wimshome/$wims_sesdir/.sheets $sh |
||
128 | shn=!linecnt $dd |
||
129 | !advance shn |
||
130 | !else |
||
131 | shn=!item 1 of $test |
||
132 | !endif |
||
133 | !else |
||
134 | !bound sh between integer 1 and 1024 default 0 |
||
135 | !if $sh=0 |
||
136 | !goto badsheet |
||
137 | !endif |
||
138 | shn=$sh |
||
139 | sh=!line $shn of $dd |
||
140 | sh=!trim $sh |
||
141 | !if $sh=$empty |
||
142 | !goto badsheet |
||
143 | !endif |
||
23 | reyssat | 144 | !endif |
12476 | bpr | 145 | data=wimshome/public_html/bases/sheet/$sh.def |
146 | sheet=!record 0 of $data |
||
147 | sheet=!trim $sheet |
||
148 | !distribute lines $sheet into sheet_title, sheet_desc, sheet_duration,\ |
||
149 | sheet_severity, sheet_level, sheet_domain, sheet_keywords |
||
150 | !!sheet_remark=!lines 10 to -1 of $sheet |
||
151 | !distribute words $sheet_duration into sheet_duration,sheet_year |
||
152 | sheet_active=1 |
||
153 | n=!recordcnt $data |
||
7664 | bpr | 154 | |
23 | reyssat | 155 | !endif |
4884 | guerimand | 156 | !!setdef wims_sheettitle=$sheet_title in wimshome/sessions/$wims_session/var.stat |
23 | reyssat | 157 | |
2865 | guerimand | 158 | maxexo=!recordcnt $data |
159 | !setdef wims_sheetmax=$maxexo in wimshome/sessions/$wims_session/var.stat |
||
7664 | bpr | 160 | |
4530 | bpr | 161 | !reset exofeedback |
162 | !for e=1 to $maxexo |
||
163 | redir=!record $e of wimshome/log/classes/$wims_class/sheets/.sheet$sh |
||
164 | redir=!line 9 of $redir |
||
14646 | bpr | 165 | !if $redir!=$empty |
166 | redir=[$redir] |
||
167 | !endif |
||
4530 | bpr | 168 | !if $e=1 |
169 | exofeedback=$redir |
||
170 | !else |
||
7664 | bpr | 171 | exofeedback=$exofeedback;$redir |
172 | !endif |
||
4530 | bpr | 173 | !next |
174 | !setdef wims_exofeedback=$exofeedback in wimshome/sessions/$wims_session/var.stat |
||
23 | reyssat | 175 | !if $job iswordof print import |
12476 | bpr | 176 | !read $job.proc |
23 | reyssat | 177 | !endif |