--- loncom/cgi/userstatus.pl 2008/12/25 01:56:03 1.18
+++ loncom/cgi/userstatus.pl 2021/03/06 19:09:03 1.22
@@ -1,7 +1,7 @@
#!/usr/bin/perl
$|=1;
# User Status
-# $Id: userstatus.pl,v 1.18 2008/12/25 01:56:03 raeburn Exp $
+# $Id: userstatus.pl,v 1.22 2021/03/06 19:09:03 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -73,7 +73,7 @@ sub main {
delete $$perlvar{'lonReceipt'}; # remove since sensitive and not needed
delete $$perlvar{'lonSqlAccess'}; # remove since sensitive and not needed
- if (!&LONCAPA::lonauthcgi::check_ipbased_access()) {
+ if (!&LONCAPA::lonauthcgi::check_ipbased_access('userstatus')) {
if (!&LONCAPA::loncgi::check_cookie_and_load_env()) {
&Apache::lonlocal::get_language_handle();
print &LONCAPA::loncgi::missing_cookie_msg();
@@ -114,6 +114,7 @@ sub main {
Course => 'Course',
Browser => 'Browser',
OS => 'OS',
+ Any => 'Any',
Active => 'Active',
'Moderately Active' => 'Moderately Active',
Inactive => 'Inactive',
@@ -121,7 +122,13 @@ sub main {
unless ($oneline) {
my $now = time();
- print '
'."\n".
+ print ''."\n".
+ ''."\n"."\n".
+ ''."\n".
+ ''."\n".
+ 'LON-CAPA '.$lt{'usrs'}.''."\n".
+ ''."\n".
+ ''."\n".
"$lt{'usrs'} ".&Apache::lonlocal::locallocaltime($now).'
';
}
@@ -131,6 +138,7 @@ sub main {
foreach my $filename (@allfiles) {
if ($filename=~/^\./) { next; }
if ($filename=~/^publicuser_/) { next; }
+ if ($filename=~/^[a-f0-9]+_(linked|lti_\d+)\.id$/) { next; }
my ($dev,$ino,$mode,$nlink,
$uid,$gid,$rdev,$size,
$atime,$mtime,$ctime,
@@ -154,18 +162,18 @@ sub main {
}
if (!$justsummary) {
$users{$userclass}{$filename} .=
- ''.
+ ''.
'
'.$userinfo{'environment.lastname'}.', '.
$userinfo{'environment.firstname'}.' '.
$userinfo{'environment.middlename'}.' '.
$userinfo{'environment.generation'}." (".
- $userinfo{'user.name'}."\@".$userinfo{'user.domain'}.
+ $userinfo{'user.name'}.":".$userinfo{'user.domain'}.
")
\n".
"
$filename
".
"
$lt{'login'}: ".
&Apache::lonlocal::locallocaltime($userinfo{'user.login.time'}).
"
$lt{'Browser'}: ".$userinfo{'browser.type'}.
- " $lt{'on'} ".$userinfo{'browser.os'}."
$lt{'Client'}:".
+ " $lt{'on'} ".$userinfo{'browser.os'}."
$lt{'Client'}:".
$userinfo{'request.host'}."
\n
$lt{'role'}: ".
$userinfo{'request.role'}." ";
}
@@ -191,7 +199,7 @@ sub main {
"
$lt{'ltra'}: ".&Apache::lonlocal::locallocaltime($mtime).
" (".$since." $lt{'secs'})
$lt{'lacc'}: ".
&Apache::lonlocal::locallocaltime($atime)." (".$sinceacc." $lt{'secs'})".
- "";
+ "
";
}
}
untie(%userinfo);
@@ -219,7 +227,7 @@ sub main {
&show('OS',\%lt,%usercount);
# print "\n";
- print "$lt{'load'}: ".$loadavg;
+ print "$lt{'load'}: ".$loadavg;
print "";
} else {
foreach my $l1 (sort keys %usercount) {
@@ -259,8 +267,8 @@ sub showact {
my ($cat,$ltref,%usercount)=@_;
print("$ltref->{$cat}
\n");
- print(" | ");
- print(join(" | ",('Any',@actl)));
+ print(" | ");
+ print(join(" | ",(map {$ltref->{$_}; {'Any',@actl)));
print(" | ");
foreach my $type (sort(keys(%{$usercount{$cat}}))) {
print("$type | ");
@@ -272,7 +280,8 @@ sub showact {
}
print("$count | ");
print($temp);
+ print(' ');
}
- print(" \n");
+ print(" |
---|
\n");
}