Subversion Repositories wimsdev

Rev

Rev 12885 | Rev 15267 | 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)
33 reyssat 4
!if $wims_supertype!=0 and\
12821 bpr 5
    ($wims_supertype!=2 or $wims_typename!=class) and\
6
    ($wims_supertype!=4 or $wims_typename notitemof class,course)
7
  !exit
33 reyssat 8
!endif
11979 guerimand 9
 
13713 guerimand 10
!! link cdt display in any case for supervisor
7926 bpr 11
!if $wims_user=supervisor
12
  exist_cdt=yes
11979 guerimand 13
  !exit
7926 bpr 14
!endif
11979 guerimand 15
 
13713 guerimand 16
!! ------- display cdt for class (alone) ; class (in groupement) ; course (in portal) for class in  portal see next test
17
!if $wims_supertype=0 or ($wims_supertype=4 and $wims_typename=course) or ($wims_supertype=2 and $wims_typename=class)
12821 bpr 18
  tmp=!defof cdt_nbdate\
11979 guerimand 19
cdt_link\
20
cdt_hide in wimshome/log/classes/$wims_class/cdt/.def
12885 guerimand 21
  !distribute line $tmp into tmp2,tmp,tmp3
22
  !if $tmp3=yes or $tmp2<=0
12821 bpr 23
    !exit
24
  !endif
25
  exist_cdt=yes
26
  !if $tmp!=$empty
27
    wims_name_cdt=$tmp
28
    ADD_cdt=$wims_name_cdt
29
  !endif
33 reyssat 30
!endif
31
 
13713 guerimand 32
 
33
!!--------- 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 34
!if $wims_supertype=4 and $wims_typename=class
12821 bpr 35
  lt_cdt=!record 0 of wimshome/log/classes/$wims_class/courses
36
  lt_cdt=!column 1 of $lt_cdt
37
  !for k in $lt_cdt
38
    tmp=!defof cdt_nbdate,cdt_hide in wimshome/log/classes/$wims_superclass/$k/cdt/.def
39
    !if $(tmp[1])>0 and $(tmp[2])!=yes
40
      exist_cdt=yes
41
      !exit
42
    !endif
43
  !next k
33 reyssat 44
!endif
13713 guerimand 45