--- loncom/interface/lonstatistics.pm 2002/08/13 00:37:18 1.41 +++ loncom/interface/lonstatistics.pm 2002/09/03 01:32:10 1.47.2.1 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # (Publication Handler # -# $Id: lonstatistics.pm,v 1.41 2002/08/13 00:37:18 stredwic Exp $ +# $Id: lonstatistics.pm,v 1.47.2.1 2002/09/03 01:32:10 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -82,6 +82,16 @@ sub ProcessFormData{ &CheckFormElement($cache, 'DownloadAll', 'DownloadAll', 'false'); &CheckFormElement($cache, 'sort', 'sort', 'fullname'); &CheckFormElement($cache, 'download', 'download', 'false'); + &CheckFormElement($cache, 'StatisticsMaps', + 'StatisticsMaps', 'All Maps'); + if(defined($ENV{'form.Section'})) { + my @sectionsSelected = (ref($ENV{'form.Section'}) ? + @{$ENV{'form.Section'}} : + ($ENV{'form.Section'})); + $cache->{'sectionsSelected'} = join(':', @sectionsSelected); + } elsif(!defined($cache->{'sectionsSelected'})) { + $cache->{'sectionsSelected'} = $cache->{'sectionList'}; + } # student assessment if(defined($ENV{'form.CreateStudentAssessment'}) || @@ -102,15 +112,6 @@ sub ProcessFormData{ &Apache::lonnet::unescape($cache->{'StudentAssessmentStudent'}); &CheckFormElement($cache, 'DefaultColumns', 'DefaultColumns', 'false'); - if(defined($ENV{'form.Section'})) { - my @sectionsSelected = (ref($ENV{'form.Section'}) ? - @{$ENV{'form.Section'}} : - ($ENV{'form.Section'})); - $cache->{'sectionsSelected'} = join(':', @sectionsSelected); - } elsif(!defined($cache->{'sectionsSelected'})) { - $cache->{'sectionsSelected'} = $cache->{'sectionList'}; - } - # Problem analysis &CheckFormElement($cache, 'Interval', 'Interval', '1'); @@ -119,10 +120,11 @@ sub ProcessFormData{ 'DisplayFormat', 'Display Table Format'); &CheckFormElement($cache, 'ProblemStatisticsAscend', 'ProblemStatisticsAscend', 'Ascending'); - &CheckFormElement($cache, 'ProblemStatisticsMaps', - 'ProblemStatisticsMaps', 'All Maps'); &CheckFormElement($cache, 'ProblemStatisticsSort', 'ProblemStatisticsSort', 'Homework Sets Order'); + &CheckFormElement($cache, 'DisplayLegend', 'DisplayLegend', 'Hide Legend'); + &CheckFormElement($cache, 'SortProblems', 'SortProblems', + 'Sort Within Sequence'); # Search only form elements my @headingColumns=(); @@ -316,14 +318,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); @@ -514,7 +516,7 @@ sub BuildStatistics { my $cacheDB = "/home/httpd/perl/tmp/$ENV{'user.name'}". "_$ENV{'user.domain'}_$courseID\_statistics.db"; - $r->print(&Apache::lonhtmlcommon::Title('LON-CAPA Statistics')); + $r->print(&Apache::lonhtmlcommon::Title('Course Statistics and Charts')); my ($returnValue, $students) = &PrepareData($c, $cacheDB, \@studentInformation, @@ -541,7 +543,7 @@ sub BuildStatistics { } if(defined($cache{'OptionResponses'})) { - $reports{'problem_analysis'} = 'Problem Analysis'; + $reports{'problem_analysis'} = 'Option Response Analysis'; } $r->print('