version 1.561, 2020/03/30 11:04:03
|
version 1.563, 2020/05/05 20:24:41
|
Line 4887 sub course_sessions_handler {
|
Line 4887 sub course_sessions_handler {
|
next if ($filename=~/^\./); |
next if ($filename=~/^\./); |
next if ($filename=~/^publicuser_/); |
next if ($filename=~/^publicuser_/); |
next if ($filename=~/^[a-f0-9]+_(linked|lti_\d+)\.id$/); |
next if ($filename=~/^[a-f0-9]+_(linked|lti_\d+)\.id$/); |
if ($filename =~ /^($LONCAPA::match_user)_\d+_($LONCAPA::match_domain)_/) { |
if ($filename =~ /^($LONCAPA::match_username)_\d+_($LONCAPA::match_domain)_/) { |
my ($uname,$udom) = ($1,$2); |
my ($uname,$udom) = ($1,$2); |
next unless (-e "$perlvar{'lonDaemons'}/$uname$dbsuffix"); |
next unless (-e "$perlvar{'lonDaemons'}/tmp/$uname$dbsuffix"); |
my $mtime = (stat("$perlvar{'lonIDsDir'}/$filename"))[9]; |
my $mtime = (stat("$perlvar{'lonIDsDir'}/$filename"))[9]; |
my $since=$now-$mtime; |
|
if ($lastactivity < 0) { |
if ($lastactivity < 0) { |
next if ($since <= $lastactivity); |
next if ($mtime-$now > $lastactivity); |
} else { |
} else { |
next if ($since > $lastactivity); |
next if ($now-$mtime > $lastactivity); |
} |
} |
$sessions{$uname.':'.$udom} = $mtime; |
$sessions{$uname.':'.$udom} = $mtime; |
} |
} |