Rev 16685 | Go to most recent revision | 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 user_participate=!defof user_participate in wimshome/log/classes/$wims_superclass/.users/$wims_realuser |
10674 | bpr | 6 | !if $user_participate=$empty |
7 | !exit |
||
8 | !endif |
||
10651 | bpr | 9 | !set levels=!record 0 of wimshome/log/classes/$wims_class/levels |
10 | !set levelcnt=!linecnt $levels |
||
10640 | bpr | 11 | !set classes=!record 0 of wimshome/log/classes/$wims_class/classes |
12 | !set classcnt=!linecnt $classes |
||
13 | !set progs=!record 0 of wimshome/log/classes/$wims_class/programs |
||
14 | !set progcnt=!linecnt $progs |
||
15 | |||
10651 | bpr | 16 | !!if $classcnt+$progcnt>=1 |
10640 | bpr | 17 | !set courses=!record 0 of wimshome/log/classes/$wims_class/courses |
18 | !set coursecnt=!linecnt $courses |
||
10651 | bpr | 19 | !!endif |
10640 | bpr | 20 | !set icourses=!record 0 of wimshome/log/classes/$wims_class/icourses |
21 | !set icoursecnt=!linecnt $icourses |
||
22 | |||
10651 | bpr | 23 | !!add the compulsory courses |
10640 | bpr | 24 | |
10651 | bpr | 25 | !for cls in $user_participate |
26 | !set sub_=!record 0 of wimshome/log/classes/$cls/courses |
||
27 | !set sub_cnt=!linecnt $sub_ |
||
28 | !if $sub_cnt>0 |
||
13147 | bpr | 29 | !for k_=1 to $sub_cnt |
30 | !set parent_c=!defof class_parent in wimshome/log/classes/$wims_superclass/$(sub_[$k_;1])/.def |
||
31 | !set split=!replace internal / by , in $(sub_[$k_;1]) |
||
32 | !set progstyle=!defof class_progstyle in wimshome/log/classes/$wims_superclass/$(split[1])/$(split[3])/.def |
||
33 | !if optional iswordof $progstyle |
||
34 | !set inscrit=!defof user_class in wimshome/log/classes/$wims_superclass/$(sub_[$k_;1])/.users/$wims_user |
||
35 | !endif |
||
36 | !if mandatory iswordof $progstyle or $(split[1])/$(split[2]) iswordof $inscrit |
||
37 | !set user_participate=!append item $wims_superclass/$(sub_[$k_;1]) to $user_participate |
||
38 | !else |
||
39 | !set user_optional=!append item $wims_superclass/$(sub_[$k_;1]) to $user_optional |
||
40 | !endif |
||
41 | !next |
||
10651 | bpr | 42 | !endif |
16684 | guerimand | 43 | !next cls |
10651 | bpr | 44 | |
4770 | guerimand | 45 | !let compsup=$empty |
13147 | bpr | 46 | !for cls in $user_participate,$user_optional |
10703 | bpr | 47 | !if $wims_class isin $cls |
48 | !let tmp=!replace internal / by , in $cls |
||
49 | !let compsup=!append line $tmp to $compsup |
||
50 | !endif |
||
4770 | guerimand | 51 | !next cls |
10747 | bpr | 52 | !set user_participate_=$user_participate |
4770 | guerimand | 53 | !let compsup=!sh echo "$compsup" | sort | uniq; |
17626 | czzmrn | 54 | !! better sorting for groupement (for students) |
55 | !if $class_type=2 |
||
56 | !set compsup_=!replace internal $wims_class, by in $compsup |
||
57 | !set compsup_=!linestoitems $compsup_ |
||
58 | !set compsup_=!sort numeric items $compsup_ |
||
59 | !set compsup_=!makelist $wims_class/x for x in $compsup_ |
||
60 | !set compsup=!itemstolines $compsup_ |
||
61 | !set compsup=!replace internal / by , in $compsup |
||
62 | !endif |
||
10747 | bpr | 63 | |
16684 | guerimand | 64 | !if $supervisable=yes |
65 | !if $compsup!=$empty |
||
66 | !if $sup_details!=open |
||
67 | !let tmp=open |
||
68 | !endif |
||
69 | <details $tmp> |
||
70 | <summary> |
||
71 | !if $class_type=3 and $class_typename!=level |
||
72 | !!in a class |
||
73 | $U_gotoclass11 |
||
74 | !else |
||
75 | $U_gotoclass1 |
||
76 | !endif |
||
77 | </summary> |
||
78 | !read adm/class/graphclass participate\ |
||
16685 | bpr | 79 | $compsup |
16684 | guerimand | 80 | </details> |
81 | !endif |
||
10762 | bpr | 82 | !else |
16684 | guerimand | 83 | !if $class_type=3 and $class_typename!=level |
16685 | bpr | 84 | $U_gotoclass01 |
16684 | guerimand | 85 | !else |
16685 | bpr | 86 | $U_gotoclass0 |
16684 | guerimand | 87 | !endif |
88 | !read adm/class/graphclass participate\ |
||
89 | $compsup |
||
10762 | bpr | 90 | !endif |