version 1.47, 2002/06/18 19:39:13
|
version 1.49, 2002/06/24 14:22:05
|
Line 204 sub courselog {
|
Line 204 sub courselog {
|
while ($line=<IN>) { |
while ($line=<IN>) { |
chomp($line); |
chomp($line); |
my ($timestamp,$host,$log)=split(/\:/,$line); |
my ($timestamp,$host,$log)=split(/\:/,$line); |
foreach (split(/\&/,&unescape($log))) { |
# |
my ($time,$res,$uname,$udom,$action,$values)=split(/\:/,$_); |
# $log has the actual log entries; currently still escaped, and |
|
# %26(timestamp)%3a(url)%3a(user)%3a(domain) |
|
# then additionally |
|
# %3aPOST%3a(name)%3d(value)%3a(name)%3d(value) |
|
# or |
|
# %3aCSTORE%3a(name)%3d(value)%26(name)%3d(value) |
|
# |
|
# get delimiter between timestamped entries to be &&& |
|
$log=~s/\%26(\d+)\%3a/\&\&\&$1\%3a/g; |
|
# now go over all log entries |
|
foreach (split(/\&\&\&/,&unescape($log))) { |
|
my ($time,$res,$uname,$udom,$action,@values)=split(/\:/,$_); |
|
my $values=&unescape(join(':',@values)); |
|
$values=~s/\&/\:/g; |
|
$res=&unescape($res); |
my $include=1; |
my $include=1; |
if (($filters{'username'}) && ($uname ne $filters{'username'})) |
if (($filters{'username'}) && ($uname ne $filters{'username'})) |
{ $include=0; } |
{ $include=0; } |
Line 224 sub courselog {
|
Line 238 sub courselog {
|
if (($filters{'action'} eq 'grade') && ($action ne 'CSTORE')) |
if (($filters{'action'} eq 'grade') && ($action ne 'CSTORE')) |
{ $include=0; } |
{ $include=0; } |
if ($include) { |
if ($include) { |
push(@results,$time.':'.$res.':'.$uname.':'.$udom.':'. |
push(@results,($time<1000000000?'0':'').$time.':'.$res.':'. |
|
$uname.':'.$udom.':'. |
$action.':'.$values); |
$action.':'.$values); |
} |
} |
} |
} |
Line 249 sub userlog {
|
Line 264 sub userlog {
|
my ($timestamp,$host,$log)=split(/\:/,$line); |
my ($timestamp,$host,$log)=split(/\:/,$line); |
$log=&unescape($log); |
$log=&unescape($log); |
my $include=1; |
my $include=1; |
|
if (($filters{'start'}) && ($timestamp<$filters{'start'})) |
|
{ $include=0; } |
|
if (($filters{'end'}) && ($timestamp>$filters{'end'})) |
|
{ $include=0; } |
if (($filters{'action'} eq 'log') && ($log!~/^Log/)) { $include=0; } |
if (($filters{'action'} eq 'log') && ($log!~/^Log/)) { $include=0; } |
|
if (($filters{'action'} eq 'check') && ($log!~/^Check/)) |
|
{ $include=0; } |
if ($include) { |
if ($include) { |
push(@results,$timestamp.':'.$log); |
push(@results,$timestamp.':'.$log); |
} |
} |