Rev 7684 | Rev 12411 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
23 | reyssat | 1 | !bound job2 within first,def,addshare,stopshare,sharelist,\ |
2 | import,import2 default first |
||
3 | |||
956 | guerimand | 4 | !if $keyword=* |
5 | !reset keyword |
||
6 | !endif |
||
2718 | bpr | 7 | !reset clist1 clist2 |
23 | reyssat | 8 | !if $wims_superclass=$empty |
9 | clfile=wimshome/log/classes/.index |
||
2718 | bpr | 10 | cllimit=60 |
23 | reyssat | 11 | !else |
12 | cllimit=300 |
||
13 | supertype=!defof class_type in wimshome/log/classes/$wims_superclass/.def |
||
14 | !if $supertype=4 and / isin $wims_class |
||
15 | cterms=!translate / to , in $wims_class |
||
4758 | bpr | 16 | ctypename=!defof class_typename in wimshome/log/classes/$wims_class/.def |
23 | reyssat | 17 | clevel=!itemcnt $cterms |
4758 | bpr | 18 | !if yes isin $excls |
19 | clfile=wimshome/log/classes/.index |
||
20 | !else |
||
21 | !if $clevel>=3 |
||
22 | cls=!record 0 of wimshome/log/classes/$class_parent/classes |
||
23 | prog=!record 0 of wimshome/log/classes/$class_parent/programs |
||
24 | !if $clevel=3 |
||
25 | crs=!record 0 of wimshome/log/classes/$wims_class/courses |
||
26 | hastest=!defof class_defined in wimshome/log/classes/$wims_class/0/.def |
||
27 | !if $hastest issametext yes |
||
28 | testzone=$(cterms[2])/$(cterms[3])/0 |
||
29 | !endif |
||
30 | !else |
||
31 | crs=!record 0 of wimshome/log/classes/$class_parent/courses |
||
23 | reyssat | 32 | !endif |
4758 | bpr | 33 | clist1=!column 1 of $testzone\ |
23 | reyssat | 34 | $cls\ |
35 | $prog\ |
||
36 | $crs |
||
4758 | bpr | 37 | clist1=!nonempty items $clist1 |
38 | clist1=!makelist $wims_superclass/xx for xx in $clist1 |
||
39 | clist1=!listcomplement $wims_class in $clist1 |
||
40 | !if $clevel>3 |
||
41 | clist1=!append item $clist1 to $class_parent |
||
42 | !endif |
||
43 | clfile=nonexistent |
||
23 | reyssat | 44 | !endif |
45 | !endif |
||
46 | !else |
||
47 | scl=!item 1 of $wims_superclass |
||
956 | guerimand | 48 | !if yes isin $excls |
49 | clfile=wimshome/log/classes/.index |
||
50 | !else |
||
51 | clfile=wimshome/log/classes/$scl/.subclasses |
||
52 | !endif |
||
23 | reyssat | 53 | !endif |
54 | !endif |
||
55 | classcnt=!recordcnt $clfile |
||
56 | clgot=0 |
||
57 | keyword=!trim $keyword |
||
58 | kw=!items2words $keyword |
||
59 | kw=!trim $kw |
||
60 | kw=!singlespace $kw |
||
61 | kw=!deaccent $kw |
||
62 | kw=!tolower $kw |
||
956 | guerimand | 63 | !if $keyword!=$empty |
64 | !reset excls |
||
65 | !endif |
||
66 | !if $classcnt>1 and ($clist1$clist2=$empty or $keyword != $save_keyword or yes isin $excls) |
||
23 | reyssat | 67 | !reset clist1 clist2 |
68 | save_keyword=$keyword |
||
69 | !for c=1 to $classcnt |
||
70 | l_=!record $c of $clfile |
||
71 | n_=!item 1 of $l_ |
||
956 | guerimand | 72 | !if yes isin $excls |
73 | !if $n_<10000 |
||
74 | ln=!defof class_lang in wimshome/log/classes/$n_/.def |
||
75 | !if $ln=$class_lang |
||
23 | reyssat | 76 | clist1=!append item $n_ to $clist1 |
956 | guerimand | 77 | !else |
7684 | bpr | 78 | clist2=!append item $n_ to $clist2 |
23 | reyssat | 79 | !endif |
7684 | bpr | 80 | !endif |
956 | guerimand | 81 | !else |
82 | !if $kw != $empty |
||
83 | L_=!singlespace $l_ |
||
84 | L_=!deaccent $L_ |
||
85 | L_=!tolower $L_ |
||
86 | !endif |
||
87 | !if $kw isin $L_ or $kw=$empty |
||
88 | ln=!defof class_lang in wimshome/log/classes/$n_/.def |
||
89 | !if $ln=$class_lang |
||
90 | !if $n_!=$wims_class |
||
91 | clist1=!append item $n_ to $clist1 |
||
92 | !advance clgot |
||
93 | !endif |
||
94 | !else |
||
95 | !if $ln!=$empty |
||
96 | clist2=!append item $n_ to $clist2 |
||
97 | !advance clgot |
||
98 | !endif |
||
23 | reyssat | 99 | !endif |
956 | guerimand | 100 | !if $clgot > $cllimit |
101 | toomany=yes |
||
102 | !break |
||
103 | !endif |
||
23 | reyssat | 104 | !endif |
105 | !endif |
||
106 | !next c |
||
107 | !endif |
||
108 | classcnt1=!itemcnt $clist1 |
||
109 | classcnt2=!itemcnt $clist2 |
||
110 | clist=!append item $clist2 to $clist1 |
||
111 | !readdef wimshome/log/classes/$wims_class/neighbors |
||
112 | !reset sharable_all,sharing_all,sharable,sharing |
||
113 | !for rec in $sharelist |
||
114 | sharing_$rec=!listintersect $(sharing_$rec) and $clist |
||
115 | sharable_$rec=!listintersect $(sharable_$rec) and $clist |
||
116 | !if $(sharing_$rec)!=$empty |
||
117 | sharing_all=!append item $(sharing_$rec) to $sharing_all |
||
118 | sharing=!append item $rec to $sharing |
||
119 | sharable_$rec= |
||
120 | !else |
||
121 | sharable_$rec=!listintersect $(sharable_$rec) and $n_sup |
||
122 | !if $(sharable_$rec)!=$empty |
||
123 | sharable_all=!append item $(sharable_$rec) to $sharable_all |
||
124 | sharable=!append item $rec to $sharable |
||
125 | !endif |
||
126 | !endif |
||
127 | !next rec |
||
128 | sharable_all=!listuniq $sharable_all |
||
129 | sharing_all=!listuniq $sharing_all |
||
130 | |||
131 | !if $job2 notwordof first sharelist |
||
132 | !if $nei=$empty or $nei notitemof $clist1,$clist2 |
||
133 | job2=first |
||
134 | !exit |
||
135 | !endif |
||
136 | D_=!defof n_sup\ |
||
137 | n_part\ |
||
138 | sharable_exo\ |
||
139 | sharable_sheet\ |
||
140 | sharable_exam\ |
||
141 | sharable_doc\ |
||
142 | sharable_user\ |
||
143 | sharable_forum\ |
||
144 | sharable_sup\ |
||
145 | sharable_motd\ |
||
146 | sharable_vote\ |
||
147 | sharable_cdt\ |
||
1322 | guerimand | 148 | sharable_livret\ |
1407 | bpr | 149 | sharable_seq\ |
12115 | guerimand | 150 | sharable_userphoto\ |
23 | reyssat | 151 | sharing_exo\ |
152 | sharing_sheet\ |
||
153 | sharing_exam\ |
||
154 | sharing_doc\ |
||
155 | sharing_user\ |
||
156 | sharing_forum\ |
||
157 | sharing_sup\ |
||
158 | sharing_motd\ |
||
159 | sharing_vote\ |
||
160 | sharing_cdt\ |
||
1322 | guerimand | 161 | sharing_livret\ |
1407 | bpr | 162 | sharing_seq\ |
12115 | guerimand | 163 | sharing_userphoto\ |
23 | reyssat | 164 | sharable_all\ |
165 | sharing_all in wimshome/log/classes/$nei/neighbors |
||
166 | !distribute lines $D_ into nei_sup,nei_part,\ |
||
167 | nsharable_exo,nsharable_sheet,nsharable_exam,nsharable_doc,\ |
||
1407 | bpr | 168 | nsharable_user,nsharable_forum,nsharable_sup,nsharable_motd,nsharable_vote,\ |
12115 | guerimand | 169 | nsharable_cdt,nsharable_livret,nsharable_seq,nsharable_userphoto,\ |
23 | reyssat | 170 | nsharing_exo,nsharing_sheet,nsharing_exam,nsharing_doc,\ |
1407 | bpr | 171 | nsharing_user,nsharing_forum,nsharing_sup,nsharing_motd,nsharing_vote,\ |
12115 | guerimand | 172 | nsharing_cdt,nsharing_livret,nsharing_seq,nsharing_userphoto,\ |
23 | reyssat | 173 | nsharable_all,nsharing_all |
174 | !reset nsharable,nsharing |
||
175 | !for rec in $sharelist |
||
176 | !if $(nsharing_$rec)!=$empty |
||
177 | !if $wims_class isitemof $(nsharing_$rec) |
||
178 | nsharing=!append item $rec to $nsharing |
||
179 | !endif |
||
180 | !else |
||
181 | nsharable_$rec=!listintersect $(nsharable_$rec) and $nei_sup |
||
182 | !if $wims_class isitemof $(nsharable_$rec) and\ |
||
183 | $wims_class isitemof $nei_sup |
||
184 | nsharable=!append item $rec to $nsharable |
||
185 | !endif |
||
186 | !endif |
||
187 | !next rec |
||
188 | nsharable=!nospace $nsharable |
||
189 | nsharing=!nospace $nsharing |
||
190 | D_=!defof class_institution\ |
||
191 | class_description\ |
||
192 | class_supervisor\ |
||
193 | class_email\ |
||
194 | class_lang in wimshome/log/classes/$nei/.def |
||
195 | !distribute lines $D_ into nei_institution, nei_description,nei_supervisor,\ |
||
196 | nei_email,nei_lang |
||
197 | !read neighbor/$job2.proc |
||
198 | !endif |