Rev 17627 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
6470 | bpr | 1 | !set wims_backslash_insmath=yes |
33 | reyssat | 2 | # basic variable preparation. |
3 | !if robot isin $session |
||
12499 | bpr | 4 | !exit |
33 | reyssat | 5 | !endif |
14868 | guerimand | 6 | !set tmp=!defof classification_open\ |
7 | allowed_optional_module in wimshome/log/wims.conf |
||
8 | !distribute line $tmp into classification_open,wims_allowed_optional_module |
||
9 | !reset tmp |
||
7699 | bpr | 10 | !if $classification_open=yes |
14868 | guerimand | 11 | !set tmp=wims_classification_open=yes |
7699 | bpr | 12 | !endif |
14868 | guerimand | 13 | !if $wims_allowed_optional_module!=$empty |
14 | !set tmp=!append line wims_allowed_optional_module=$wims_allowed_optional_module to $tmp |
||
15 | !endif |
||
16 | !if $tmp!=$empty |
||
17 | !setdef $tmp in wimshome/sessions/$wims_session/var.stat |
||
18 | !endif |
||
5352 | guerimand | 19 | !if $wims_user=supervisor or $wims_supconnectshowed=yes |
12499 | bpr | 20 | !readproc adm/whoconnect |
5220 | guerimand | 21 | !endif |
22 | |||
2865 | guerimand | 23 | !if $directworksheet!=$empty |
12499 | bpr | 24 | !changeto launchseries.proc |
2865 | guerimand | 25 | !endif |
26 | |||
33 | reyssat | 27 | wims_prefix=class user tmp cdt search m |
28 | wims_writable=exolist titlelist exototal package lastsearch \ |
||
14458 | bpr | 29 | titb keyw datm prev next upbl dat1 dat2 front_exist |
3598 | guerimand | 30 | wims_readable=session wims_session wims_class wims_user lang module cmd front_exist |
33 | reyssat | 31 | |
14460 | obado | 32 | !read themes/_procs/frontmsg.proc |
33 | |||
33 | reyssat | 34 | !read ./tabletheme |
35 | !read ./formcolors |
||
1532 | guerimand | 36 | !read adm/search_engine/names.$lang |
33 | reyssat | 37 | module_language=$lang |
38 | subclasscnt=0 |
||
39 | |||
2571 | bpr | 40 | test=!record 0 of wimshome/public_html/modules/adm/browse/index |
33 | reyssat | 41 | !if $test!=$empty |
12499 | bpr | 42 | has_browse=yes |
43 | browse_parm=job=$browse_job&parm=$browse_parm |
||
33 | reyssat | 44 | !endif |
45 | |||
10157 | bpr | 46 | !if $wims_user!=$empty and $wims_class!=$empty |
12499 | bpr | 47 | !readdef ./wimshome/log/classes/$wims_class/.def |
48 | !default class_typename=class |
||
49 | !set class_authidp=!defof class_authidp in wimshome/log/classes/$wims_superclass/.def |
||
50 | !set auth_method_list=cas,ldap,php |
||
51 | !set auth_method=$(class_authidp[1;]) |
||
52 | !if $(class_authidp[1;]) isitemof $auth_method_list |
||
53 | !set ext_login=$wims_external_auth |
||
54 | !endif |
||
55 | !if $wims_user!=supervisor |
||
56 | !default ext_login=$wims_user |
||
57 | !else |
||
58 | !default ext_login=$wims_realuser |
||
59 | !default ext_login=$wims_user |
||
60 | !default ext_login=supervisor |
||
61 | !endif |
||
17293 | guerimand | 62 | !if $ext_login=SUPERVISOR |
63 | ext_login=supervisor |
||
64 | !endif |
||
33 | reyssat | 65 | !endif |
66 | |||
11583 | bpr | 67 | !read names.$lang |
33 | reyssat | 68 | !if $wims_user=$empty or $wims_user=supervisor or _tool isin $wims_session |
12539 | obado | 69 | !read adm/search_engine/search.proc |
12499 | bpr | 70 | s_lang=$search_lang |
71 | s_category=$search_category |
||
72 | s_keywords=$search_keywords |
||
73 | !if $s_keywords!=$empty and $s_category!=V and $readback!=yes |
||
74 | c=$gotcnt |
||
75 | !if $gottype!=search |
||
76 | c=0 |
||
77 | !endif |
||
78 | !read wimshome/$s2dir/home_lastsearch |
||
79 | !if $s_lang,$s_category,$s_keywords!=$lastsearch |
||
80 | wims_module_log=$(s_lang)_$s_category=$c: $s_keywords |
||
81 | !writefile wimshome/$s2dir/home_lastsearch lastsearch=$s_lang,$s_category,$s_keywords |
||
82 | !endif |
||
33 | reyssat | 83 | !endif |
84 | !endif |
||
85 | |||
86 | !if $wims_user=supervisor |
||
12499 | bpr | 87 | docpubliccnt=!recordcnt wimshome/log/classes/$wims_class/doc/.docindex |
88 | doccnt=!recordcnt wimshome/log/classes/$wims_class/doc/.index |
||
89 | sheetcnt=!recordcnt wimshome/log/classes/$wims_class/sheets/.sheets |
||
14297 | guerimand | 90 | test=!defof allowed_optional_module in wimshome/log/wims.conf |
91 | !if class/freework isitemof $test |
||
92 | allowed_freework=yes |
||
93 | !else |
||
94 | !reset allowed_freework,freeworkcnt |
||
95 | !endif |
||
96 | !if $allowed_freework=yes |
||
97 | freeworkcnt=!recordcnt wimshome/log/classes/$wims_class/freeworks/.freeworks |
||
98 | min_freework_erasable=0 |
||
99 | !for k=1 to $freeworkcnt |
||
100 | t=!record $k of wimshome/log/classes/$wims_class/freeworks/.freeworks |
||
101 | t=!line 1 of $t |
||
102 | !if $t>0 |
||
103 | min_freework_erasable=$k |
||
104 | !endif |
||
105 | !next k |
||
106 | !endif |
||
12499 | bpr | 107 | min_sheet_erasable=0 |
12912 | guerimand | 108 | sheet_inpreparation=0 |
12499 | bpr | 109 | !for k=1 to $sheetcnt |
110 | t=!record $k of wimshome/log/classes/$wims_class/sheets/.sheets |
||
111 | t=!line 1 of $t |
||
112 | !if $t>0 |
||
113 | min_sheet_erasable=$k |
||
12912 | guerimand | 114 | !else |
115 | sheet_inpreparation=1 |
||
12499 | bpr | 116 | !endif |
117 | !next k |
||
118 | examcnt=!recordcnt wimshome/log/classes/$wims_class/exams/.exams |
||
119 | min_exam_erasable=0 |
||
120 | !for k=1 to $examcnt |
||
121 | t=!record $k of wimshome/log/classes/$wims_class/exams/.exams |
||
122 | t=!line 1 of $t |
||
123 | !if $t>0 |
||
124 | min_exam_erasable=$k |
||
125 | !endif |
||
126 | !next k |
||
127 | votecnt=!recordcnt wimshome/log/classes/$wims_class/vote/.votes |
||
128 | !read wimshome/log/classes/$wims_class/Exindex |
||
14319 | guerimand | 129 | !read adm/class/quotafree.proc proc |
33 | reyssat | 130 | !endif |
131 | |||
132 | !if $wims_user!=$empty |
||
12499 | bpr | 133 | !if $wims_class_refcolor!=$empty |
134 | wims_ref_bgcolor=$wims_class_refcolor |
||
33 | reyssat | 135 | !endif |
12499 | bpr | 136 | !read ./var.msgcnt |
137 | !default class_type=0 |
||
138 | !if $class_type=2 |
||
139 | !exchange wims_institutionname, wims_classname |
||
33 | reyssat | 140 | !endif |
12499 | bpr | 141 | !if $class_type=1 |
142 | parentcheck=!defof user_class in wimshome/log/classes/$wims_class/.users/$wims_user |
||
12982 | bpr | 143 | !if $parentcheck!=$empty and $wims_superclass/ notin $parentcheck |
12499 | bpr | 144 | class_parent=$wims_superclass/$parentcheck |
145 | !endif |
||
146 | !endif |
||
147 | !default wims_realuser=$wims_user |
||
148 | !read adm/class/userdef logclasses,$wims_class,$wims_realuser |
||
16615 | guerimand | 149 | supervisable=!defof user_supervisable,user_forcechpwd in $userdef |
150 | !distribute item $supervisable into supervisable forcechpwd |
||
16819 | guerimand | 151 | authidp=!defof class_authidp in wimshome/log/classes/$wims_class/.def |
16820 | bpr | 152 | !if $wims_realuser!=supervisor and $forcechpwd=yes and $(authidp[1;])=$empty |
16615 | guerimand | 153 | test=!fileexists wimshome/sessions/$wims_session/var |
154 | !if $test!=yes |
||
155 | !writefile wimshome/$wims_sesdir/var REMOTE_ADDR=$httpd_REMOTE_ADDR\ |
||
156 | HTTP_REFERER=$httpd_HTTP_REFERER\ |
||
157 | QUERY_STRING=\ |
||
158 | HTTP_USER_AGENT=$httpd_HTTP_USER_AGENT\ |
||
159 | HTTP_COOKIE=$httpd_HTTP_COOKIE\ |
||
160 | w_cmd=new\ |
||
161 | w_lang=$class_lang\ |
||
162 | w_module=$module\ |
||
163 | w_session=$session\ |
||
164 | w_special_parm=\ |
||
165 | w_special_parm2=\ |
||
166 | w_useropts=$wims_useropts\ |
||
167 | w_wims_session=$wims_session\ |
||
168 | w_wims_subsession=$wims_subsession\ |
||
169 | w_wims_window=$wims_window\ |
||
170 | w_worksheet=\ |
||
171 | w_wims_exo=\ |
||
172 | w_wims_isexam=\ |
||
173 | w_wims_ismanager=$wims_ismanager\ |
||
174 | w_wims_mode=$wims_mode\ |
||
175 | w_wims_module_start_time=\ |
||
176 | w_wims_protocol=$wims_protocol\ |
||
177 | w_wims_req_time=$wims_req_time\ |
||
178 | w_wims_scorereg=\ |
||
179 | w_wims_session_serial=$wims_session_serial\ |
||
180 | w_wims_session_start_time=$wims_session_start_time\ |
||
181 | w_wims_sheet= |
||
182 | !endif |
||
183 | !restart module=adm/class/passwd&+job=user |
||
184 | !endif |
||
12499 | bpr | 185 | !if $class_type>=2 |
186 | !if $class_type=4 |
||
187 | subclasses=!record 0 of wimshome/log/classes/$wims_class/classes |
||
188 | subclasses=!column 1 of $subclasses |
||
189 | subclasses=!makelist $wims_class/x for x in $subclasses |
||
190 | subclasscnt=!itemcnt $subclasses |
||
191 | !if $wims_user=supervisor |
||
12975 | bpr | 192 | subclasscnt=0 |
12499 | bpr | 193 | !endif |
194 | subclass1=$wims_participate |
||
195 | !endif |
||
13064 | bpr | 196 | !if $class_type isin 34 |
197 | !if $class_type=3 |
||
198 | subclasses=!record 0 of wimshome/log/classes/$wims_class/courses |
||
199 | !else |
||
200 | subclasses=!record 0 of wimshome/log/classes/$wims_class/classes |
||
201 | !endif |
||
12975 | bpr | 202 | split=!translate internal / to , in $wims_class |
203 | subclasset=!record 0 of wimshome/log/classes/$(split[1])/$(split[2])/icourses |
||
204 | subclasses=!append line $subclasset to $subclasses |
||
205 | subclasset=!record 0 of wimshome/log/classes/$(split[1])/icourses |
||
206 | subclasses=!append line $subclasset to $subclasses |
||
207 | subclasses=!column 1 of $subclasses |
||
208 | subclasses=!listuniq $subclasses |
||
209 | subclasses=!makelist $wims_superclass/x for x in $subclasses |
||
210 | subclasscnt=!itemcnt $subclasses |
||
211 | !if $wims_user=supervisor |
||
212 | subclasscnt=0 |
||
213 | !endif |
||
214 | subclass1=$class_ocourses |
||
215 | subclass1=!makelist $wims_superclass/x for x in $subclass1 |
||
216 | upart=!listcomplement $wims_class in $wims_participate |
||
217 | upart2=!defof user_courses in wimshome/log/classes/$wims_class/.users/$wims_user |
||
218 | !if $upart2!=$empty |
||
219 | upart2=!makelist $wims_superclass/x for x in $upart2 |
||
220 | upart=!append item $upart2 to $upart |
||
221 | !endif |
||
222 | subclass1=!listunion $subclass1 and $upart |
||
12499 | bpr | 223 | !endif |
224 | !if $class_type=2 |
||
225 | subclasses=!sh cut -d, -f1 $wims_home/log/classes/$wims_class/.subclasses |
||
226 | subclasses=!replace internal : by $ in $subclasses |
||
227 | subclasses=!words2items $subclasses |
||
228 | subcnt=!recordcnt wimshome/log/classes/$wims_class/.subclasses |
||
229 | subclasscnt=!itemcnt $subclasses |
||
230 | subclass1=$wims_participate |
||
231 | !endif |
||
17627 | czzmrn | 232 | subclass1=!sort items $subclass1 |
17628 | czzmrn | 233 | subclass2=!listcomplement $subclass1 in $subclasses |
12499 | bpr | 234 | !if $class_type iswordof 4 2 |
12975 | bpr | 235 | subclass3=$wims_supervise |
12499 | bpr | 236 | !endif |
237 | subclasscnt1=!itemcnt $subclass1 |
||
238 | subclasscnt2=!itemcnt $subclass2 |
||
239 | subclasscnt3=!itemcnt $subclass3 |
||
33 | reyssat | 240 | !endif |
241 | !endif |
||
16615 | guerimand | 242 | |
17386 | guerimand | 243 | !readproc ./var.cdt |
17383 | guerimand | 244 | !if $wims_class!=$empty |
17386 | guerimand | 245 | !if / notin $wims_class and $wims_class<=9999 |
246 | !! swork is always close in example class (protection against bad parameters in example class .def |
||
247 | swork_open=0 |
||
248 | !else |
||
17383 | guerimand | 249 | swork_open=!defof swork_open in wimshome/log/classes/$wims_class/swork/.def |
17386 | guerimand | 250 | !endif |
17601 | bpr | 251 | !endif |
10158 | bpr | 252 | !read ./otherclass.proc |
10944 | bpr | 253 | !if $wims_sheet=$empty |
12499 | bpr | 254 | !!! should be on the complete home page |
10444 | obado | 255 | !!distribute items no,no into wims_ariane_self,wims_ariane_home |
256 | !set wims_ariane_self=no |
||
10203 | bpr | 257 | !endif |
11714 | bpr | 258 | |
10290 | bpr | 259 | !if $(class_actcolor)!=$empty |
12499 | bpr | 260 | !read adm/class/seqcolors |
10290 | bpr | 261 | !endif |