version 1.184, 2001/12/06 19:23:42
|
version 1.185, 2001/12/06 21:03:02
|
Line 172 use Apache::File;
|
Line 172 use Apache::File;
|
use LWP::UserAgent(); |
use LWP::UserAgent(); |
use HTTP::Headers; |
use HTTP::Headers; |
use vars |
use vars |
qw(%perlvar %hostname %homecache %hostip %spareid %hostdom %libserv %pr %prp %fe %fd %metacache %packagetab %courselogs %accesshash); |
qw(%perlvar %hostname %homecache %hostip %spareid %hostdom %libserv %pr %prp %fe %fd %metacache %packagetab %courselogs %accesshash $processmarker); |
use IO::Socket; |
use IO::Socket; |
use GDBM_File; |
use GDBM_File; |
use Apache::Constants qw(:common :http); |
use Apache::Constants qw(:common :http); |
Line 769 sub flushcourselogs {
|
Line 769 sub flushcourselogs {
|
} |
} |
} |
} |
} keys %courselogs; |
} keys %courselogs; |
|
&logthis('Flushing access logs'); |
|
map { |
|
my $entry=$_; |
|
$entry=~/\_\_\_(\w+)\/(\w+)\/(.*)\_\_\_(\w+)$/; |
|
my %temphash=($entry => $accesshash{$entry}); |
|
if (&Apache::lonnet::put('resevaldata',\%temphash,$1,$2) eq 'ok') { |
|
delete $accesshash{$entry}; |
|
} |
|
} keys %accesshash; |
} |
} |
|
|
sub courselog { |
sub courselog { |
Line 799 sub courseacclog {
|
Line 808 sub courseacclog {
|
&courselog($what); |
&courselog($what); |
} |
} |
|
|
|
sub countacc { |
|
my $url=&declutter(shift); |
|
unless ($ENV{'request.course.id'}) { return ''; } |
|
$accesshash{$ENV{'request.course.id'}.'___'.$url.'___course'}=1; |
|
my $key=$processmarker.'___'.$url.'___count'; |
|
if (defined($accesshash{$key})) { |
|
$accesshash{$key}++; |
|
} else { |
|
$accesshash{$key}=1; |
|
} |
|
} |
|
|
# ----------------------------------------------------------- Check out an item |
# ----------------------------------------------------------- Check out an item |
|
|
sub checkout { |
sub checkout { |
Line 2711 BEGIN {
|
Line 2732 BEGIN {
|
|
|
%metacache=(); |
%metacache=(); |
|
|
|
$processmarker=$$.'_'.time.'_'.$perlvar{'lonHostID'}; |
|
|
&logtouch(); |
&logtouch(); |
&logthis('<font color=yellow>INFO: Read configuration</font>'); |
&logthis('<font color=yellow>INFO: Read configuration</font>'); |
} |
} |