Rev 12982 | Rev 14047 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2368 | bpr | 1 | !read adm/class/classlang names.phtml |
23 | reyssat | 2 | |
3 | wims_prefix=class user tmp n sharing sharable |
||
5125 | bpr | 4 | !read adm/class/initclass $wims_class, auth |
23 | reyssat | 5 | !readdef wimshome/log/classes/$wims_class/.def |
6 | class_defined= |
||
7 | !default wims_superclass=$wims_class |
||
8 | classdir1=wimshome/log/classes/$wims_superclass |
||
9 | classdir2=$wims_home/log/classes/$wims_superclass |
||
10 | supertype=!defof class_type in $classdir1/.def |
||
11 | !if $supertype!=4 or $wims_user!=supervisor or \ |
||
12 | ../$wims_superclass/ notin ../$wims_class/ |
||
12618 | bpr | 13 | error=bad_access |
14 | !exit |
||
23 | reyssat | 15 | !endif |
16 | |||
17 | !read adm/class/config.auth |
||
18 | !if $error!=$empty or $jobt=auth |
||
12618 | bpr | 19 | error=unsecure |
20 | !exit |
||
23 | reyssat | 21 | !endif |
22 | |||
23 | !bound passhow within yes,no default no |
||
24 | !if $passhow=yes |
||
12618 | bpr | 25 | pass2=$pass |
26 | passs2=$passs |
||
23 | reyssat | 27 | !endif |
28 | job1=first,addlevel,dellevel,user,\ |
||
29 | teacher,addteacher,modteacher,delteacher |
||
30 | # student,addstudent,modstudent,delstudent |
||
31 | default1=first |
||
10820 | guerimand | 32 | job2=level,addclass,addcsvclass,delclass,addprog,delprog |
23 | reyssat | 33 | default2=level |
34 | job3=class,prog,course,addcourse,delcourse,addtest,deltest,\ |
||
35 | icourse,addicourse,progshare |
||
36 | !if $wims_class=$wims_superclass |
||
12618 | bpr | 37 | lv=1 |
38 | jobs=$job1,$job2 |
||
23 | reyssat | 39 | !else |
12618 | bpr | 40 | csub=!replace internal ../$wims_superclass/ by in ../$wims_class |
41 | lc=!translate internal / to , in $wims_class |
||
42 | lv=!itemcnt $lc |
||
43 | !if $lv>3 or $lv<2 |
||
44 | error=bad_access |
||
45 | !exit |
||
46 | !endif |
||
47 | !if $lv=2 |
||
48 | level=$csub |
||
49 | jobs=$job2 |
||
50 | parent=gateway |
||
23 | reyssat | 51 | !else |
12618 | bpr | 52 | test=$(lc[-1]) |
53 | !if $test>199 |
||
54 | default3=prog |
||
55 | prog=$csub |
||
56 | parent=level |
||
57 | level=$(lc[2]) |
||
58 | !else |
||
59 | default3=class |
||
60 | class=$csub |
||
61 | parent=level |
||
62 | level=$(lc[2]) |
||
63 | !endif |
||
64 | jobs= |
||
23 | reyssat | 65 | !endif |
66 | !endif |
||
67 | |||
68 | jobs=!nonempty items $jobs,$job3,backstruct |
||
69 | !bound job within $jobs default $(default$lv) |
||
70 | !read tabletheme |
||
71 | !read adm/class/limits |
||
72 | !read adm/class/authchars |
||
73 | |||
13021 | bpr | 74 | !!! $auth_method_list ?? was working for cas before without that ? |
75 | !if $auth_method isitemof php |
||
76 | login=$user_auth |
||
77 | !endif |
||
78 | |||
79 | |||
23 | reyssat | 80 | !read jobs/$job.proc |
81 | |||
82 | !if $default3!=$empty |
||
12982 | bpr | 83 | parent=$default3 |
23 | reyssat | 84 | !endif |
85 | |||
86 | !if $job!=first |
||
12618 | bpr | 87 | !default parent=gateway |
23 | reyssat | 88 | !endif |
89 | !if $parent!=$empty |
||
12618 | bpr | 90 | addline=!defof class_institution in $classdir1/.def |
91 | title_parent=!defof class_description in $classdir1/$level/.def |
||
92 | !if $parent iswordof level class prog |
||
93 | addline2=!defof class_description in $classdir1/$level/.def |
||
94 | addline=$addline\ |
||
23 | reyssat | 95 | $addline2 |
12618 | bpr | 96 | !endif |
97 | !if $parent iswordof class |
||
98 | addline2=!defof class_description in $classdir1/$class/.def |
||
99 | addline=$addline\ |
||
23 | reyssat | 100 | $addline2 |
12618 | bpr | 101 | parm3=job=class&class=$class |
102 | !endif |
||
103 | !if $parent iswordof prog |
||
104 | addline2=!defof class_description in $classdir1/$prog/.def |
||
105 | addline=$addline\ |
||
23 | reyssat | 106 | $addline2 |
12618 | bpr | 107 | parm3=job=prog&prog=$prog |
108 | !endif |
||
23 | reyssat | 109 | !endif |
110 | addparms=job=first,\ |
||
111 | job=level&level=$level,\ |
||
112 | $parm3 |
||
113 | |||
10152 | bpr | 114 | !set name_prog=$name_program |
115 | !if $addline$thiscode$thistitle!=$empty |
||
12618 | bpr | 116 | !set l=!linecnt $addline |
117 | !for i=1 to $l |
||
118 | !set l_=!line $i of $addline |
||
119 | !set t_=!item $i of $addparms |
||
120 | !if $lv<=$i |
||
121 | !set wims_ariane=!append line backgateway $l_,1,cmd=reply&$t_\ |
||
10152 | bpr | 122 | to $wims_ariane |
12618 | bpr | 123 | !next i |
124 | !if $thiscode!=$empty |
||
125 | !if $thiscode!=$wims_superclass and $wims_superclass/$thiscode!=$wims_class |
||
126 | !set wims_ariane=!append line backgateway $class_description,8,\ |
||
10152 | bpr | 127 | to $wims_ariane |
12618 | bpr | 128 | !endif |
10152 | bpr | 129 | !endif |
130 | !endif |
||
131 | wims_ariane_self=no |
||
132 | !if $wims_ariane=$empty |
||
133 | !set wims_ariane=!append line backgateway $title_parent $thiscode,8,\ |
||
134 | to $wims_ariane |
||
135 | !endif |