Rev 5419 | Rev 5426 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
!! output : whoconnect=list of connected participant
!! numpartconnected=number of participant connected
!! in wims_class
!!
!!
!if $wims_user=supervisor
!let file_=!replace internal / by ~ in $wims_class
last_=!sh if [ -e $wims_home/tmp/whoconnect/$file_ ]; then\
perl -e '@a = stat($ARGV[0]); print $a[9]' $wims_home/tmp/whoconnect/$file_;\
fi;
!default $last_=0
!if $wims_nowseconds-$last_>300 or $wims_read_parm=1
ses_=!sh cd $wims_home/sessions;\
grep -r wims_class=$wims_class ./*/var.stat | cut -d/ -f2;
ses_=!words2items $ses_
whoconnect=$empty
!for s_ in $ses_
t_=!defof wims_user\
wims_firstname\
wims_lastname in wimshome/sessions/$s_/var.stat
!distribute line $t_ into t1_,t2_,t3_
!if $t1_!=supervisor
whoconnect=!append line $t1_,$s_,$t2_,$t3_ to $whoconnect
!endif
!next s_
!writefile wimshome/tmp/whoconnect/$file_ $whoconnect
!else
whoconnect=!record 0 of wimshome/tmp/whoconnect/$file_
!endif
numpartconnected=!linecnt $whoconnect
!setdef user_connected=$wims_session in wimshome/tmp/whoconnect/sup$file_
!else
supervisorconnected=!defof user_connected in wimshome/tmp/whoconnect/sup$file_
!if $supervisorconnected!=$empty
test_=!defof wims_user in wimshome/sessions/$supervisorconnected/var.stat
!if $test_=$empty
!reset supervisorconnected
!setdef user_connected=$empty in wimshome/tmp/whoconnect/sup$file_
!endif
!endif
!endif