--- loncom/interface/lonstatistics.pm 2006/05/01 05:39:44 1.130 +++ loncom/interface/lonstatistics.pm 2006/05/11 20:05:02 1.134 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lonstatistics.pm,v 1.130 2006/05/01 05:39:44 raeburn Exp $ +# $Id: lonstatistics.pm,v 1.134 2006/05/11 20:05:02 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -230,12 +230,13 @@ sub PrepareClasslist { $enrollment_status = $env{'form.Status'} if (exists($env{'form.Status'})); # # Get groupmembership - my (%curr_groups,$classgroups,$studentgroups); - my $numgroups = &Apache::loncommon::coursegroups(\%curr_groups,$cdom,$cnum); - if ($numgroups) { + my ($classgroups,$studentgroups); + my %curr_groups = &Apache::loncommon::coursegroups($cdom,$cnum); + if (%curr_groups) { ($classgroups,$studentgroups) = - &Apache::loncoursedata::get_group_memberships($classlist, - $cdom,$cnum); + &Apache::loncoursedata::get_group_memberships($classlist, + $field_names, + $cdom,$cnum); } my $now = time; @@ -281,18 +282,18 @@ sub PrepareClasslist { ($enrollment_status eq 'Any')) ){ my $groupcheck = 0; - if (grep/^all$/,@selected_groups) { - push (@Students,$studenthash); + if (grep(/^all$/,@selected_groups)) { + push(@Students,$studenthash); last; - } elsif (grep/^none$/,@selected_groups) { + } elsif (grep(/^none$/,@selected_groups)) { if ($studenthash->{'groups'} eq 'none') { - push (@Students,$studenthash); + push(@Students,$studenthash); last; } } else { foreach my $group (@selected_groups) { - if (grep/^$group$/,@studentsgroups) { - push (@Students,$studenthash); + if (grep(/^$group$/,@studentsgroups)) { + push(@Students,$studenthash); $groupcheck = 1; last; } @@ -453,7 +454,7 @@ sub section_and_enrollment_description { &Apache::lonnet::logthis($description); } $description = §ion_or_group_text($mode,'section',@sections). - ' '.§ion_or_group_text($mode,'group',@groups); + ' '.§ion_or_group_text($mode,'group',@groups); if ($mode eq 'localized') { $description .= &mt(' [_1] enrollment status.',$env{'form.Status'}); } elsif ($mode eq 'plaintext') { @@ -922,7 +923,7 @@ sub DisplayClasslist { # # Output some of the standard interface components my $Str; - $Str .= &Apache::lonhtmlcommon::breadcrumbs(undef,'Select One Student'); + $Str .= &Apache::lonhtmlcommon::breadcrumbs('Select One Student'); $Str .= '

'."\n"; $Str .= ''; $Str .= ''; @@ -1163,8 +1164,7 @@ ENDSTYLE bug=>'Statistics and Charts'}); if (! exists($env{'form.reportSelected'}) || $env{'form.reportSelected'} eq '') { - $r->print(&Apache::lonhtmlcommon::breadcrumbs - (undef,&mt('Statistics Main Page')). + $r->print(&Apache::lonhtmlcommon::breadcrumbs('Statistics Main Page'). &CreateMainMenu()); } else { #
'.&mt('Sections').'