Rev 5352 | Rev 5420 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
5220 | guerimand | 1 | !! output : whoconnect=list of connected participant |
2 | !! numpartconnected=number of participant connected |
||
3 | !! in wims_class |
||
4 | !! |
||
5 | !! |
||
6 | |||
5352 | guerimand | 7 | !if $wims_user=supervisor |
8 | !let file_=!replace internal / by ~ in $wims_class |
||
9 | last_=!sh if [ -e $wims_home/s2/$wims_session/whoconnect.$file_ ]; then\ |
||
5419 | guerimand | 10 | perl -e '@a = stat($ARGV[0]); print $a[9]' $wims_home/s2/$wims_session/whoconnect.$file_;\ |
5279 | guerimand | 11 | fi; |
5352 | guerimand | 12 | !default $last_=0 |
13 | !if $wims_nowseconds-$last_>300 or $wims_read_parm=1 |
||
14 | ses_=!sh cd $wims_home/sessions;\ |
||
15 | grep -r wims_class=$wims_class ./*/var.stat | cut -d/ -f2; |
||
16 | ses_=!words2items $ses_ |
||
17 | whoconnect=$empty |
||
18 | !for s_ in $ses_ |
||
19 | t_=!defof wims_user\ |
||
5220 | guerimand | 20 | wims_firstname\ |
21 | wims_lastname in wimshome/sessions/$s_/var.stat |
||
5352 | guerimand | 22 | !distribute line $t_ into t1_,t2_,t3_ |
23 | !if $t1_!=supervisor |
||
24 | whoconnect=!append line $t1_,$s_,$t2_,$t3_ to $whoconnect |
||
25 | !endif |
||
26 | !next s_ |
||
27 | !writefile wimshome/s2/$wims_session/whoconnect.$file_ $whoconnect |
||
28 | !else |
||
29 | whoconnect=!record 0 of wimshome/s2/$wims_session/whoconnect.$file_ |
||
30 | !endif |
||
31 | numpartconnected=!linecnt $whoconnect |
||
32 | !setdef user_connected=$wims_session in wimshome/log/classes/$wims_class/supconnected |
||
33 | !else |
||
34 | supervisorconnected=!defof user_connected in wimshome/log/classes/$wims_class/supconnected |
||
35 | !if $supervisorconnected!=$empty |
||
36 | test_=!defof wims_user in wimshome/sessions/$supervisorconnected/var.stat |
||
37 | !if $test_=$empty |
||
38 | !reset supervisorconnected |
||
39 | !setdef user_connected=$empty in wimshome/log/classes/$wims_class/supconnected |
||
5220 | guerimand | 40 | !endif |
5352 | guerimand | 41 | !endif |
5419 | guerimand | 42 | !endif |