--- loncom/interface/lonstatistics.pm 2002/07/29 21:19:44 1.36 +++ loncom/interface/lonstatistics.pm 2002/07/30 21:31:48 1.37 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # (Publication Handler # -# $Id: lonstatistics.pm,v 1.36 2002/07/29 21:19:44 minaeibi Exp $ +# $Id: lonstatistics.pm,v 1.37 2002/07/30 21:31:48 stredwic Exp $ # # Copyright Michigan State University Board of Trustees # @@ -128,16 +128,18 @@ sub ProcessFormData{ } } + $cache->{'reportKey'} = 'false'; + if($cache->{'reportSelected'} eq 'Analyze') { + $cache->{'reportKey'} = 'Analyze'; + } + foreach (keys(%ENV)) { - if(/form\.Analyze:::/) { -# $cache->{'reportSelected'} = 'Analyze'; -# $cache->{'reportKey'} = 'Problem Analysis'; - my ($uri, $title, $part, $problem); - (undef, $uri, $title, $part, $problem)=split(':::', $_); - $cache->{'AnalyzeURI'} = $uri; - $cache->{'AnalyzeTitle'} = $title; - $cache->{'AnalyzePart'} = $part; - $cache->{'AnalyzeProblem'} = $problem; + if(/form\.Analyze/) { + $cache->{'reportSelected'} = 'Analyze'; + $cache->{'reportKey'} = 'Analyze'; + my $data; + (undef, $data)=split(':::', $_); + $cache->{'AnalyzeInfo'}=$data; &CheckFormElement($cache, 'Interval', 'Interval', '1'); } elsif(/form\.HeadingColumn/) { @@ -561,9 +563,11 @@ sub BuildStatistics { if(tie(%cache,'GDBM_File',$cacheDB,&GDBM_READER,0640)) { $GoToPage = $cache{'reportSelected'}; $reports{'reportSelected'} = $cache{'reportSelected'}; -# if(defined($cache{'reportKey'}) && $cache{'reportKey'} ne 'false') { -# $reports{$cache{'reportKey'}} = $cache{'reportSelected'}; -# } + if(defined($cache{'reportKey'}) && + !exists($reports{$cache{'reportKey'}}) && + $cache{'reportKey'} ne 'false') { + $reports{$cache{'reportKey'}} = $cache{'reportSelected'}; + } if(defined($cache{'OptionResponses'})) { $reports{'problem_analysis'} = 'Problem Analysis'; @@ -592,17 +596,17 @@ sub BuildStatistics { } elsif($GoToPage eq 'Student Assessment') { $r->print( &Apache::lonstudentassessment::BuildStudentAssessmentPage($cacheDB, - $students, - $courseID, - 'Statistics', - \@headings, - $spacing, - \@studentInformation, - $r, $c)); + $students, + $courseID, + 'Statistics', + \@headings, + $spacing, + \@studentInformation, + $r, $c)); } elsif($GoToPage eq 'Analyze') { $r->print(&Apache::lonproblemanalysis::BuildAnalyzePage($cacheDB, $students, - $courseID)); + $courseID,$r)); } elsif($GoToPage eq 'DoDiffGraph') { &Apache::lonproblemstatistics::BuildDiffGraph($r); } elsif($GoToPage eq 'PercentWrongGraph') { 500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.