--- loncom/interface/lonstatistics.pm 2002/05/31 13:47:01 1.25
+++ loncom/interface/lonstatistics.pm 2002/05/31 16:02:11 1.26
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# (Publication Handler
#
-# $Id: lonstatistics.pm,v 1.25 2002/05/31 13:47:01 minaeibi Exp $
+# $Id: lonstatistics.pm,v 1.26 2002/05/31 16:02:11 minaeibi Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -89,8 +89,8 @@ my %Answer = ();
sub Activity {
- my $file="/home/minaeibi/minaei";
- my $userid='billskat';
+ my $file="/home/minaeibi/activity.log";
+ my $userid='adamsde1';
$r->print("
Using $file");
$r->rflush();
open(FILEID, "<$file");
@@ -106,21 +106,16 @@ sub Activity {
if ($who ne $userid) { next; }
if (!$resource) { next; }
my $res=&Apache::lonnet::unescape($resource);
- #if (($key=~/\.(\w+)\.(\w+)\.submission$/)) {
- #if ($meta=~/\.(problem|exam|quiz|assess|survey|form)$/) {
- # foreach my $Key(split(/\,/,&Apache::lonnet::metadata($meta,'keys'))) {
- # if ($Key=~/^stores\_(\w+)\_tries$/) {
-
- # if (($res =~ /^\/res\/adm/)) {
+ if (($res =~ /\.(problem|htm|html)/)) {
$Count++;
- $r->print("
$Count) $date: $who --> $res");
- if ($post) {
- $Count++;
- $r->print("
$Count) Sent data ".join(':',
- &Apache::lonnet::unescape(@posts)).'');
- }
+ $r->print("
$Count) ".localtime($date).": $who --> $res");
+# if ($post) {
+# $Count++;
+# $r->print("
$Count) Sent data ".join(':',
+# &Apache::lonnet::unescape(@posts)).'');
+# }
$r->rflush();
- # }
+ }
## push (@allaccess,unescape($access));
#print $machine;
}
@@ -1406,8 +1401,6 @@ sub setbgcolor {
}
}
-
-
# my $CacheDB = "/home/httpd/perl/tmp/$ENV{'user.name'}".
# "_$ENV{'user.domain'}_$cid\_classlist.db";
# if (-e "$CacheDB") {
@@ -1438,27 +1431,16 @@ sub ClassList {
$firstres=$hash{'map_start_/res/'.$ENV{'request.course.uri'}};
$lastres=$hash{'map_finish_/res/'.$ENV{'request.course.uri'}};
if (($firstres) && ($lastres)) {
-# my %students = &Apache::lonnet::dump('classlist',$cdom,$cnum);
-# $Apache::lonxml::debug=1;
-# &Apache::lonhomework::showhash(%students);
-# $Apache::lonxml::debug=0;
-# my $StudNo = 0;
-# my $now=time;
-# my ($temp)=keys(%students);
-# unless ($temp=~/^error\:/) {
-# foreach my $KeyPoint(sort keys(%students)) {
-
my $StudNo = 0;
my $now=time;
-
my %classlist=&Apache::lonnet::dump('classlist',$cdom,$cnum);
my ($checkForError)=keys(%classlist);
if($checkForError=~/^(con_lost|error|no_such_host)/i) {
$r->print('