Rev 12115 | Rev 12895 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 12115 | Rev 12555 | ||
---|---|---|---|
Line 20... | Line 20... | ||
20 | as_t_cdt=cdt |
20 | as_t_cdt=cdt |
21 | as_t_livret=livret |
21 | as_t_livret=livret |
22 | as_t_userphoto=photoboard |
22 | as_t_userphoto=photoboard |
23 | as_list=exo,sheet,exam,vote,doc,forum,user,motd,sup,cdt,livret,seq,userphoto |
23 | as_list=exo,sheet,exam,vote,doc,forum,user,motd,sup,cdt,livret,seq,userphoto |
24 | !if sharing notwordof $wims_prefix |
24 | !if sharing notwordof $wims_prefix |
25 | wims_prefix=$wims_prefix n sharing sharable |
25 | wims_prefix=$wims_prefix n sharing sharable |
26 | !endif |
26 | !endif |
27 | 27 | ||
28 | !if all isitemof $as_l |
28 | !if all isitemof $as_l |
29 | as_l=$as_list |
29 | as_l=$as_list |
30 | !else |
30 | !else |
31 | !if exo isitemof $as_l |
31 | !if exo isitemof $as_l |
32 | as_l=!listunion $as_l and sheet |
32 | as_l=!listunion $as_l and sheet |
33 | !endif |
33 | !endif |
34 | !if sheet iswordof $as_l |
34 | !if sheet iswordof $as_l |
35 | as_l=!listunion $as_l and exam |
35 | as_l=!listunion $as_l and exam |
36 | !endif |
36 | !endif |
37 | !endif |
37 | !endif |
38 | 38 | ||
39 | 1_=!translate internal / to , in $as_1 |
39 | 1_=!translate internal / to , in $as_1 |
40 | 2_=!translate internal / to , in $as_2 |
40 | 2_=!translate internal / to , in $as_2 |
41 | 1=!itemcnt $1_ |
41 | 1=!itemcnt $1_ |
42 | 2=!itemcnt $2_ |
42 | 2=!itemcnt $2_ |
43 | 3=$[min($1,$2)] |
43 | 3=$[min($1,$2)] |
44 | 44 | ||
45 | !for i=1 to $3+1 |
45 | !for i=1 to $3+1 |
46 | !if $(1_[$i]) != $(2_[$i]) |
46 | !if $(1_[$i]) != $(2_[$i]) |
47 | !break |
47 | !break |
48 | !endif |
48 | !endif |
49 | !next i |
49 | !next i |
50 | 50 | ||
51 | 1_=!item $i to -1 of $1_ |
51 | 1_=!item $i to -1 of $1_ |
52 | !if $i<=$2 |
52 | !if $i<=$2 |
53 | 4_=!makelist .. for x=$i to $2 |
53 | 4_=!makelist .. for x=$i to $2 |
54 | 1_=$4_,$1_ |
54 | 1_=$4_,$1_ |
55 | !endif |
55 | !endif |
56 | 1_=!nonempty items $1_ |
56 | 1_=!nonempty items $1_ |
57 | 1_=!nospace $1_ |
57 | 1_=!nospace $1_ |
58 | 1_=!translate internal , to / in $1_ |
58 | 1_=!translate internal , to / in $1_ |
59 | 59 | ||
60 | !for t in $as_list |
60 | !for t in $as_list |
61 | !reset sharing_$t |
61 | !reset sharing_$t |
62 | !next t |
62 | !next t |
63 | !readdef wimshome/log/classes/$as_2/neighbors |
63 | !readdef wimshome/log/classes/$as_2/neighbors |
64 | as_l1= |
64 | as_l1= |
65 | !for t in $as_l |
65 | !for t in $as_l |
66 | !if $(sharing_$t) = $as_1 |
66 | !if $(sharing_$t) = $as_1 |
67 | as_l1=!append item $t to $as_l1 |
67 | as_l1=!append item $t to $as_l1 |
68 | !endif |
68 | !endif |
69 | !next t |
69 | !next t |
70 | as_l=$as_l1 |
70 | as_l=$as_l1 |
71 | !if $as_l=$empty |
71 | !if $as_l=$empty |
72 | error=stopshare_notsharing |
72 | error=stopshare_notsharing |
73 | !exit |
73 | !exit |
74 | !endif |
74 | !endif |
75 | 75 | ||
76 | L_= |
76 | L_= |
77 | !for t in $as_list |
77 | !for t in $as_list |
78 | !if $t isitemof $as_l |
78 | !if $t isitemof $as_l |
79 | L_=$L_ $(as_t_$t) |
79 | L_=$L_ $(as_t_$t) |
80 | !endif |
80 | !endif |
81 | !next t |
81 | !next t |
82 | !if $L_=$empty |
82 | !if $L_=$empty |
83 | !exit |
83 | !exit |
84 | !endif |
84 | !endif |
85 | 85 | ||
86 | !goto skip_sharable |
86 | !goto skip_sharable |
87 | !for t in $as_list |
87 | !for t in $as_list |
88 | !reset sharable_$t |
88 | !reset sharable_$t |
89 | !next t |
89 | !next t |
90 | !readdef wimshome/log/classes/$as_1/neighbors |
90 | !readdef wimshome/log/classes/$as_1/neighbors |
91 | as_= |
91 | as_= |
92 | !for t in $as_l |
92 | !for t in $as_l |
93 | sharable_$t=!listcomplement $as_2 in $(sharable_$t) |
93 | sharable_$t=!listcomplement $as_2 in $(sharable_$t) |
94 | as_=$as_\ |
94 | as_=$as_\ |
95 | sharable_$t=$(sharable_$t) |
95 | sharable_$t=$(sharable_$t) |
96 | !next t |
96 | !next t |
97 | as_all= |
97 | as_all= |
98 | !for t in $as_list |
98 | !for t in $as_list |
99 | as_all=$as_all,$(sharing_$t) |
99 | as_all=$as_all,$(sharing_$t) |
100 | !next t |
100 | !next t |
101 | !if $as_2 notitemof $as_all |
101 | !if $as_2 notitemof $as_all |
102 | sharable_all=!listcomplement $as_2 in $sharable_all |
102 | sharable_all=!listcomplement $as_2 in $sharable_all |
103 | as_=$as_\ |
103 | as_=$as_\ |
104 | sharable_all=$sharable_all |
104 | sharable_all=$sharable_all |
105 | !endif |
105 | !endif |
106 | !setdef $as_ in wimshome/log/classes/$as_1/neighbors |
106 | !setdef $as_ in wimshome/log/classes/$as_1/neighbors |
107 | :skip_sharable |
107 | :skip_sharable |
108 | 108 | ||
109 | !for t in $as_list |
109 | !for t in $as_list |
110 | !reset sharing_$t |
110 | !reset sharing_$t |
111 | !next t |
111 | !next t |
112 | !readdef wimshome/log/classes/$as_2/neighbors |
112 | !readdef wimshome/log/classes/$as_2/neighbors |
113 | as_= |
113 | as_= |
114 | !for t in $as_l |
114 | !for t in $as_l |
115 | sharing_$t= |
115 | sharing_$t= |
116 | as_=$as_\ |
116 | as_=$as_\ |
117 | sharing_$t= |
117 | sharing_$t= |
118 | !next t |
118 | !next t |
119 | as_all= |
119 | as_all= |
120 | !for t in $as_list |
120 | !for t in $as_list |
121 | as_all=$as_all,$(sharing_$t) |
121 | as_all=$as_all,$(sharing_$t) |
122 | !next t |
122 | !next t |
123 | !if $as_1 notitemof $as_all |
123 | !if $as_1 notitemof $as_all |
124 | sharing_all=!listcomplement $as_1 in $sharing_all |
124 | sharing_all=!listcomplement $as_1 in $sharing_all |
125 | as_=$as_\ |
125 | as_=$as_\ |
126 | sharing_all=$sharing_all |
126 | sharing_all=$sharing_all |
127 | !endif |
127 | !endif |
128 | !setdef $as_ in wimshome/log/classes/$as_2/neighbors |
128 | !setdef $as_ in wimshome/log/classes/$as_2/neighbors |
129 | 129 | ||
130 | !sh cd $wims_home/log/classes/$as_2\ |
130 | !sh cd $wims_home/log/classes/$as_2\ |
131 | rm -Rf $L_\ |
131 | rm -Rf $L_\ |
132 | for f in $L_; do\ |
132 | for f in $L_; do\ |
133 | cp -R $1_/$$f . 2>/dev/null\ |
133 | cp -R $1_/$$f . 2>/dev/null\ |
134 | done |
134 | done |
135 | - |