Rev 20 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 20 | Rev 12981 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | 3 | ||
4 | thiscourse=!translate internal / to , in $wims_read_parm |
4 | thiscourse=!translate internal / to , in $wims_read_parm |
5 | thislevel=$(thiscourse[1]) |
5 | thislevel=$(thiscourse[1]) |
6 | 6 | ||
7 | !if $wims_superclass=$empty or $thislevel=$empty or $wims_user!=supervisor |
7 | !if $wims_superclass=$empty or $thislevel=$empty or $wims_user!=supervisor |
8 | !exit |
8 | !exit |
9 | !endif |
9 | !endif |
10 | 10 | ||
11 | classdir=wimshome/log/classes/$wims_superclass |
11 | classdir=wimshome/log/classes/$wims_superclass |
12 | cls_=$wims_read_parm |
12 | cls_=$wims_read_parm |
13 | cls__=$classdir/$cls_ |
13 | cls__=$classdir/$cls_ |
14 | !if $wims_class/ notin $wims_superclass/$wims_read_parm |
14 | !if $wims_class/ notin $wims_superclass/$wims_read_parm |
15 | progtest=!defof sharing_exam in $classdir/ls_/neighbors |
15 | progtest=!defof sharing_exam in $classdir/ls_/neighbors |
16 | !if $wims_class/ notin $progtest/ |
16 | !if $wims_class/ notin $progtest/ |
17 | !exit |
17 | !exit |
18 | !endif |
18 | !endif |
19 | !endif |
19 | !endif |
20 | test=!defof class_defined in $cls__/.def |
20 | test=!defof class_defined in $cls__/.def |
21 | !if $test!=yes |
21 | !if $test!=yes |
22 | error=del_not_exist |
22 | error=del_not_exist |
23 | !exit |
23 | !exit |
24 | !endif |
24 | !endif |
25 | 25 | ||
26 | sharelist=!defof sharing_all in $cls__/neighbors |
26 | sharelist=!defof sharing_all in $cls__/neighbors |
27 | !for dp_C in $sharelist |
27 | !for dp_C in $sharelist |
28 | !read adm/class/stopshare $dp_C,$wims_superclass/$cls_\ |
28 | !read adm/class/stopshare $dp_C,$wims_superclass/$cls_\ |
Line 34... | Line 34... | ||
34 | cls=!item 1 to -2 of $cls |
34 | cls=!item 1 to -2 of $cls |
35 | cls=!translate , to / in $cls |
35 | cls=!translate , to / in $cls |
36 | cls=!nospace $cls |
36 | cls=!nospace $cls |
37 | ocourses=!defof class_ocourses in $classdir/$cls/.def |
37 | ocourses=!defof class_ocourses in $classdir/$cls/.def |
38 | !if $cls_ isitemof $ocourses |
38 | !if $cls_ isitemof $ocourses |
39 | ocourses=!listcomplement $cls_ in $ocourses |
39 | ocourses=!listcomplement $cls_ in $ocourses |
40 | !setdef !set class_ocourses=$ocourses in $classdir/$cls/.def |
40 | !setdef !set class_ocourses=$ocourses in $classdir/$cls/.def |
41 | !else |
41 | !else |
42 | n=!recordcnt $classdir/$cls_/.userlist |
42 | n=!recordcnt $classdir/$cls_/.userlist |
43 | !for i=1 to $n |
43 | !for i=1 to $n |
44 | l=!record $i of $classdir/$cls_/.userlist |
44 | l=!record $i of $classdir/$cls_/.userlist |
45 | u=!item 3 of $l |
45 | u=!item 3 of $l |
46 | s=!defof user_class in $classdir/$cls_/.users/$u |
46 | s=!defof user_class in $classdir/$cls_/.users/$u |
47 | !if $s!=$empty |
47 | !if $s!=$empty |
48 | l=!defof user_courses in $classdir/$s/.users/$u |
48 | l=!defof user_courses in $classdir/$s/.users/$u |
49 | !if $cls_ isitemof $l |
49 | !if $cls_ isitemof $l |
50 | l=!listcomplement $cls_ in $l |
50 | l=!listcomplement $cls_ in $l |
51 | !setdef !set user_courses=$l in $classdir/$s/.users/$u |
51 | !setdef !set user_courses=$l in $classdir/$s/.users/$u |
52 | !endif |
52 | !endif |
53 | !endif |
53 | !endif |
54 | !next i |
54 | !next i |
55 | !endif |
55 | !endif |
56 | 56 | ||
57 | !read adm/gateway/delsup $cls_ |
57 | !read adm/gateway/delsup $cls_ |
58 | !sh cd $wims_home/log/classes/$wims_superclass\ |
58 | !sh cd $wims_home/log/classes/$wims_superclass\ |
59 | rm -Rf $cls_ |
59 | rm -Rf $cls_ |
60 | - |