Rev 17507 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4819 | czzmrn | 1 | !if $wims_superclass=$empty |
4820 | czzmrn | 2 | !let wims_superclass=$wims_class |
4819 | czzmrn | 3 | !endif |
10640 | bpr | 4 | !set wims_realuser=!defof wims_realuser in wimshome/$wims_sesdir/var.stat |
10651 | bpr | 5 | !set levels=!record 0 of wimshome/log/classes/$wims_class/levels |
6 | !set levelcnt=!linecnt $levels |
||
10640 | bpr | 7 | !set classes=!record 0 of wimshome/log/classes/$wims_class/classes |
8 | !set classcnt=!linecnt $classes |
||
9 | !set progs=!record 0 of wimshome/log/classes/$wims_class/programs |
||
10 | !set progcnt=!linecnt $progs |
||
11 | |||
10651 | bpr | 12 | !!if $classcnt+$progcnt>=1 |
10640 | bpr | 13 | !set courses=!record 0 of wimshome/log/classes/$wims_class/courses |
14 | !set coursecnt=!linecnt $courses |
||
10651 | bpr | 15 | !!endif |
10640 | bpr | 16 | !set icourses=!record 0 of wimshome/log/classes/$wims_class/icourses |
17 | !set icoursecnt=!linecnt $icourses |
||
18 | |||
17506 | guerimand | 19 | !if $wims_user=supervisor and ($wims_realuser=supervisor or $wims_realuser=SUPERVISOR) |
10651 | bpr | 20 | !set user_supervise=!column 1 of $levels\ |
21 | $classes\ |
||
22 | $progs\ |
||
10747 | bpr | 23 | $courses\ |
24 | $icourses |
||
25 | !set user_supervise=!nonempty items $user_supervise |
||
10640 | bpr | 26 | !set user_supervise=!makelist $wims_superclass/x for x in $user_supervise |
17507 | guerimand | 27 | !else |
28 | !let user_supervise=!defof user_supervise in wimshome/log/classes/$wims_superclass/.users/$wims_realuser |
||
10640 | bpr | 29 | !endif |
30 | |||
4770 | guerimand | 31 | !! ----------- definition des droits de connexion supervisor |
10762 | bpr | 32 | |
33 | !!! as a supervisor |
||
10669 | bpr | 34 | !reset compsup |
4770 | guerimand | 35 | !for cls in $user_supervise |
10703 | bpr | 36 | !if $wims_class isin $cls |
37 | !let tmp=!replace internal / by , in $cls |
||
10747 | bpr | 38 | !if $tmp!=$empty |
39 | !let compsup=!append line $tmp to $compsup |
||
40 | !endif |
||
10703 | bpr | 41 | !endif |
4770 | guerimand | 42 | !next cls |
43 | !let compsup=!sh echo "$compsup" | sort | uniq; |
||
17629 | czzmrn | 44 | !! better sorting for groupement (for teachers) |
45 | !if $compsup!=$empty and $class_type=2 |
||
46 | !set compsup_=!replace internal $wims_class, by in $compsup |
||
47 | !set compsup_=!linestoitems $compsup_ |
||
48 | !set compsup_=!sort numeric items $compsup_ |
||
49 | !set compsup_=!makelist $wims_class/x for x in $compsup_ |
||
50 | !set compsup=!itemstolines $compsup_ |
||
51 | !set compsup=!replace internal / by , in $compsup |
||
52 | !endif |
||
10762 | bpr | 53 | |
10945 | bpr | 54 | !if $user_supervisable=yes and $wims_superclass isitemof $user_supervise and $wims_superclass=$wims_class |
55 | !let don=!defof class_typename,class_description,class_supervisor in wimshome/log/classes/$classrad/.def |
||
56 | <ul class="wims_subclasses"><li><span class="wims_classes_direct_portal"> |
||
12821 | bpr | 57 | !href module=adm/class/classes&type=authsupervisor&class=$wims_superclass&auth_user=supervisor $class_description (supervisor) |
10945 | bpr | 58 | </span></li> |
59 | </ul> |
||
60 | !endif |
||
10762 | bpr | 61 | !let user_participate=!defof user_participate in wimshome/log/classes/$wims_superclass/.users/$wims_realuser |
62 | |||
16684 | guerimand | 63 | !if $compsup!=$empty |
64 | !let sup_details=open |
||
10747 | bpr | 65 | !endif |
16684 | guerimand | 66 | <details $sup_details> |
67 | <summary> |
||
68 | !if $class_type=3 and $class_typename!=level |
||
69 | !!in a class |
||
70 | $U_gotoclass31 |
||
71 | !else |
||
72 | $U_gotoclass3 |
||
73 | !endif |
||
74 | </summary> |
||
75 | !let user_supervise_=$user_supervise |
||
76 | !read adm/class/graphclass supervise\ |
||
10669 | bpr | 77 | $compsup |
16780 | guerimand | 78 | !if $compsup=$empty and $courses_right=$empty |
16684 | guerimand | 79 | $U_nogotoclass |
80 | !endif |
||
81 | </details> |
||
4770 | guerimand | 82 | |
16684 | guerimand | 83 | !if $user_participate=$empty or $wims_class notin $user_participate |
10747 | bpr | 84 | !exit |
10674 | bpr | 85 | !endif |
10762 | bpr | 86 | |
16685 | bpr | 87 | !!! as a student |
17179 | bpr | 88 | <br> |
16684 | guerimand | 89 | !changeto subclasses_user.phtml |
90 | |||
16685 | bpr | 91 | !! no more in use. use directly subclasses_user.phtml file |
16684 | guerimand | 92 | |
10669 | bpr | 93 | !reset compsup |
10762 | bpr | 94 | !if $class_type=3 and $class_typename!=level |
12821 | bpr | 95 | !!in a class |
96 | $U_gotoclass11 |
||
10762 | bpr | 97 | !else |
12821 | bpr | 98 | $U_gotoclass1 |
10762 | bpr | 99 | !endif |
10669 | bpr | 100 | |
101 | !for cls in $user_participate |
||
10703 | bpr | 102 | !if $wims_class isin $cls |
103 | !let tmp=!replace internal / by , in $cls |
||
10747 | bpr | 104 | !if $tmp!=$empty |
105 | !let compsup=!append line $tmp to $compsup |
||
106 | !endif |
||
10703 | bpr | 107 | !endif |
10669 | bpr | 108 | !next cls |
109 | |||
110 | !let compsup=!sh echo "$compsup" | sort | uniq; |
||
10747 | bpr | 111 | !let user_participate_=$user_participate |
112 | !read adm/class/graphclass participate\ |
||
10669 | bpr | 113 | $compsup |