--- loncom/interface/lonstatistics.pm 2005/02/25 02:37:49 1.115 +++ loncom/interface/lonstatistics.pm 2005/03/01 22:25:59 1.118 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lonstatistics.pm,v 1.115 2005/02/25 02:37:49 matthew Exp $ +# $Id: lonstatistics.pm,v 1.118 2005/03/01 22:25:59 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -500,6 +500,12 @@ sub get_selected_maps { } else { @selected_maps = ('all'); } + foreach my $map (@selected_maps) { + if ($map eq 'all') { + @selected_maps = ('all'); + last; + } + } return @selected_maps; } @@ -509,7 +515,7 @@ sub get_selected_maps { =pod -=item &sequences_with_assessments +=item &selected_sequences_with_assessments Retrieve the sequences which were selected by the user to show. @@ -523,7 +529,7 @@ Returns: an array containing a navmap ob ####################################################### ####################################################### -sub sequences_with_assessments { +sub selected_sequences_with_assessments { my ($mode) = @_; $mode = 'selected' if (! defined($mode)); my $navmap = Apache::lonnavmaps::navmap->new(); @@ -545,7 +551,7 @@ sub sequences_with_assessments { if ($mode eq 'all') { push (@sequences_to_show,$sequence); } elsif ($mode eq 'selected') { - foreach my $map_symb (&get_selected_maps()) { + foreach my $map_symb (&get_selected_maps('Maps')) { if ($sequence->symb eq $map_symb || $map_symb eq 'all'){ push (@sequences_to_show,$sequence); last; # Only put it in once @@ -599,26 +605,15 @@ sub map_select { } $form .= 'size="'.$numvisible.'" >'."\n"; # - # Deal with 'all' - foreach (@selected_maps) { - if ($_ eq 'all') { - @selected_maps = ('all'); - last; - } - } - # # Put in option for 'all' $form .= '