Rev 13713 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
7926 | bpr | 1 | !reset exist_cdt |
33 | reyssat | 2 | |
13713 | guerimand | 3 | !! test situation for displaying cdt (other level have no access to cdt) |
15267 | guerimand | 4 | !readproc adm/linkmodule/cdt.proc |
5 | !if $wims_allowlink_cdt!=yes |
||
12821 | bpr | 6 | !exit |
33 | reyssat | 7 | !endif |
11979 | guerimand | 8 | |
13713 | guerimand | 9 | !! link cdt display in any case for supervisor |
7926 | bpr | 10 | !if $wims_user=supervisor |
11 | exist_cdt=yes |
||
11979 | guerimand | 12 | !exit |
7926 | bpr | 13 | !endif |
11979 | guerimand | 14 | |
15267 | guerimand | 15 | !! -------- check link for user |
16 | |||
17 | !! display cdt for class (alone) ; class (in groupement) ; course (in portal) for class in portal see next test |
||
13713 | guerimand | 18 | !if $wims_supertype=0 or ($wims_supertype=4 and $wims_typename=course) or ($wims_supertype=2 and $wims_typename=class) |
12821 | bpr | 19 | tmp=!defof cdt_nbdate\ |
11979 | guerimand | 20 | cdt_link\ |
21 | cdt_hide in wimshome/log/classes/$wims_class/cdt/.def |
||
12885 | guerimand | 22 | !distribute line $tmp into tmp2,tmp,tmp3 |
23 | !if $tmp3=yes or $tmp2<=0 |
||
12821 | bpr | 24 | !exit |
25 | !endif |
||
26 | exist_cdt=yes |
||
27 | !if $tmp!=$empty |
||
28 | wims_name_cdt=$tmp |
||
29 | ADD_cdt=$wims_name_cdt |
||
30 | !endif |
||
33 | reyssat | 31 | !endif |
32 | |||
13713 | guerimand | 33 | |
15267 | guerimand | 34 | !! in a portal cdt display in a class if there is one open cdt in one of the course of the class (in the class cdt will be summary of all cdt course) |
11979 | guerimand | 35 | !if $wims_supertype=4 and $wims_typename=class |
12821 | bpr | 36 | lt_cdt=!record 0 of wimshome/log/classes/$wims_class/courses |
37 | lt_cdt=!column 1 of $lt_cdt |
||
38 | !for k in $lt_cdt |
||
39 | tmp=!defof cdt_nbdate,cdt_hide in wimshome/log/classes/$wims_superclass/$k/cdt/.def |
||
40 | !if $(tmp[1])>0 and $(tmp[2])!=yes |
||
41 | exist_cdt=yes |
||
42 | !exit |
||
43 | !endif |
||
44 | !next k |
||
33 | reyssat | 45 | !endif |
13713 | guerimand | 46 | |
15267 | guerimand | 47 | ! ---------- end check link for user |