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