Rev 7124 | Rev 9454 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1429 | bpr | 1 | !default CL_Name=$CL_Names |
5110 | bpr | 2 | |
5941 | obado | 3 | |
4799 | guerimand | 4 | !if $supervisable=yes |
4800 | bpr | 5 | !read subclasses_user.phtml |
5127 | bpr | 6 | !if ($wims_user=supervisor or $wims_class=$wims_superclass) |
7 | !if $class_type notwordof 2 |
||
8 | !href module=adm/class/classes&type=supervisor&superclass=$wims_class $U_supervise |
||
9 | !else |
||
10 | $name_gotosupervise |
||
11 | !endif |
||
5104 | bpr | 12 | !endif |
4799 | guerimand | 13 | !endif |
5894 | bpr | 14 | |
15 | !if $(subclasscnt1)>0 and $insc!=yes |
||
5110 | bpr | 16 | <p> |
33 | reyssat | 17 | !if $supervisable!=yes |
18 | $U_gotoclass |
||
19 | !else |
||
5110 | bpr | 20 | $(U_gotoclass1) |
33 | reyssat | 21 | !endif |
5894 | bpr | 22 | </p> |
5110 | bpr | 23 | !endif |
5894 | bpr | 24 | |
5110 | bpr | 25 | !if $auth_method isitemof $auth_method_list and $wims_user!=supervisor |
26 | !set u_=$wims_external_auth |
||
27 | !else |
||
28 | !set u_=$wims_user |
||
29 | !endif |
||
7679 | bpr | 30 | |
5110 | bpr | 31 | !if $subclass1=$empty |
32 | !goto end |
||
33 | !endif |
||
34 | <ul class="wims_subclasses"><!--wims_subclasses--> |
||
35 | !reset alreadyseen |
||
36 | !if $wims_class!=$wims_superclass |
||
37 | !set subclass1=$wims_class,$subclass1 |
||
38 | !endif |
||
39 | |||
40 | !for c in $subclass1 |
||
41 | !set name=!defof class_description in wimshome/log/classes/$c/.def |
||
42 | !set type=!defof class_type in wimshome/log/classes/$c/.def |
||
43 | !set type_name=!defof class_typename in wimshome/log/classes/$c/.def |
||
44 | !read adm/class/initclass $c,auth |
||
45 | |||
5123 | bpr | 46 | !set t_=participant |
47 | !set type_class=!defof class_type in wimshome/log/classes/$class/.def |
||
5110 | bpr | 48 | !if $c notitemof $alreadyseen |
5941 | obado | 49 | <li> <span class="wims_classes_direct_$type_name"> |
5110 | bpr | 50 | !if $c!=$wims_class |
51 | !href module=adm/class/classes&type=authparticipant&class=$c&auth_user=$u_ $name |
||
52 | !else |
||
53 | $name |
||
1434 | bpr | 54 | !endif |
5110 | bpr | 55 | ($(CL_Name[2]))</span> |
56 | !set alreadyseen=!append item $c to $alreadyseen |
||
1434 | bpr | 57 | !set sub_=!record 0 of wimshome/log/classes/$c/courses |
58 | !set sub_cnt=!linecnt $sub_ |
||
7679 | bpr | 59 | !if $sub_cnt>0 |
5110 | bpr | 60 | <ul><!--2--> |
1429 | bpr | 61 | !for k_ =1 to $sub_cnt |
62 | !set parent_c=!defof class_parent in wimshome/log/classes/$wims_superclass/$(sub_[$k_;1])/.def |
||
1641 | bpr | 63 | !set split=!replace internal / by , in $(sub_[$k_;1]) |
64 | !set progstyle=!defof class_progstyle in wimshome/log/classes/$wims_superclass/$(split[1])/$(split[3])/.def |
||
1429 | bpr | 65 | !set name_c=!defof class_description in wimshome/log/classes/$parent_c/.def |
1641 | bpr | 66 | !if optional iswordof $progstyle |
67 | !set inscrit=!defof user_class in wimshome/log/classes/$wims_superclass/$(sub_[$k_;1])/.users/$wims_user |
||
68 | !endif |
||
5110 | bpr | 69 | !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 | 70 | !set alreadyseen=!append item $wims_superclass/$(sub_[$k_;1]) to $alreadyseen |
5941 | obado | 71 | <li> |
1641 | bpr | 72 | <span class="wims_classes_direct_course"> |
7679 | bpr | 73 | !href module=adm/class/classes&type=auth$t_&class=$wims_superclass/$(sub_[$k_;1])&auth_user=$u_ $(sub_[$k_;3]) |
1434 | bpr | 74 | ($(CL_Name[4])) |
1641 | bpr | 75 | </span> |
3605 | bpr | 76 | </li> |
1641 | bpr | 77 | !endif |
5843 | bpr | 78 | </li> |
1429 | bpr | 79 | !next k_ |
5110 | bpr | 80 | </ul><!end--2--> |
7679 | bpr | 81 | !endif sub_cnt>0 |
5123 | bpr | 82 | !if $c=$wims_class |
83 | !goto end |
||
84 | !endif |
||
85 | !endif $c notitemof $alreadyseen |
||
86 | !next |
||
87 | |||
5110 | bpr | 88 | :end |
5111 | bpr | 89 | </ul> |
5110 | bpr | 90 | !if $alreadyseen!=$empty |
91 | !set subclass2=!listcomplement $alreadyseen in $subclass2 |
||
92 | !set subclasscnt2=!itemcnt $subclass2 |
||
93 | !endif |
||
4588 | czzmrn | 94 | !if $class_mixed_external_auth!=2 and $subclasscnt2>0 |
33 | reyssat | 95 | !if $insc!=yes |
96 | !href module=home&cmd=new&insc=yes $U_inscription2 |
||
97 | !else |
||
5891 | obado | 98 | <div> |
5110 | bpr | 99 | $U_inscription1 |
5891 | obado | 100 | <ul> |
33 | reyssat | 101 | !for c in $subclass2 |
102 | !set name=!defof class_description in wimshome/log/classes/$c/.def |
||
5111 | bpr | 103 | !set type=!defof class_typename in wimshome/log/classes/$c/.def |
5891 | obado | 104 | <li> <span class="wims_classes_direct_$type"> |
7124 | czzmrn | 105 | !! wrong variable? |
106 | !! !href module=adm/class/reguser&class=$c&auth_user=$u_ $name |
||
107 | !href module=adm/class/reguser&class=$c&user_auth=$u_ $name |
||
5111 | bpr | 108 | </span></li> |
33 | reyssat | 109 | |
110 | !next c |
||
5891 | obado | 111 | </ul> |
112 | </div> |
||
5111 | bpr | 113 | !set wims_ref_class=wims_button |
3960 | bpr | 114 | !href module=home&cmd=new $wims_name_back2 |
33 | reyssat | 115 | !endif |
116 | !endif |
||
5843 | bpr | 117 | !if $supervisable=yes and ($wims_user=supervisor or $wims_class=$wims_superclass) and $class_type notwordof 3 4 |
5111 | bpr | 118 | <p> |
5104 | bpr | 119 | !set wims_ref_class=wims_button |
120 | !href module=adm/class/regclass $wims_name_classcreate |
||
5843 | bpr | 121 | </p> |
5020 | bpr | 122 | !endif |