Rev 12982 | Rev 14297 | 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 |
7699 | bpr | 6 | !set classification_open=!defof classification_open in wimshome/log/wims.conf |
7 | !if $classification_open=yes |
||
8 | !setdef wims_classification_open=yes in wimshome/sessions/$wims_session/var.stat |
||
9 | !endif |
||
5352 | guerimand | 10 | !if $wims_user=supervisor or $wims_supconnectshowed=yes |
12499 | bpr | 11 | !readproc adm/whoconnect |
5220 | guerimand | 12 | !endif |
13 | |||
2865 | guerimand | 14 | !if $directworksheet!=$empty |
12499 | bpr | 15 | !changeto launchseries.proc |
2865 | guerimand | 16 | !endif |
17 | |||
33 | reyssat | 18 | wims_prefix=class user tmp cdt search m |
19 | wims_writable=exolist titlelist exototal package lastsearch \ |
||
7562 | bpr | 20 | titb keyw datm prev next upbl dat1 dat2 front_exist |
3598 | guerimand | 21 | wims_readable=session wims_session wims_class wims_user lang module cmd front_exist |
33 | reyssat | 22 | |
23 | !read ./tabletheme |
||
24 | !read ./formcolors |
||
1532 | guerimand | 25 | !read adm/search_engine/names.$lang |
33 | reyssat | 26 | module_language=$lang |
27 | subclasscnt=0 |
||
28 | |||
2571 | bpr | 29 | test=!record 0 of wimshome/public_html/modules/adm/browse/index |
33 | reyssat | 30 | !if $test!=$empty |
12499 | bpr | 31 | has_browse=yes |
32 | browse_parm=job=$browse_job&parm=$browse_parm |
||
33 | reyssat | 33 | !endif |
34 | |||
10157 | bpr | 35 | !if $wims_user!=$empty and $wims_class!=$empty |
12499 | bpr | 36 | !readdef ./wimshome/log/classes/$wims_class/.def |
37 | !default class_typename=class |
||
38 | !set class_authidp=!defof class_authidp in wimshome/log/classes/$wims_superclass/.def |
||
39 | !set auth_method_list=cas,ldap,php |
||
40 | !set auth_method=$(class_authidp[1;]) |
||
41 | !if $(class_authidp[1;]) isitemof $auth_method_list |
||
42 | !set ext_login=$wims_external_auth |
||
43 | !endif |
||
44 | !if $wims_user!=supervisor |
||
45 | !default ext_login=$wims_user |
||
46 | !else |
||
47 | !default ext_login=$wims_realuser |
||
48 | !default ext_login=$wims_user |
||
49 | !default ext_login=supervisor |
||
50 | !endif |
||
33 | reyssat | 51 | !endif |
52 | |||
11583 | bpr | 53 | !read names.$lang |
33 | reyssat | 54 | !if $wims_user=$empty or $wims_user=supervisor or _tool isin $wims_session |
12539 | obado | 55 | !read adm/search_engine/search.proc |
12499 | bpr | 56 | s_lang=$search_lang |
57 | s_category=$search_category |
||
58 | s_keywords=$search_keywords |
||
59 | !if $s_keywords!=$empty and $s_category!=V and $readback!=yes |
||
60 | c=$gotcnt |
||
61 | !if $gottype!=search |
||
62 | c=0 |
||
63 | !endif |
||
64 | !read wimshome/$s2dir/home_lastsearch |
||
65 | !if $s_lang,$s_category,$s_keywords!=$lastsearch |
||
66 | wims_module_log=$(s_lang)_$s_category=$c: $s_keywords |
||
67 | !writefile wimshome/$s2dir/home_lastsearch lastsearch=$s_lang,$s_category,$s_keywords |
||
68 | !endif |
||
33 | reyssat | 69 | !endif |
70 | !endif |
||
71 | |||
72 | !if $wims_user=supervisor |
||
12499 | bpr | 73 | docpubliccnt=!recordcnt wimshome/log/classes/$wims_class/doc/.docindex |
74 | doccnt=!recordcnt wimshome/log/classes/$wims_class/doc/.index |
||
75 | sheetcnt=!recordcnt wimshome/log/classes/$wims_class/sheets/.sheets |
||
76 | min_sheet_erasable=0 |
||
12912 | guerimand | 77 | sheet_inpreparation=0 |
12499 | bpr | 78 | !for k=1 to $sheetcnt |
79 | t=!record $k of wimshome/log/classes/$wims_class/sheets/.sheets |
||
80 | t=!line 1 of $t |
||
81 | !if $t>0 |
||
82 | min_sheet_erasable=$k |
||
12912 | guerimand | 83 | !else |
84 | sheet_inpreparation=1 |
||
12499 | bpr | 85 | !endif |
86 | !next k |
||
87 | examcnt=!recordcnt wimshome/log/classes/$wims_class/exams/.exams |
||
88 | min_exam_erasable=0 |
||
89 | !for k=1 to $examcnt |
||
90 | t=!record $k of wimshome/log/classes/$wims_class/exams/.exams |
||
91 | t=!line 1 of $t |
||
92 | !if $t>0 |
||
93 | min_exam_erasable=$k |
||
94 | !endif |
||
95 | !next k |
||
96 | votecnt=!recordcnt wimshome/log/classes/$wims_class/vote/.votes |
||
97 | !read wimshome/log/classes/$wims_class/Exindex |
||
98 | !read ./adm/du $wims_home/log/classes/$wims_class |
||
12500 | bpr | 99 | !if $class_type iswordof 2 4 and $wims_superclass_quota!=$empty |
12499 | bpr | 100 | quota_free=$[$wims_superclass_quota-$du] |
101 | !else |
||
102 | quota_free=$[$wims_class_quota-$du] |
||
3245 | guerimand | 103 | !endif |
33 | reyssat | 104 | !endif |
105 | |||
106 | !if $wims_user!=$empty |
||
12499 | bpr | 107 | !if $wims_class_refcolor!=$empty |
108 | wims_ref_bgcolor=$wims_class_refcolor |
||
33 | reyssat | 109 | !endif |
12499 | bpr | 110 | !read ./var.msgcnt |
111 | !default class_type=0 |
||
112 | !if $class_type=2 |
||
113 | !exchange wims_institutionname, wims_classname |
||
33 | reyssat | 114 | !endif |
12499 | bpr | 115 | !if $class_type=1 |
116 | parentcheck=!defof user_class in wimshome/log/classes/$wims_class/.users/$wims_user |
||
12982 | bpr | 117 | !if $parentcheck!=$empty and $wims_superclass/ notin $parentcheck |
12499 | bpr | 118 | class_parent=$wims_superclass/$parentcheck |
119 | !endif |
||
120 | !endif |
||
121 | !default wims_realuser=$wims_user |
||
122 | !read adm/class/userdef logclasses,$wims_class,$wims_realuser |
||
123 | supervisable=!defof user_supervisable in $userdef |
||
124 | !if $class_type>=2 |
||
125 | !if $class_type=4 |
||
126 | subclasses=!record 0 of wimshome/log/classes/$wims_class/classes |
||
127 | subclasses=!column 1 of $subclasses |
||
128 | subclasses=!makelist $wims_class/x for x in $subclasses |
||
129 | subclasscnt=!itemcnt $subclasses |
||
130 | !if $wims_user=supervisor |
||
12975 | bpr | 131 | subclasscnt=0 |
12499 | bpr | 132 | !endif |
133 | subclass1=$wims_participate |
||
134 | !endif |
||
13064 | bpr | 135 | !if $class_type isin 34 |
136 | !if $class_type=3 |
||
137 | subclasses=!record 0 of wimshome/log/classes/$wims_class/courses |
||
138 | !else |
||
139 | subclasses=!record 0 of wimshome/log/classes/$wims_class/classes |
||
140 | !endif |
||
12975 | bpr | 141 | split=!translate internal / to , in $wims_class |
142 | subclasset=!record 0 of wimshome/log/classes/$(split[1])/$(split[2])/icourses |
||
143 | subclasses=!append line $subclasset to $subclasses |
||
144 | subclasset=!record 0 of wimshome/log/classes/$(split[1])/icourses |
||
145 | subclasses=!append line $subclasset to $subclasses |
||
146 | subclasses=!column 1 of $subclasses |
||
147 | subclasses=!listuniq $subclasses |
||
148 | subclasses=!makelist $wims_superclass/x for x in $subclasses |
||
149 | subclasscnt=!itemcnt $subclasses |
||
150 | !if $wims_user=supervisor |
||
151 | subclasscnt=0 |
||
152 | !endif |
||
153 | subclass1=$class_ocourses |
||
154 | subclass1=!makelist $wims_superclass/x for x in $subclass1 |
||
155 | upart=!listcomplement $wims_class in $wims_participate |
||
156 | upart2=!defof user_courses in wimshome/log/classes/$wims_class/.users/$wims_user |
||
157 | !if $upart2!=$empty |
||
158 | upart2=!makelist $wims_superclass/x for x in $upart2 |
||
159 | upart=!append item $upart2 to $upart |
||
160 | !endif |
||
161 | subclass1=!listunion $subclass1 and $upart |
||
12499 | bpr | 162 | !endif |
163 | !if $class_type=2 |
||
164 | subclasses=!sh cut -d, -f1 $wims_home/log/classes/$wims_class/.subclasses |
||
165 | subclasses=!replace internal : by $ in $subclasses |
||
166 | subclasses=!words2items $subclasses |
||
167 | subcnt=!recordcnt wimshome/log/classes/$wims_class/.subclasses |
||
168 | subclasscnt=!itemcnt $subclasses |
||
169 | subclass1=$wims_participate |
||
170 | !endif |
||
171 | subclass1=!sort items $subclass1 |
||
172 | subclass2=!listcomplement $subclass1 in $subclasses |
||
173 | !if $class_type iswordof 4 2 |
||
12975 | bpr | 174 | subclass3=$wims_supervise |
12499 | bpr | 175 | !endif |
176 | subclasscnt1=!itemcnt $subclass1 |
||
177 | subclasscnt2=!itemcnt $subclass2 |
||
178 | subclasscnt3=!itemcnt $subclass3 |
||
33 | reyssat | 179 | !endif |
180 | !endif |
||
11979 | guerimand | 181 | !readproc ./var.cdt |
10158 | bpr | 182 | !read ./otherclass.proc |
10944 | bpr | 183 | !if $wims_sheet=$empty |
12499 | bpr | 184 | !!! should be on the complete home page |
10444 | obado | 185 | !!distribute items no,no into wims_ariane_self,wims_ariane_home |
186 | !set wims_ariane_self=no |
||
10203 | bpr | 187 | !endif |
11714 | bpr | 188 | |
10290 | bpr | 189 | !if $(class_actcolor)!=$empty |
12499 | bpr | 190 | !read adm/class/seqcolors |
10290 | bpr | 191 | !endif |