Rev 12639 | Rev 13063 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 12639 | Rev 12821 | ||
---|---|---|---|
Line 4... | Line 4... | ||
4 | !! subclass1 is something as the variable $wims_participate (only courses ? )+ optional courses |
4 | !! subclass1 is something as the variable $wims_participate (only courses ? )+ optional courses |
5 | !! eventually |
5 | !! eventually |
6 | !! subclass2 is the complement |
6 | !! subclass2 is the complement |
7 | 7 | ||
8 | !if $auth_method isitemof $auth_method_list and $wims_user!=supervisor |
8 | !if $auth_method isitemof $auth_method_list and $wims_user!=supervisor |
9 |
|
9 | !set u_=$wims_external_auth |
10 | !else |
10 | !else |
11 |
|
11 | !set u_=$wims_realuser |
12 |
|
12 | !default u_=$wims_user |
13 | !endif |
13 | !endif |
14 | !default CL_Name=$CL_Names |
14 | !default CL_Name=$CL_Names |
15 | !!!if $user_participate$user_supervise!=$empty |
15 | !!!if $user_participate$user_supervise!=$empty |
16 | !!<p> |
16 | !!<p> |
17 | !! !if $supervisable!=yes |
17 | !! !if $supervisable!=yes |
Line 23... | Line 23... | ||
23 | !!!endif |
23 | !!!endif |
24 | 24 | ||
25 | !if $supervisable=yes or ($wims_user=supervisor and $wims_realuser=supervisor) |
25 | !if $supervisable=yes or ($wims_user=supervisor and $wims_realuser=supervisor) |
26 | !read subclasses_supervisor.phtml |
26 | !read subclasses_supervisor.phtml |
27 | !if ($wims_user=supervisor or $wims_class=$wims_superclass) |
27 | !if ($wims_user=supervisor or $wims_class=$wims_superclass) |
28 | !!FIXME desactivate the possibility for teachers to register without the administrator in a portal |
28 | !!FIXME desactivate the possibility for teachers to register without the administrator in a portal |
29 | !if $class_type iswordof 2 4 |
29 | !if $class_type iswordof 2 4 |
30 |
|
30 | !!href module=adm/class/classes&type=supervisor&superclass=$wims_class $U_supervise |
31 | !!else |
31 | !!else |
32 | !if $wims_user!=supervisor or $wims_realuser!=supervisor |
32 | !if $wims_user!=supervisor or $wims_realuser!=supervisor |
33 | $name_gotosupervise |
33 | $name_gotosupervise |
34 | !endif |
34 | !endif |
35 | !endif |
35 | !endif |
36 | !endif |
36 | !endif |
37 | !else |
37 | !else |
38 |
|
38 | !if $supervisable!=yes |
39 |
|
39 | !read subclasses_user.phtml |
40 |
|
40 | !read classlegend.phtml |
41 |
|
41 | !endif |
42 | !endif |
42 | !endif |
43 | !!exit |
43 | !!exit |
44 | !goto end1 |
44 | !goto end1 |
45 | 45 | ||
46 | <ul class="wims_subclasses"><!--wims_subclasses--> |
46 | <ul class="wims_subclasses"><!--wims_subclasses--> |
47 | !reset alreadyseen |
47 | !reset alreadyseen |
48 | !if $wims_class!=$wims_superclass |
48 | !if $wims_class!=$wims_superclass |
49 |
|
49 | !set subclass1=$wims_class,$subclass1 |
50 | !endif |
50 | !endif |
51 | !for c in $subclass1 |
51 | !for c in $subclass1 |
52 |
|
52 | !set name=!defof class_description in wimshome/log/classes/$c/.def |
53 |
|
53 | !set type=!defof class_type in wimshome/log/classes/$c/.def |
54 |
|
54 | !set type_name=!defof class_typename in wimshome/log/classes/$c/.def |
55 |
|
55 | !read adm/class/initclass $c,auth |
56 | 56 | ||
57 |
|
57 | !set t_=participant |
58 |
|
58 | !set type_class=!defof class_type in wimshome/log/classes/$class/.def |
59 |
|
59 | !if $c notitemof $alreadyseen |
60 |
|
60 | <li> <span class="wims_classes_direct_$type_name"> |
61 |
|
61 | !if $c!=$wims_class |
62 | !href module=adm/class/classes&type=authparticipant&class=$c&auth_user=$u_ $name |
62 | !href module=adm/class/classes&type=authparticipant&class=$c&auth_user=$u_ $name |
63 |
|
63 | !else |
64 |
|
64 | $name |
65 |
|
65 | !endif |
66 |
|
66 | ($(CL_Name[2]))</span> |
67 |
|
67 | !set alreadyseen=!append item $c to $alreadyseen |
68 |
|
68 | !set sub_=!record 0 of wimshome/log/classes/$c/courses |
69 |
|
69 | !set sub_cnt=!linecnt $sub_ |
70 |
|
70 | !if $sub_cnt>0 |
71 | <ul><!--2--> |
71 | <ul><!--2--> |
72 | !for k_ =1 to $sub_cnt |
72 | !for k_ =1 to $sub_cnt |
73 | !set parent_c=!defof class_parent in wimshome/log/classes/$wims_superclass/$(sub_[$k_;1])/.def |
73 | !set parent_c=!defof class_parent in wimshome/log/classes/$wims_superclass/$(sub_[$k_;1])/.def |
74 | !set split=!replace internal / by , in $(sub_[$k_;1]) |
74 | !set split=!replace internal / by , in $(sub_[$k_;1]) |
75 | !set progstyle=!defof class_progstyle in wimshome/log/classes/$wims_superclass/$(split[1])/$(split[3])/.def |
75 | !set progstyle=!defof class_progstyle in wimshome/log/classes/$wims_superclass/$(split[1])/$(split[3])/.def |
76 | !set name_c=!defof class_description in wimshome/log/classes/$parent_c/.def |
76 | !set name_c=!defof class_description in wimshome/log/classes/$parent_c/.def |
77 | !if optional iswordof $progstyle |
77 | !if optional iswordof $progstyle |
78 | !set inscrit=!defof user_class in wimshome/log/classes/$wims_superclass/$(sub_[$k_;1])/.users/$wims_user |
78 | !set inscrit=!defof user_class in wimshome/log/classes/$wims_superclass/$(sub_[$k_;1])/.users/$wims_user |
79 | !endif |
79 | !endif |
80 | !if $wims_superclass/$(sub_[$k_;1]) notitemof $alreadyseen and mandatory iswordof $progstyle or $(split[1])/$(split[2]) iswordof $inscrit or $wims_user=supervisor |
80 | !if $wims_superclass/$(sub_[$k_;1]) notitemof $alreadyseen and mandatory iswordof $progstyle or $(split[1])/$(split[2]) iswordof $inscrit or $wims_user=supervisor |
81 | !set alreadyseen=!append item $wims_superclass/$(sub_[$k_;1]) to $alreadyseen |
81 | !set alreadyseen=!append item $wims_superclass/$(sub_[$k_;1]) to $alreadyseen |
82 | <li> |
82 | <li> |
83 | <span class="wims_classes_direct_course"> |
83 | <span class="wims_classes_direct_course"> |
84 | !href module=adm/class/classes&type=auth$t_&class=$wims_superclass/$(sub_[$k_;1])&auth_user=$u_ $(sub_[$k_;3]) |
84 | !href module=adm/class/classes&type=auth$t_&class=$wims_superclass/$(sub_[$k_;1])&auth_user=$u_ $(sub_[$k_;3]) |
85 | ($(CL_Name[4])) |
85 | ($(CL_Name[4])) |
86 | </span> |
86 | </span> |
- | 87 | </li> |
|
- | 88 | !endif |
|
87 | </li> |
89 | </li> |
88 | !endif |
- | |
89 | </li> |
- | |
90 | !next k_ |
90 | !next k_ |
91 |
|
91 | </ul><!end--2--> |
92 |
|
92 | !endif sub_cnt>0 |
93 |
|
93 | !if $c=$wims_class |
94 |
|
94 | !goto end |
95 |
|
95 | !endif |
96 |
|
96 | !endif $c notitemof $alreadyseen |
97 | !next |
97 | !next |
98 | 98 | ||
99 | :end |
99 | :end |
100 | </ul> |
100 | </ul> |
101 | :end1 |
101 | :end1 |
Line 103... | Line 103... | ||
103 | !set subclass2=!listcomplement $alreadyseen in $subclass2 |
103 | !set subclass2=!listcomplement $alreadyseen in $subclass2 |
104 | !set subclasscnt2=!itemcnt $subclass2 |
104 | !set subclasscnt2=!itemcnt $subclass2 |
105 | !endif |
105 | !endif |
106 | !if $class_mixed_external_auth!=2 and $subclasscnt2>0 |
106 | !if $class_mixed_external_auth!=2 and $subclasscnt2>0 |
107 | 107 | ||
108 | !if $insc!=yes |
108 | !if $insc!=yes |
109 | !!not a program |
109 | !!not a program |
110 | !if $class_type!=3 |
110 | !if $class_type!=3 |
111 | !href module=home&cmd=new&insc=yes $U_inscription2 |
111 | !href module=home&cmd=new&insc=yes $U_inscription2 |
- | 112 | !endif |
|
- | 113 | !else |
|
- | 114 | <div> |
|
- | 115 | $U_inscription1 |
|
- | 116 | <ul class="wims_subclasses"> |
|
- | 117 | !for c in $subclass2 |
|
- | 118 | !set name=!defof class_description in wimshome/log/classes/$c/.def |
|
- | 119 | !set type=!defof class_typename in wimshome/log/classes/$c/.def |
|
- | 120 | <li><span class="wims_classes_direct_$type"> |
|
- | 121 | !! wrong variable? |
|
- | 122 | !! !href module=adm/class/reguser&class=$c&auth_user=$u_ $name |
|
- | 123 | !href module=adm/class/reguser&class=$c&user_auth=$u_&subclass=yes $name |
|
- | 124 | </span></li> |
|
- | 125 | !next c |
|
- | 126 | </ul> |
|
- | 127 | </div> |
|
- | 128 | !set wims_ref_class=wims_button wims_secondary_button |
|
- | 129 | !href module=home&cmd=new $wims_name_back2 |
|
112 | !endif |
130 | !endif |
113 | !else |
- | |
114 | <div> |
- | |
115 | $U_inscription1 |
- | |
116 | <ul class="wims_subclasses"> |
- | |
117 | !for c in $subclass2 |
- | |
118 | !set name=!defof class_description in wimshome/log/classes/$c/.def |
- | |
119 | !set type=!defof class_typename in wimshome/log/classes/$c/.def |
- | |
120 | <li><span class="wims_classes_direct_$type"> |
- | |
121 | !! wrong variable? |
- | |
122 | !! !href module=adm/class/reguser&class=$c&auth_user=$u_ $name |
- | |
123 | !href module=adm/class/reguser&class=$c&user_auth=$u_&subclass=yes $name |
- | |
124 | </span></li> |
- | |
125 | !next c |
- | |
126 | </ul> |
- | |
127 | </div> |
- | |
128 | !set wims_ref_class=wims_button wims_secondary_button |
- | |
129 | !href module=home&cmd=new $wims_name_back2 |
- | |
130 | !endif |
- | |
131 | !endif |
131 | !endif |
132 | !if $supervisable=yes and ($wims_user=supervisor or $wims_class=$wims_superclass) and $class_type notwordof 3 4 |
132 | !if $supervisable=yes and ($wims_user=supervisor or $wims_class=$wims_superclass) and $class_type notwordof 3 4 |
133 | <p> |
133 | <p> |
134 |
|
134 | !set wims_ref_class=wims_button |
135 |
|
135 | !href module=adm/class/regclass $wims_name_classcreate |
136 |
|
136 | !set wims_ref_class=wims_button |
137 |
|
137 | !href module=adm/class/regclass&job=cloneexemple $wims_name_cloneclass |
138 | </p> |
138 | </p> |
139 | !endif |
139 | !endif |