Rev 14460 | Rev 16615 | Go to most recent revision | 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 |
||
33 | reyssat | 62 | !endif |
63 | |||
11583 | bpr | 64 | !read names.$lang |
33 | reyssat | 65 | !if $wims_user=$empty or $wims_user=supervisor or _tool isin $wims_session |
12539 | obado | 66 | !read adm/search_engine/search.proc |
12499 | bpr | 67 | s_lang=$search_lang |
68 | s_category=$search_category |
||
69 | s_keywords=$search_keywords |
||
70 | !if $s_keywords!=$empty and $s_category!=V and $readback!=yes |
||
71 | c=$gotcnt |
||
72 | !if $gottype!=search |
||
73 | c=0 |
||
74 | !endif |
||
75 | !read wimshome/$s2dir/home_lastsearch |
||
76 | !if $s_lang,$s_category,$s_keywords!=$lastsearch |
||
77 | wims_module_log=$(s_lang)_$s_category=$c: $s_keywords |
||
78 | !writefile wimshome/$s2dir/home_lastsearch lastsearch=$s_lang,$s_category,$s_keywords |
||
79 | !endif |
||
33 | reyssat | 80 | !endif |
81 | !endif |
||
82 | |||
83 | !if $wims_user=supervisor |
||
12499 | bpr | 84 | docpubliccnt=!recordcnt wimshome/log/classes/$wims_class/doc/.docindex |
85 | doccnt=!recordcnt wimshome/log/classes/$wims_class/doc/.index |
||
86 | sheetcnt=!recordcnt wimshome/log/classes/$wims_class/sheets/.sheets |
||
14297 | guerimand | 87 | test=!defof allowed_optional_module in wimshome/log/wims.conf |
88 | !if class/freework isitemof $test |
||
89 | allowed_freework=yes |
||
90 | !else |
||
91 | !reset allowed_freework,freeworkcnt |
||
92 | !endif |
||
93 | !if $allowed_freework=yes |
||
94 | freeworkcnt=!recordcnt wimshome/log/classes/$wims_class/freeworks/.freeworks |
||
95 | min_freework_erasable=0 |
||
96 | !for k=1 to $freeworkcnt |
||
97 | t=!record $k of wimshome/log/classes/$wims_class/freeworks/.freeworks |
||
98 | t=!line 1 of $t |
||
99 | !if $t>0 |
||
100 | min_freework_erasable=$k |
||
101 | !endif |
||
102 | !next k |
||
103 | !endif |
||
12499 | bpr | 104 | min_sheet_erasable=0 |
12912 | guerimand | 105 | sheet_inpreparation=0 |
12499 | bpr | 106 | !for k=1 to $sheetcnt |
107 | t=!record $k of wimshome/log/classes/$wims_class/sheets/.sheets |
||
108 | t=!line 1 of $t |
||
109 | !if $t>0 |
||
110 | min_sheet_erasable=$k |
||
12912 | guerimand | 111 | !else |
112 | sheet_inpreparation=1 |
||
12499 | bpr | 113 | !endif |
114 | !next k |
||
115 | examcnt=!recordcnt wimshome/log/classes/$wims_class/exams/.exams |
||
116 | min_exam_erasable=0 |
||
117 | !for k=1 to $examcnt |
||
118 | t=!record $k of wimshome/log/classes/$wims_class/exams/.exams |
||
119 | t=!line 1 of $t |
||
120 | !if $t>0 |
||
121 | min_exam_erasable=$k |
||
122 | !endif |
||
123 | !next k |
||
124 | votecnt=!recordcnt wimshome/log/classes/$wims_class/vote/.votes |
||
125 | !read wimshome/log/classes/$wims_class/Exindex |
||
14319 | guerimand | 126 | !read adm/class/quotafree.proc proc |
33 | reyssat | 127 | !endif |
128 | |||
129 | !if $wims_user!=$empty |
||
12499 | bpr | 130 | !if $wims_class_refcolor!=$empty |
131 | wims_ref_bgcolor=$wims_class_refcolor |
||
33 | reyssat | 132 | !endif |
12499 | bpr | 133 | !read ./var.msgcnt |
134 | !default class_type=0 |
||
135 | !if $class_type=2 |
||
136 | !exchange wims_institutionname, wims_classname |
||
33 | reyssat | 137 | !endif |
12499 | bpr | 138 | !if $class_type=1 |
139 | parentcheck=!defof user_class in wimshome/log/classes/$wims_class/.users/$wims_user |
||
12982 | bpr | 140 | !if $parentcheck!=$empty and $wims_superclass/ notin $parentcheck |
12499 | bpr | 141 | class_parent=$wims_superclass/$parentcheck |
142 | !endif |
||
143 | !endif |
||
144 | !default wims_realuser=$wims_user |
||
145 | !read adm/class/userdef logclasses,$wims_class,$wims_realuser |
||
146 | supervisable=!defof user_supervisable in $userdef |
||
147 | !if $class_type>=2 |
||
148 | !if $class_type=4 |
||
149 | subclasses=!record 0 of wimshome/log/classes/$wims_class/classes |
||
150 | subclasses=!column 1 of $subclasses |
||
151 | subclasses=!makelist $wims_class/x for x in $subclasses |
||
152 | subclasscnt=!itemcnt $subclasses |
||
153 | !if $wims_user=supervisor |
||
12975 | bpr | 154 | subclasscnt=0 |
12499 | bpr | 155 | !endif |
156 | subclass1=$wims_participate |
||
157 | !endif |
||
13064 | bpr | 158 | !if $class_type isin 34 |
159 | !if $class_type=3 |
||
160 | subclasses=!record 0 of wimshome/log/classes/$wims_class/courses |
||
161 | !else |
||
162 | subclasses=!record 0 of wimshome/log/classes/$wims_class/classes |
||
163 | !endif |
||
12975 | bpr | 164 | split=!translate internal / to , in $wims_class |
165 | subclasset=!record 0 of wimshome/log/classes/$(split[1])/$(split[2])/icourses |
||
166 | subclasses=!append line $subclasset to $subclasses |
||
167 | subclasset=!record 0 of wimshome/log/classes/$(split[1])/icourses |
||
168 | subclasses=!append line $subclasset to $subclasses |
||
169 | subclasses=!column 1 of $subclasses |
||
170 | subclasses=!listuniq $subclasses |
||
171 | subclasses=!makelist $wims_superclass/x for x in $subclasses |
||
172 | subclasscnt=!itemcnt $subclasses |
||
173 | !if $wims_user=supervisor |
||
174 | subclasscnt=0 |
||
175 | !endif |
||
176 | subclass1=$class_ocourses |
||
177 | subclass1=!makelist $wims_superclass/x for x in $subclass1 |
||
178 | upart=!listcomplement $wims_class in $wims_participate |
||
179 | upart2=!defof user_courses in wimshome/log/classes/$wims_class/.users/$wims_user |
||
180 | !if $upart2!=$empty |
||
181 | upart2=!makelist $wims_superclass/x for x in $upart2 |
||
182 | upart=!append item $upart2 to $upart |
||
183 | !endif |
||
184 | subclass1=!listunion $subclass1 and $upart |
||
12499 | bpr | 185 | !endif |
186 | !if $class_type=2 |
||
187 | subclasses=!sh cut -d, -f1 $wims_home/log/classes/$wims_class/.subclasses |
||
188 | subclasses=!replace internal : by $ in $subclasses |
||
189 | subclasses=!words2items $subclasses |
||
190 | subcnt=!recordcnt wimshome/log/classes/$wims_class/.subclasses |
||
191 | subclasscnt=!itemcnt $subclasses |
||
192 | subclass1=$wims_participate |
||
193 | !endif |
||
194 | subclass1=!sort items $subclass1 |
||
195 | subclass2=!listcomplement $subclass1 in $subclasses |
||
196 | !if $class_type iswordof 4 2 |
||
12975 | bpr | 197 | subclass3=$wims_supervise |
12499 | bpr | 198 | !endif |
199 | subclasscnt1=!itemcnt $subclass1 |
||
200 | subclasscnt2=!itemcnt $subclass2 |
||
201 | subclasscnt3=!itemcnt $subclass3 |
||
33 | reyssat | 202 | !endif |
203 | !endif |
||
11979 | guerimand | 204 | !readproc ./var.cdt |
10158 | bpr | 205 | !read ./otherclass.proc |
10944 | bpr | 206 | !if $wims_sheet=$empty |
12499 | bpr | 207 | !!! should be on the complete home page |
10444 | obado | 208 | !!distribute items no,no into wims_ariane_self,wims_ariane_home |
209 | !set wims_ariane_self=no |
||
10203 | bpr | 210 | !endif |
11714 | bpr | 211 | |
10290 | bpr | 212 | !if $(class_actcolor)!=$empty |
12499 | bpr | 213 | !read adm/class/seqcolors |
10290 | bpr | 214 | !endif |