--- loncom/interface/lonstatistics.pm 2003/04/18 15:50:55 1.66 +++ loncom/interface/lonstatistics.pm 2003/05/12 22:07:17 1.68 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lonstatistics.pm,v 1.66 2003/04/18 15:50:55 matthew Exp $ +# $Id: lonstatistics.pm,v 1.68 2003/05/12 22:07:17 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -240,6 +240,10 @@ sub PrepareClasslist { } # + # get the status requested + my $requested_status = 'Active'; + $requested_status = $ENV{'form.Status'} if (exists($ENV{'form.Status'})); + # # Process the classlist while (my ($student,$student_data) = each (%$classlist)) { my $studenthash = (); @@ -266,7 +270,11 @@ sub PrepareClasslist { # # Only put in the list those students we are interested in foreach my $sect (@SelectedSections) { - if (($sect eq 'all') || ($section eq $sect)) { + if ( (($sect eq 'all') || + ($section eq $sect)) && + (($studenthash->{'status'} eq $requested_status) || + ($requested_status eq 'Any')) + ){ push (@Students,$studenthash); last; } @@ -832,12 +840,16 @@ sub CreateMainMenu { # $Str .= ''."\n"; $Str .= ''."\n"; + $Str .= ''."\n"; $Str .= ''."\n"; - $Str .= ''."\n"; $Str .= ''."\n"; # - $Str .= '\n"; + $Str .= '\n"; # $Str .= ''."\n"; # - $Str .= ''."\n"; - # $Str .= '
Select a ReportStudent Status
'. + "'. + ''. + "'; $Str .= ''; - $Str .= &Apache::lonhtmlcommon::StatusOptions($status, 'Statistics'); - $Str .= '
'."\n"; $Str .= '
'."\n"; # @@ -925,6 +933,11 @@ END return; } # + # Clean out the caches + if (exists($ENV{'form.ClearCache'})) { + &Apache::loncoursedata::delete_caches($ENV{'requres.course.id'}); + } + # # Set up the statistics and chart environment &PrepareClasslist($r); &PrepareCourseData($r);