--- loncom/interface/lonstatistics.pm 2002/08/30 15:35:08 1.49 +++ loncom/interface/lonstatistics.pm 2002/10/21 00:19:39 1.52 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # (Publication Handler # -# $Id: lonstatistics.pm,v 1.49 2002/08/30 15:35:08 stredwic Exp $ +# $Id: lonstatistics.pm,v 1.52 2002/10/21 00:19:39 minaeibi Exp $ # # Copyright Michigan State University Board of Trustees # @@ -324,14 +324,14 @@ sub PrepareData { return "Unable to tie hash to db file."; } - if(!$isCached) { +# if(!$isCached) { my $processTopResourceMapReturn= - &Apache::loncoursedata::ProcessTopResourceMap(\%cache, $c, $r); + &Apache::loncoursedata::ProcessTopResourceMap(\%cache, $c); if($processTopResourceMapReturn ne 'OK') { untie(%cache); return $processTopResourceMapReturn; } - } + # } if($c->aborted()) { untie(%cache); @@ -509,7 +509,9 @@ sub BuildStatistics { 'updateTime'); my @headings=('Full Name', 'Section', 'PID', 'Domain', 'User Name', 'Last Updated'); - my $spacing = ' '; + my $spacing = ' '; +# my $spacing = ' '; + my %reports = ('classlist' => 'Class list', 'problem_statistics' => 'Problem Statistics', 'student_assessment' => 'Student Assessment', @@ -612,6 +614,13 @@ sub handler { # $jr = $r; + my $loaderror=&Apache::lonnet::overloaderror($r); + if ($loaderror) { return $loaderror; } + $loaderror= + &Apache::lonnet::overloaderror($r, + $ENV{'course.'.$ENV{'request.course.id'}.'.home'}); + if ($loaderror) { return $loaderror; } + unless(&Apache::lonnet::allowed('vgr',$ENV{'request.course.id'})) { $ENV{'user.error.msg'}= $r->uri.":vgr:0:0:Cannot view grades for complete course";