version 1.115, 2005/02/25 02:37:49
|
version 1.116, 2005/02/25 19:48:00
|
Line 509 sub get_selected_maps {
|
Line 509 sub get_selected_maps {
|
|
|
=pod |
=pod |
|
|
=item &sequences_with_assessments |
=item &selected_sequences_with_assessments |
|
|
Retrieve the sequences which were selected by the user to show. |
Retrieve the sequences which were selected by the user to show. |
|
|
Line 523 Returns: an array containing a navmap ob
|
Line 523 Returns: an array containing a navmap ob
|
|
|
####################################################### |
####################################################### |
####################################################### |
####################################################### |
sub sequences_with_assessments { |
sub selected_sequences_with_assessments { |
my ($mode) = @_; |
my ($mode) = @_; |
$mode = 'selected' if (! defined($mode)); |
$mode = 'selected' if (! defined($mode)); |
my $navmap = Apache::lonnavmaps::navmap->new(); |
my $navmap = Apache::lonnavmaps::navmap->new(); |
Line 545 sub sequences_with_assessments {
|
Line 545 sub sequences_with_assessments {
|
if ($mode eq 'all') { |
if ($mode eq 'all') { |
push (@sequences_to_show,$sequence); |
push (@sequences_to_show,$sequence); |
} elsif ($mode eq 'selected') { |
} 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'){ |
if ($sequence->symb eq $map_symb || $map_symb eq 'all'){ |
push (@sequences_to_show,$sequence); |
push (@sequences_to_show,$sequence); |
last; # Only put it in once |
last; # Only put it in once |
Line 618 sub map_select {
|
Line 618 sub map_select {
|
$form .= ">all</option>\n"; |
$form .= ">all</option>\n"; |
# |
# |
# Loop through the sequences |
# Loop through the sequences |
my @sequences = &sequences_with_assessments(); |
my @sequences = &selected_sequences_with_assessments(); |
my $navmap; |
my $navmap; |
if (!ref($sequences[0])) { |
if (!ref($sequences[0])) { |
return $sequences[0]; |
return $sequences[0]; |