Rev 23 | Rev 2368 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
23 | reyssat | 1 | |
2 | wims_prefix=class user tmp n sharing sharable |
||
3 | !readdef wimshome/log/classes/$wims_class/.def |
||
4 | class_defined= |
||
5 | !default wims_superclass=$wims_class |
||
6 | classdir1=wimshome/log/classes/$wims_superclass |
||
7 | classdir2=$wims_home/log/classes/$wims_superclass |
||
8 | supertype=!defof class_type in $classdir1/.def |
||
9 | !if $supertype!=4 or $wims_user!=supervisor or \ |
||
10 | ../$wims_superclass/ notin ../$wims_class/ |
||
11 | error=bad_access |
||
12 | !exit |
||
13 | !endif |
||
14 | |||
15 | !read adm/class/config.auth |
||
16 | !if $error!=$empty or $jobt=auth |
||
17 | error=unsecure |
||
18 | !exit |
||
19 | !endif |
||
20 | |||
21 | !bound passhow within yes,no default no |
||
22 | !if $passhow=yes |
||
23 | pass2=$pass |
||
24 | passs2=$passs |
||
25 | !endif |
||
26 | job1=first,addlevel,dellevel,user,\ |
||
27 | teacher,addteacher,modteacher,delteacher |
||
28 | # student,addstudent,modstudent,delstudent |
||
29 | default1=first |
||
30 | job2=level,addclass,delclass,addprog,delprog |
||
31 | default2=level |
||
32 | job3=class,prog,course,addcourse,delcourse,addtest,deltest,\ |
||
33 | icourse,addicourse,progshare |
||
34 | !if $wims_class=$wims_superclass |
||
35 | lv=1 |
||
36 | jobs=$job1,$job2 |
||
37 | !else |
||
38 | csub=!replace internal ../$wims_superclass/ by in ../$wims_class |
||
39 | lc=!translate internal / to , in $wims_class |
||
40 | lv=!itemcnt $lc |
||
41 | !if $lv>3 or $lv<2 |
||
42 | error=bad_access |
||
43 | !exit |
||
44 | !endif |
||
45 | !if $lv=2 |
||
46 | level=$csub |
||
47 | jobs=$job2 |
||
48 | parent=gateway |
||
49 | !else |
||
50 | test=$(lc[-1]) |
||
51 | !if $test>199 |
||
52 | default3=prog |
||
53 | prog=$csub |
||
54 | parent=level |
||
55 | level=$(lc[2]) |
||
56 | !else |
||
57 | default3=class |
||
58 | class=$csub |
||
59 | parent=level |
||
60 | level=$(lc[2]) |
||
61 | !endif |
||
62 | jobs= |
||
63 | !endif |
||
64 | !endif |
||
65 | |||
66 | jobs=!nonempty items $jobs,$job3,backstruct |
||
67 | !bound job within $jobs default $(default$lv) |
||
68 | !read tabletheme |
||
69 | !read adm/class/limits |
||
70 | !read adm/class/authchars |
||
71 | |||
72 | !read jobs/$job.proc |
||
73 | |||
74 | !if $default3!=$empty |
||
75 | parent=$default3 |
||
76 | !endif |
||
77 | |||
78 | !if $job!=first |
||
79 | !default parent=gateway |
||
80 | !endif |
||
81 | !if $parent!=$empty |
||
82 | addline=!defof class_institution in $classdir1/.def |
||
83 | !if $parent iswordof level class prog |
||
84 | addline2=!defof class_description in $classdir1/$level/.def |
||
85 | addline=$addline\ |
||
86 | $addline2 |
||
87 | !endif |
||
88 | !if $parent iswordof class |
||
89 | addline2=!defof class_description in $classdir1/$class/.def |
||
90 | addline=$addline\ |
||
91 | $addline2 |
||
92 | parm3=job=class&class=$class |
||
93 | !endif |
||
94 | !if $parent iswordof prog |
||
95 | addline2=!defof class_description in $classdir1/$prog/.def |
||
96 | addline=$addline\ |
||
97 | $addline2 |
||
98 | parm3=job=prog&prog=$prog |
||
99 | !endif |
||
100 | !endif |
||
101 | |||
102 | addparms=job=first,\ |
||
103 | job=level&level=$level,\ |
||
104 | $parm3 |
||
105 |