Subversion Repositories wimsdev

Rev

Rev 17037 | Rev 17153 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 17037 Rev 17094
Line 1... Line 1...
1
!if $wims_show_stat!=yes
1
!if $wims_show_stat!=yes
2
  error=nostat
2
  error=nostat
3
  notallowed=1
3
  notallowed=1
4
  !exit
4
  !exit
5
!endif
5
!endif
6
!!
-
 
7
!! temporary fix, need to be checked with portals
-
 
8
!!
-
 
9
!! for groupements, data are stored in a uniq file
-
 
10
!! (ccaccount/$wims_superclas) for the groupement and all the
6
!! ------- get date for using new ccsum script (separate activity in a groupement/portal)
11
!! subclasses. With this fix, workingtime.proc shows the working time
7
newccsum=!record 0 of wimshome/log/ccaccount/newccsum
12
!! in all subclasses
8
!default newccsum=0
13
!!
-
 
14
classtype=!defof class_type in wimshome/log/classes/$wims_class/.def
9
classtype=!defof class_type in wimshome/log/classes/$wims_class/.def
15
!if $classtype=1
10
!if $classtype=1 and $class_creation<$newccsum
16
  statclass=$wims_superclass
11
  statclass=$wims_superclass
17
!else
12
!else
18
  statclass=$wims_class
13
  statclass=$wims_class
19
!endif
14
!endif
20
!if $wims_user!=supervisor
15
!if $wims_user!=supervisor
Line 51... Line 46...
51
dnum=!word 1 of $output
46
dnum=!word 1 of $output
52
!readproc adm/calendar.proc endmonth $date
47
!readproc adm/calendar.proc endmonth $date
53
wnum=$[ceil(($output-(7-$dnum+1))/7)+1]
48
wnum=$[ceil(($output-(7-$dnum+1))/7)+1]
54
test=!fileexists wimshome/sessions/$wims_session/$user.st
49
test=!fileexists wimshome/sessions/$wims_session/$user.st
55
!if $test!=yes
50
!if $test!=yes
-
 
51
  !if $statclass!=$wims_class
56
  test=!sh if [ -e $wims_home/log/ccaccount/$statclass/$user ]; then\
52
    !sh if [ -e $wims_home/log/ccaccount/$statclass/$user ]; then\
57
             awk -F" " 'BEGIN {d=0;v=0} {if (substr($$1,1,8)==d) {v+=$$2} else {if (d!=0) print ":"d","v;d=substr($$1,1,8);v=$$2}}' $wims_home/log/ccaccount/$statclass/$user > $wims_home/sessions/$wims_session/$user.st;\
53
             awk -F" " 'BEGIN {d=0;v=0} substr($$1,1,8)<$newccsum {if (substr($$1,1,8)==d){v+=$$2} else {if (d!=0) print ":"d","v;d=substr($$1,1,8);v=$$2}} END{if (d!=0) print ":"d","v}' $wims_home/log/ccaccount/$statclass/$user > $wims_home/sessions/$wims_session/$user.st;\
-
 
54
        fi
-
 
55
  !endif
-
 
56
  !sh if [ -e $wims_home/log/ccaccount/$wims_class/$user ]; then\
-
 
57
             awk -F" " 'BEGIN {d=0;v=0} {if (substr($$1,1,8)==d) {v+=$$2} else {if (d!=0) print ":"d","v;d=substr($$1,1,8);v=$$2}} END{if (d!=0) print ":"d","v}' $wims_home/log/ccaccount/$wims_class/$user >> $wims_home/sessions/$wims_session/$user.st;\
58
           fi
58
           fi
59
!endif
59
!endif
60
nbactivity=!recordcnt wimshome/sessions/$wims_session/$user.st
60
nbactivity=!recordcnt wimshome/sessions/$wims_session/$user.st
61
!if $nbactivity>0
61
!if $nbactivity>0
62
  cpta=0
62
  cpta=0