Rev 2217 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2217 | Rev 12617 | ||
---|---|---|---|
Line 4... | Line 4... | ||
4 | !if $cancel!=$empty |
4 | !if $cancel!=$empty |
5 | :back |
5 | :back |
6 | !reset title,sup,passs,pass |
6 | !reset title,sup,passs,pass |
7 | job=$parent |
7 | job=$parent |
8 | !changeto jobs/$job.proc |
8 | !changeto jobs/$job.proc |
9 | !endif |
9 | !endif |
10 | 10 | ||
11 | !if $confirm!=$empty and $courseclass!=$empty and $courseprog!=$empty |
11 | !if $confirm!=$empty and $courseclass!=$empty and $courseprog!=$empty |
12 | !if .. isin $courseclass$courseprog |
12 | !if .. isin $courseclass$courseprog |
13 | error=illegal |
13 | error=illegal |
14 | !exit |
14 | !exit |
15 | !endif |
15 | !endif |
16 | courseclass=!replace $wims_superclass/ by in $courseclass |
16 | courseclass=!replace $wims_superclass/ by in $courseclass |
17 | courseprog=!replace $wims_superclass/ by in $courseprog |
17 | courseprog=!replace $wims_superclass/ by in $courseprog |
18 | !read adm/gateway/addcourse $courseprog,$courseclass |
18 | !read adm/gateway/addcourse $courseprog,$courseclass |
19 | !if $error!=$empty |
19 | !if $error!=$empty |
20 | !goto just |
20 | !goto just |
21 | !endif |
21 | !endif |
22 | course=$ac_class/$ac_course |
22 | course=$ac_class/$ac_course |
23 | !read adm/gateway/mkindex |
23 | !read adm/gateway/mkindex |
24 | !reset confirm |
24 | !reset confirm |
25 | job=course |
25 | job=course |
26 | !changeto jobs/$job.proc |
26 | !changeto jobs/$job.proc |
27 | !endif |
27 | !endif |
28 | 28 | ||
29 | :just |
29 | :just |
30 | clist= |
30 | clist= |
31 | class_password= |
31 | class_password= |
32 | lvl=!translate internal / to , in $($parent) |
32 | lvl=!translate internal / to , in $($parent) |
33 | lvl=$(lvl[1]) |
33 | lvl=$(lvl[1]) |
34 | 34 | ||
35 | !if $parent=class |
35 | !if $parent=class |
36 | ll=!record 0 of $classdir1/$lvl/programs |
36 | ll=!record 0 of $classdir1/$lvl/programs |
37 | ll=!column 1 of $ll |
37 | ll=!column 1 of $ll |
38 | ll=!nonempty items $ll |
38 | ll=!nonempty items $ll |
39 | !if $ll=$empty |
39 | !if $ll=$empty |
40 | !goto end |
40 | !goto end |
41 | !endif |
41 | !endif |
42 | ll=!makelist $wims_superclass/xx for xx in $ll |
42 | ll=!makelist $wims_superclass/xx for xx in $ll |
43 | cc=!record 0 of $classdir1/$class/courses |
43 | cc=!record 0 of $classdir1/$class/courses |
44 | cc=!column 1 of $cc |
44 | cc=!column 1 of $cc |
45 | cc=!nonempty items $cc |
45 | cc=!nonempty items $cc |
46 | oc=!defof class_ocourses in $classdir1/$class/.def |
46 | oc=!defof class_ocourses in $classdir1/$class/.def |
47 | c_= |
47 | c_= |
48 | d_= |
48 | d_= |
49 | !for c in $cc |
49 | !for c in $cc |
50 | e_=!defof sharing_exo in $classdir1/$c/neighbors |
50 | e_=!defof sharing_exo in $classdir1/$c/neighbors |
51 | !if $e_!=$empty |
51 | !if $e_!=$empty |
52 | !if $c isitemof $oc |
52 | !if $c isitemof $oc |
53 | d_=!append item $e_ to $d_ |
53 | d_=!append item $e_ to $d_ |
54 | !else |
54 | !else |
55 | c_=!append item $e_ to $c_ |
55 | c_=!append item $e_ to $c_ |
56 | !endif |
56 | !endif |
57 | !endif |
57 | !endif |
58 | !next c |
58 | !next c |
59 | clist=!listcomplement $d_ in $ll |
59 | clist=!listcomplement $d_ in $ll |
60 | clist2=$c_ |
60 | clist2=$c_ |
61 | !endif |
61 | !endif |
62 | 62 | ||
63 | !if $parent=prog |
63 | !if $parent=prog |
64 | ll=!record 0 of $classdir1/$lvl/classes |
64 | ll=!record 0 of $classdir1/$lvl/classes |
65 | ll=!column 1 of $ll |
65 | ll=!column 1 of $ll |
66 | ll=!nonempty items $ll |
66 | ll=!nonempty items $ll |
67 | !if $ll=$empty |
67 | !if $ll=$empty |
68 | !goto end |
68 | !goto end |
69 | !endif |
- | |
70 | ll=!makelist $wims_superclass/xx for xx in $ll |
- | |
71 | cc=!record 0 of $classdir1/$prog/courses |
- | |
72 | cc=!column 1 of $cc |
- | |
73 | cc=!nonempty items $cc |
- | |
74 | c_= |
- | |
75 | d_= |
- | |
76 | !for c in $cc |
- | |
77 | ctest=!defof sharing_user\ |
- | |
78 | sharing_exo in $classdir1/$c/neighbors |
- | |
79 | !distribute lines $ctest into u_,e_ |
- | |
80 | !if $u_!=$empty |
- | |
81 | d_=!append item $u_ to $d_ |
- | |
82 | !else |
- | |
83 | C=!translate internal / to , in $c |
- | |
84 | c_=!append item $(C[1])/$(C[2]) to $c_ |
- | |
85 | !endif |
69 | !endif |
- | 70 | ll=!makelist $wims_superclass/xx for xx in $ll |
|
- | 71 | cc=!record 0 of $classdir1/$prog/courses |
|
- | 72 | cc=!column 1 of $cc |
|
- | 73 | cc=!nonempty items $cc |
|
- | 74 | c_= |
|
- | 75 | d_= |
|
- | 76 | !for c in $cc |
|
- | 77 | ctest=!defof sharing_user\ |
|
- | 78 | sharing_exo in $classdir1/$c/neighbors |
|
- | 79 | !distribute lines $ctest into u_,e_ |
|
- | 80 | !if $u_!=$empty |
|
- | 81 | d_=!append item $u_ to $d_ |
|
- | 82 | !else |
|
- | 83 | C=!translate internal / to , in $c |
|
- | 84 | c_=!append item $(C[1])/$(C[2]) to $c_ |
|
- | 85 | !endif |
|
86 | !next c |
86 | !next c |
87 | clist=!listcomplement $d_ in $ll |
87 | clist=!listcomplement $d_ in $ll |
88 | clist2=$c_ |
88 | clist2=$c_ |
89 | !endif |
89 | !endif |
90 | 90 | ||
91 | :end |
91 | :end |
92 | ccnt=!itemcnt $clist |
92 | ccnt=!itemcnt $clist |
93 | 93 |