Subversion Repositories wimsdev

Compare Revisions

Ignore whitespace Rev 11978 → Rev 11979

/trunk/wims/public_html/modules/home/var.cdt
5,41 → 5,35
($wims_supertype!=4 or $wims_typename notitemof class,course)
!exit
!endif
 
!if $wims_user=supervisor
exist_cdt=yes
!exit
!endif
!if $wims_user=supervisor or $wims_supertype=0 or ($wims_supertype=4 and $wims_typename=class)
tmp=!defof cdt_link in wimshome/log/classes/$wims_class/cdt/.def
 
!if $wims_supertype=0 or ($wims_supertype=4 and $wims_typename=course)
tmp=!defof cdt_nbdate\
cdt_link\
cdt_hide in wimshome/log/classes/$wims_class/cdt/.def
!distribute line $tmp into tmp,tmp2,tmp3
!if $tmp3=yes or $tmp2<=0
!exit
!endif
exist_cdt=yes
!if $tmp!=$empty
wims_name_cdt=$tmp
ADD_cdt=$wims_name_cdt
!endif
!endif
!exit
 
!!if ($wims_supertype=4 and $wims_typename=class)
!! lt_cdt=!record 0 of wimshome/log/classes/$wims_class/courses
!! lt_cdt=!column 1 of $lt_cdt
!if $wims_supertype=4 and $wims_typename=class
lt_cdt=!record 0 of wimshome/log/classes/$wims_class/courses
lt_cdt=!column 1 of $lt_cdt
!for k in $lt_cdt
tmp=!defof cdt_nbdate in wimshome/log/classes/$wims_superclass/$k/cdt/.def
!if $tmp>0
tmp=!defof cdt_nbdate,cdt_hide in wimshome/log/classes/$wims_superclass/$k/cdt/.def
!if $(tmp[1])>0 and $(tmp[2])!=yes
exist_cdt=yes
!exit
!endif
!next k
!exit
!!endif
!!never going here
 
!if $wims_supertype=0 or
tmp=!defof cdt_nbdate\
cdt_link in wimshome/log/classes/$wims_class/cdt/.def
!distribute line $tmp into tmp1,tmp2
!if $tmp1>0
exist_cdt=yes
!endif
!if $tmp2!=$empty
wims_name_cdt=$tmp2
ADD_cdt=$wims_name_cdt
!endif
!endif