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