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