Subversion Repositories wimsdev

Rev

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

Rev 5420 Rev 5426
Line 2... Line 2...
2
!!          numpartconnected=number of participant connected
2
!!          numpartconnected=number of participant connected
3
!! in wims_class
3
!! in wims_class
4
!!
4
!! output for supervisor :
-
 
5
!! wims_whoconnect (tabular one line by participant) login,session,firstname,lastname
-
 
6
!! wims_connectedlogin : list of connected login
-
 
7
!! wims_numpartconnected : number of connected participant.
5
!!
8
!! output for other user :
-
 
9
!! wims_supervisorconnected
6
 
10
 
-
 
11
 
-
 
12
!let file_=!replace internal / by ~ in $wims_class
7
!if $wims_user=supervisor
13
!if $wims_user=supervisor
8
 !let file_=!replace internal / by ~ in $wims_class
-
 
9
 last_=!sh if [ -e $wims_home/tmp/whoconnect/$file_ ]; then\
14
 last_=!sh if [ -e $wims_home/tmp/whoconnect/$file_ ]; then\
10
perl -e '@a = stat($ARGV[0]); print $a[9]' $wims_home/tmp/whoconnect/$file_;\
15
perl -e '@a = stat($ARGV[0]); print $a[9]' $wims_home/tmp/whoconnect/$file_;\
11
fi;
16
fi;
12
 !default $last_=0
17
 !default $last_=0
13
 !if $wims_nowseconds-$last_>300 or $wims_read_parm=1
18
 !if $wims_nowseconds-$last_>300 or $wims_read_parm=1
14
  ses_=!sh cd $wims_home/sessions;\
19
  ses_=!sh cd $wims_home/sessions;\
15
  grep -r wims_class=$wims_class ./*/var.stat | cut -d/ -f2;
20
  grep -r wims_class=$wims_class ./*/var.stat | cut -d/ -f2;
16
  ses_=!words2items $ses_
21
  ses_=!words2items $ses_
17
  whoconnect=$empty
22
  wims_whoconnect=$empty
18
  !for s_ in $ses_
23
  !for s_ in $ses_
19
   t_=!defof wims_user\
24
   t_=!defof wims_user\
20
wims_firstname\
25
wims_firstname\
21
wims_lastname in wimshome/sessions/$s_/var.stat
26
wims_lastname in wimshome/sessions/$s_/var.stat
22
   !distribute line $t_ into t1_,t2_,t3_
27
   !distribute line $t_ into t1_,t2_,t3_
23
   !if $t1_!=supervisor
28
   !if $t1_!=supervisor
24
    whoconnect=!append line $t1_,$s_,$t2_,$t3_ to $whoconnect
29
    wims_whoconnect=!append line $t1_,$t2_,$t3_,$s_ to $wims_whoconnect
25
   !endif
30
   !endif
26
  !next s_
31
  !next s_
27
  !writefile wimshome/tmp/whoconnect/$file_ $whoconnect
32
  !writefile wimshome/tmp/whoconnect/$file_ $wims_whoconnect
28
 !else
33
 !else
29
  whoconnect=!record 0 of wimshome/tmp/whoconnect/$file_
34
  wims_whoconnect=!record 0 of wimshome/tmp/whoconnect/$file_
30
 !endif
35
 !endif
-
 
36
 wims_connectedlogin=!column 1 of $wims_whoconnect
31
 numpartconnected=!linecnt $whoconnect
37
 wims_numpartconnected=!linecnt $wims_whoconnect
32
 !setdef user_connected=$wims_session in wimshome/tmp/whoconnect/sup$file_
38
 !setdef user_connected=$wims_session in wimshome/tmp/whoconnect/sup$file_
33
!else
39
!else
34
 supervisorconnected=!defof user_connected in wimshome/tmp/whoconnect/sup$file_
40
 wims_supervisorconnected=!defof user_connected in wimshome/tmp/whoconnect/sup$file_
35
 !if $supervisorconnected!=$empty
41
 !if $wims_supervisorconnected!=$empty
36
  test_=!defof wims_user in wimshome/sessions/$supervisorconnected/var.stat
42
  test_=!defof wims_user in wimshome/sessions/$wims_supervisorconnected/var.stat
37
  !if $test_=$empty
43
  !if $test_=$empty
38
   !reset supervisorconnected
44
   !reset wims_supervisorconnected
39
   !setdef user_connected=$empty in wimshome/tmp/whoconnect/sup$file_
45
   !setdef user_connected=$empty in wimshome/tmp/whoconnect/sup$file_
40
  !endif
46
  !endif
41
 !endif
47
 !endif
42
!endif
48
!endif