Rev 20 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 20 | Rev 37 | ||
---|---|---|---|
1 | # Make index of subclasses for the gateway. |
1 | # Make index of subclasses for the gateway. |
2 | # No calling parameter. |
2 | # No calling parameter. |
3 | !nocache |
3 | !nocache |
4 | !if $wims_superclass=$empty |
4 | !if $wims_superclass=$empty |
5 | !exit |
5 | !exit |
6 | !endif |
6 | !endif |
7 | 7 | ||
8 | D_=wimshome/log/classes/$wims_superclass |
8 | D_=wimshome/log/classes/$wims_superclass |
9 | E_=$wims_home/log/classes/$wims_superclass |
9 | E_=$wims_home/log/classes/$wims_superclass |
10 | 10 | ||
11 | levels=!sh cd $E_; find . -maxdepth 1 -mindepth 1 -type d -name '[0-9]*' | sed 's!^\./!!' |
11 | levels=!sh cd $E_; find . -maxdepth 1 -mindepth 1 -type d -name '[0-9]*' | sed 's!^\./!!' |
12 | classes=!sh cd $E_; find . -maxdepth 2 -mindepth 2 -type d -name '1[0-9][0-9]' | sed 's!^\./!!' |
12 | classes=!sh cd $E_; find . -maxdepth 2 -mindepth 2 -type d -name '1[0-9][0-9]' | sed 's!^\./!!' |
13 | progs=!sh cd $E_; find . -maxdepth 2 -mindepth 2 -type d -name '2[0-9][0-9]' | sed 's!^\./!!' |
13 | progs=!sh cd $E_; find . -maxdepth 2 -mindepth 2 -type d -name '2[0-9][0-9]' | sed 's!^\./!!' |
14 | courses=!sh cd $E_; find . -maxdepth 3 -mindepth 3 -type d -name '2[0-9][0-9]*' | sed 's!^\./!!' |
14 | courses=!sh cd $E_; find . -maxdepth 3 -mindepth 3 -type d -name '2[0-9][0-9]*' | sed 's!^\./!!' |
15 | icourses=!sh cd $E_; find . -maxdepth 3 -mindepth 3 -type d -name '3[0-9][0-9]' | sed 's!^\./!!' |
15 | icourses=!sh cd $E_; find . -maxdepth 3 -mindepth 3 -type d -name '3[0-9][0-9]' | sed 's!^\./!!' |
16 | !for n_ in levels,classes,progs,courses,icourses |
16 | !for n_ in levels,classes,progs,courses,icourses |
17 | $n_=!words2items $($n_) |
17 | $n_=!words2items $($n_) |
18 | !next n_ |
18 | !next n_ |
19 | 19 | ||
20 | cp_=!append item $classes to $progs |
20 | cp_=!append item $classes to $progs |
21 | cp_=!translate internal / to _ in $cp_ |
21 | cp_=!translate internal / to _ in $cp_ |
22 | idata= |
22 | idata= |
23 | !for c in $cp_ |
23 | !for c in $cp_ |
24 | rdata_$cp_= |
24 | rdata_$cp_= |
25 | idata_$cp_= |
25 | idata_$cp_= |
26 | !next c |
26 | !next c |
27 | 27 | ||
28 | !for c in $levels |
28 | !for c in $levels |
29 | cdata_$c= |
29 | cdata_$c= |
30 | pdata_$c= |
30 | pdata_$c= |
31 | idata_$c= |
31 | idata_$c= |
32 | !next c |
32 | !next c |
33 | 33 | ||
34 | !for c in $courses |
34 | !for c in $courses |
35 | c_=!translate internal / to , in $c |
35 | c_=!translate internal / to , in $c |
36 | cc=!char 1 to 3 of $(c_[3]) |
36 | cc=!char 1 to 3 of $(c_[3]) |
37 | l_=$(c_[1]) |
37 | l_=$(c_[1]) |
38 | C_=$(c_[1])_$(c_[2]) |
38 | C_=$(c_[1])_$(c_[2]) |
39 | p_=$(c_[1])_$cc |
39 | p_=$(c_[1])_$cc |
40 | t_=!defof class_Supervisor\ |
40 | t_=!defof class_Supervisor\ |
41 | class_supervisor\ |
41 | class_supervisor\ |
42 | class_description in $D_/$c/.def |
42 | class_description in $D_/$c/.def |
43 | !distribute lines $t_ into s_,n_,t_ |
43 | !distribute lines $t_ into s_,n_,t_ |
44 | L_=$c,$s_,$t_,$n_ |
44 | L_=$c,$s_,$t_,$n_ |
45 | rdata_$l_=!append line $L_ to $(rdata_$l_) |
45 | rdata_$l_=!append line $L_ to $(rdata_$l_) |
46 | rdata_$C_=!append line $L_ to $(rdata_$C_) |
46 | rdata_$C_=!append line $L_ to $(rdata_$C_) |
47 | rdata_$p_=!append line $L_ to $(rdata_$p_) |
47 | rdata_$p_=!append line $L_ to $(rdata_$p_) |
48 | !next c |
48 | !next c |
49 | 49 | ||
50 | !for c in $icourses |
50 | !for c in $icourses |
51 | c_=!translate internal / to , in $c |
51 | c_=!translate internal / to , in $c |
52 | l_=$(c_[1]) |
52 | l_=$(c_[1]) |
53 | p_=$(c_[1])_$(c_[2]) |
53 | p_=$(c_[1])_$(c_[2]) |
54 | t_=!defof class_Supervisor\ |
54 | t_=!defof class_Supervisor\ |
55 | class_supervisor\ |
55 | class_supervisor\ |
56 | class_description in $D_/$c/.def |
56 | class_description in $D_/$c/.def |
57 | !distribute lines $t_ into s_,n_,t_ |
57 | !distribute lines $t_ into s_,n_,t_ |
58 | L_=$c,$s_,$t_,$n_ |
58 | L_=$c,$s_,$t_,$n_ |
59 | idata_$l_=!append line $L_ to $(idata_$l_) |
59 | idata_$l_=!append line $L_ to $(idata_$l_) |
60 | idata_$p_=!append line $L_ to $(idata_$p_) |
60 | idata_$p_=!append line $L_ to $(idata_$p_) |
61 | vistest=!defof class_visibility in $D_/$c/.def |
61 | vistest=!defof class_visibility in $D_/$c/.def |
62 | !ifval $vistest=2 |
62 | !ifval $vistest=2 |
63 | idata=!append line $L_ to $idata |
63 | idata=!append line $L_ to $idata |
64 | !endif |
64 | !endif |
65 | !next c |
65 | !next c |
66 | 66 | ||
67 | cdata= |
67 | cdata= |
68 | !for c in $classes |
68 | !for c in $classes |
69 | c_=!translate internal / to , in $c |
69 | c_=!translate internal / to , in $c |
70 | c_=!item 1 of $c_ |
70 | c_=!item 1 of $c_ |
71 | t_=!defof class_Supervisor\ |
71 | t_=!defof class_Supervisor\ |
72 | class_supervisor\ |
72 | class_supervisor\ |
73 | class_description in $D_/$c/.def |
73 | class_description in $D_/$c/.def |
74 | !distribute lines $t_ into s_,n_,t_ |
74 | !distribute lines $t_ into s_,n_,t_ |
75 | cdata=!append line $c,$s_,$t_,$n_ to $cdata |
75 | cdata=!append line $c,$s_,$t_,$n_ to $cdata |
76 | cdata_$c_=!append line $c,$s_,$t_,$n_ to $(cdata_$c_) |
76 | cdata_$c_=!append line $c,$s_,$t_,$n_ to $(cdata_$c_) |
77 | c_=!translate internal / to _ in $c |
77 | c_=!translate internal / to _ in $c |
78 | !writefile $D_/$c/courses $(rdata_$c_) |
78 | !writefile $D_/$c/courses $(rdata_$c_) |
79 | !next c |
79 | !next c |
80 | 80 | ||
81 | pdata= |
81 | pdata= |
82 | !for c in $progs |
82 | !for c in $progs |
83 | c_=!translate internal / to , in $c |
83 | c_=!translate internal / to , in $c |
84 | c_=!item 1 of $c_ |
84 | c_=!item 1 of $c_ |
85 | t_=!defof class_Supervisor\ |
85 | t_=!defof class_Supervisor\ |
86 | class_supervisor\ |
86 | class_supervisor\ |
87 | class_description in $D_/$c/.def |
87 | class_description in $D_/$c/.def |
88 | !distribute lines $t_ into s_,n_,t_ |
88 | !distribute lines $t_ into s_,n_,t_ |
89 | pdata=!append line $c,$s_,$t_,$n_ to $pdata |
89 | pdata=!append line $c,$s_,$t_,$n_ to $pdata |
90 | pdata_$c_=!append line $c,$s_,$t_,$n_ to $(pdata_$c_) |
90 | pdata_$c_=!append line $c,$s_,$t_,$n_ to $(pdata_$c_) |
91 | c_=!translate internal / to _ in $c |
91 | c_=!translate internal / to _ in $c |
92 | !writefile $D_/$c/courses $(rdata_$c_) |
92 | !writefile $D_/$c/courses $(rdata_$c_) |
93 | !writefile $D_/$c/icourses $(idata_$c_) |
93 | !writefile $D_/$c/icourses $(idata_$c_) |
94 | !next c |
94 | !next c |
95 | 95 | ||
96 | ldata= |
96 | ldata= |
97 | !for c in $levels |
97 | !for c in $levels |
98 | t_=!defof class_Supervisor\ |
98 | t_=!defof class_Supervisor\ |
99 | class_supervisor\ |
99 | class_supervisor\ |
100 | class_description in $D_/$c/.def |
100 | class_description in $D_/$c/.def |
101 | !distribute lines $t_ into s_,n_,t_ |
101 | !distribute lines $t_ into s_,n_,t_ |
102 | ldata=!append line $c,$s_,$t_,$n_ to $ldata |
102 | ldata=!append line $c,$s_,$t_,$n_ to $ldata |
103 | !writefile $D_/$c/classes $(cdata_$c) |
103 | !writefile $D_/$c/classes $(cdata_$c) |
104 | !writefile $D_/$c/programs $(pdata_$c) |
104 | !writefile $D_/$c/programs $(pdata_$c) |
105 | !writefile $D_/$c/courses $(rdata_$c) |
105 | !writefile $D_/$c/courses $(rdata_$c) |
106 | !writefile $D_/$c/icourses $(idata_$c) |
106 | !writefile $D_/$c/icourses $(idata_$c) |
107 | !next c |
107 | !next c |
108 | 108 | ||
109 | !writefile $D_/levels $ldata |
109 | !writefile $D_/levels $ldata |
110 | !writefile $D_/classes $cdata |
110 | !writefile $D_/classes $cdata |
111 | !writefile $D_/programs $pdata |
111 | !writefile $D_/programs $pdata |
112 | !writefile $D_/icourses $idata |
112 | !writefile $D_/icourses $idata |
113 | 113 | ||
114 | 114 |