--- loncom/lonnet/perl/lonnet.pm 2003/08/20 01:13:56 1.403 +++ loncom/lonnet/perl/lonnet.pm 2003/08/25 17:20:09 1.405 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.403 2003/08/20 01:13:56 www Exp $ +# $Id: lonnet.pm,v 1.405 2003/08/25 17:20:09 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -245,6 +245,16 @@ sub critical { } return $answer; } + +# -------------- Remove all key from the env that start witha lowercase letter +# (Which is alweways a lon-capa value) +sub cleanenv { + foreach my $key (keys(%ENV)) { + if ($key =~ /^[a-z]/) { + delete($ENV{$key}); + } + } +} # ------------------------------------------- Transfer profile into environment @@ -379,8 +389,8 @@ sub userload { my $curtime=time; while ($filename=readdir(LONIDS)) { if ($filename eq '.' || $filename eq '..') {next;} - my ($atime)=(stat($perlvar{'lonIDsDir'}.'/'.$filename))[8]; - if ($curtime-$atime < 3600) { $numusers++; } + my ($mtime)=(stat($perlvar{'lonIDsDir'}.'/'.$filename))[9]; + if ($curtime-$mtime < 3600) { $numusers++; } } closedir(LONIDS); }