Rev 10762 | Rev 10774 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
10651 | bpr | 1 | !! make the list of all classes and programms which are supervised |
2 | !! with the courses inside with incrementation. |
||
10747 | bpr | 3 | !! no test zone. No intercourses ? |
10651 | bpr | 4 | !! subclass1 is something as the variable $wims_participate (only courses ? )+ optional courses |
5 | !! eventually |
||
6 | !! subclass2 is the complement |
||
7 | |||
8 | !if $auth_method isitemof $auth_method_list and $wims_user!=supervisor |
||
9 | !set u_=$wims_external_auth |
||
10 | !else |
||
10725 | bpr | 11 | !set u_=$wims_realuser |
12 | !default u_=$wims_user |
||
10651 | bpr | 13 | !endif |
1429 | bpr | 14 | !default CL_Name=$CL_Names |
10762 | bpr | 15 | !!!if $user_participate$user_supervise!=$empty |
16 | !!<p> |
||
17 | !! !if $supervisable!=yes |
||
10770 | bpr | 18 | !! $U_gotoclass |
10762 | bpr | 19 | !! !else |
10770 | bpr | 20 | !! $U_gotoclass3 |
10762 | bpr | 21 | !! !endif |
22 | !!</p> |
||
23 | !!!endif |
||
5894 | bpr | 24 | |
10651 | bpr | 25 | !if $supervisable=yes or ($wims_user=supervisor and $wims_realuser=supervisor) |
26 | !read subclasses_supervisor.phtml |
||
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 |
||
10674 | bpr | 29 | !if $class_type iswordof 2 4 |
30 | !!href module=adm/class/classes&type=supervisor&superclass=$wims_class $U_supervise |
||
31 | !!else |
||
10651 | bpr | 32 | !if $wims_user!=supervisor or $wims_realuser!=supervisor |
33 | $name_gotosupervise |
||
34 | !endif |
||
35 | !endif |
||
36 | !endif |
||
5110 | bpr | 37 | !else |
10651 | bpr | 38 | !if $supervisable!=yes |
39 | !read subclasses_user.phtml |
||
40 | !endif |
||
5110 | bpr | 41 | !endif |
10762 | bpr | 42 | !if $wims_supertype=4 |
43 | <div class="wims_work_legend"> |
||
44 | <p class="inline">$wims_name_legend:</p> |
||
45 | <ul class="inline"> |
||
46 | !set tmp=level,class,program,course |
||
47 | !if $supervisable=yes |
||
48 | !set wims_name_testclass=$CL_Test |
||
49 | !if $class_typename=program |
||
50 | !set tmp=$(tmp[3..-1]) |
||
51 | !endif |
||
52 | !if $class_typename=class |
||
53 | !set tmp=$(tmp[2..-1]) |
||
54 | !endif |
||
55 | !else |
||
56 | !set tmp=$(tmp[1,2,4]) |
||
57 | !if $class_typename=class |
||
58 | !set tmp=$(tmp[2,3]) |
||
59 | !endif |
||
60 | !endif |
||
61 | !for t in $tmp |
||
62 | <li class="wims_classes_direct_$t">$(wims_name_$t)</li> |
||
63 | !next |
||
64 | </ul> |
||
65 | </div> |
||
66 | !endif |
||
67 | !!exit |
||
68 | !goto end1 |
||
10651 | bpr | 69 | |
5110 | bpr | 70 | <ul class="wims_subclasses"><!--wims_subclasses--> |
71 | !reset alreadyseen |
||
72 | !if $wims_class!=$wims_superclass |
||
73 | !set subclass1=$wims_class,$subclass1 |
||
74 | !endif |
||
75 | !for c in $subclass1 |
||
76 | !set name=!defof class_description in wimshome/log/classes/$c/.def |
||
77 | !set type=!defof class_type in wimshome/log/classes/$c/.def |
||
78 | !set type_name=!defof class_typename in wimshome/log/classes/$c/.def |
||
79 | !read adm/class/initclass $c,auth |
||
80 | |||
5123 | bpr | 81 | !set t_=participant |
82 | !set type_class=!defof class_type in wimshome/log/classes/$class/.def |
||
5110 | bpr | 83 | !if $c notitemof $alreadyseen |
5941 | obado | 84 | <li> <span class="wims_classes_direct_$type_name"> |
5110 | bpr | 85 | !if $c!=$wims_class |
86 | !href module=adm/class/classes&type=authparticipant&class=$c&auth_user=$u_ $name |
||
87 | !else |
||
88 | $name |
||
1434 | bpr | 89 | !endif |
5110 | bpr | 90 | ($(CL_Name[2]))</span> |
91 | !set alreadyseen=!append item $c to $alreadyseen |
||
1434 | bpr | 92 | !set sub_=!record 0 of wimshome/log/classes/$c/courses |
93 | !set sub_cnt=!linecnt $sub_ |
||
7679 | bpr | 94 | !if $sub_cnt>0 |
5110 | bpr | 95 | <ul><!--2--> |
1429 | bpr | 96 | !for k_ =1 to $sub_cnt |
97 | !set parent_c=!defof class_parent in wimshome/log/classes/$wims_superclass/$(sub_[$k_;1])/.def |
||
1641 | bpr | 98 | !set split=!replace internal / by , in $(sub_[$k_;1]) |
99 | !set progstyle=!defof class_progstyle in wimshome/log/classes/$wims_superclass/$(split[1])/$(split[3])/.def |
||
1429 | bpr | 100 | !set name_c=!defof class_description in wimshome/log/classes/$parent_c/.def |
1641 | bpr | 101 | !if optional iswordof $progstyle |
102 | !set inscrit=!defof user_class in wimshome/log/classes/$wims_superclass/$(sub_[$k_;1])/.users/$wims_user |
||
103 | !endif |
||
5110 | bpr | 104 | !if $wims_superclass/$(sub_[$k_;1]) notitemof $alreadyseen and mandatory iswordof $progstyle or $(split[1])/$(split[2]) iswordof $inscrit or $wims_user=supervisor |
5123 | bpr | 105 | !set alreadyseen=!append item $wims_superclass/$(sub_[$k_;1]) to $alreadyseen |
5941 | obado | 106 | <li> |
1641 | bpr | 107 | <span class="wims_classes_direct_course"> |
7679 | bpr | 108 | !href module=adm/class/classes&type=auth$t_&class=$wims_superclass/$(sub_[$k_;1])&auth_user=$u_ $(sub_[$k_;3]) |
1434 | bpr | 109 | ($(CL_Name[4])) |
1641 | bpr | 110 | </span> |
3605 | bpr | 111 | </li> |
1641 | bpr | 112 | !endif |
5843 | bpr | 113 | </li> |
1429 | bpr | 114 | !next k_ |
5110 | bpr | 115 | </ul><!end--2--> |
7679 | bpr | 116 | !endif sub_cnt>0 |
5123 | bpr | 117 | !if $c=$wims_class |
118 | !goto end |
||
119 | !endif |
||
120 | !endif $c notitemof $alreadyseen |
||
121 | !next |
||
122 | |||
5110 | bpr | 123 | :end |
5111 | bpr | 124 | </ul> |
10651 | bpr | 125 | :end1 |
5110 | bpr | 126 | !if $alreadyseen!=$empty |
127 | !set subclass2=!listcomplement $alreadyseen in $subclass2 |
||
128 | !set subclasscnt2=!itemcnt $subclass2 |
||
129 | !endif |
||
4588 | czzmrn | 130 | !if $class_mixed_external_auth!=2 and $subclasscnt2>0 |
10770 | bpr | 131 | |
33 | reyssat | 132 | !if $insc!=yes |
10770 | bpr | 133 | !!not a program |
134 | !if $class_type!=3 |
||
135 | !href module=home&cmd=new&insc=yes $U_inscription2 |
||
136 | !endif |
||
33 | reyssat | 137 | !else |
5891 | obado | 138 | <div> |
5110 | bpr | 139 | $U_inscription1 |
10674 | bpr | 140 | <ul class="wims_subclasses"> |
33 | reyssat | 141 | !for c in $subclass2 |
142 | !set name=!defof class_description in wimshome/log/classes/$c/.def |
||
5111 | bpr | 143 | !set type=!defof class_typename in wimshome/log/classes/$c/.def |
10770 | bpr | 144 | <li><span class="wims_classes_direct_$type"> |
7124 | czzmrn | 145 | !! wrong variable? |
146 | !! !href module=adm/class/reguser&class=$c&auth_user=$u_ $name |
||
10762 | bpr | 147 | !href module=adm/class/reguser&class=$c&user_auth=$u_&subclass=yes $name |
5111 | bpr | 148 | </span></li> |
33 | reyssat | 149 | !next c |
5891 | obado | 150 | </ul> |
151 | </div> |
||
5111 | bpr | 152 | !set wims_ref_class=wims_button |
3960 | bpr | 153 | !href module=home&cmd=new $wims_name_back2 |
33 | reyssat | 154 | !endif |
155 | !endif |
||
5843 | bpr | 156 | !if $supervisable=yes and ($wims_user=supervisor or $wims_class=$wims_superclass) and $class_type notwordof 3 4 |
5111 | bpr | 157 | <p> |
5104 | bpr | 158 | !set wims_ref_class=wims_button |
159 | !href module=adm/class/regclass $wims_name_classcreate |
||
9454 | guerimand | 160 | !set wims_ref_class=wims_button |
161 | !href module=adm/class/regclass&job=cloneexemple $wims_name_cloneclass |
||
162 | |||
5843 | bpr | 163 | </p> |
5020 | bpr | 164 | !endif |