Subversion Repositories wimsdev

Rev

Rev 12115 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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