--- loncom/interface/lonstatistics.pm 2002/07/25 21:23:51 1.32 +++ loncom/interface/lonstatistics.pm 2002/07/26 16:22:09 1.33 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # (Publication Handler # -# $Id: lonstatistics.pm,v 1.32 2002/07/25 21:23:51 stredwic Exp $ +# $Id: lonstatistics.pm,v 1.33 2002/07/26 16:22:09 stredwic Exp $ # # Copyright Michigan State University Board of Trustees # @@ -99,6 +99,15 @@ sub ProcessFormData{ $cache->{'StudentAssessmentStudent'} = &Apache::lonnet::unescape($cache->{'StudentAssessmentStudent'}); + 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'}; + } + foreach (keys(%ENV)) { if(/form\.Analyze:::/) { # $cache->{'reportSelected'} = 'Analyze'; @@ -459,6 +468,44 @@ sub BuildClasslist { return $Str; } +sub CreateMainMenu { + my ($status, $reports)=@_; + + my $Str = ''; + + $Str .= ''."\n"; + $Str .= ''."\n"; + $Str .= ''."\n"; + $Str .= ''."\n"; + $Str .= ''."\n"; + $Str .= ''."\n"; + + $Str .= ''."\n"; + + $Str .= '
Analysis Reports:Student Status:
{'reportSelected'} eq $reports->{$_}) { + $Str .= ' selected=""'; + } + $Str .= '>'.$reports->{$_}.''."\n"; + } + $Str .= ''; + $Str .= &Apache::lonhtmlcommon::StatusOptions($status, 'Statistics'); + $Str .= '
'."\n"; + $Str .= '
'."\n"; + + return $Str; +} + sub BuildStatistics { my ($r)=@_; @@ -502,9 +549,7 @@ sub BuildStatistics { $r->print(&Apache::lonhtmlcommon::Title('LON-CAPA Statistics')); $r->print('
print('method="post" action="/adm/statistics">'); - $r->print(&Apache::lonhtmlcommon::CreateStatisticsMainMenu( - $cache{'Status'}, - \%reports)); + $r->print(&CreateMainMenu($cache{'Status'}, \%reports)); untie(%cache); } else { $r->print('Unable to tie database.');