version 1.178, 2003/04/22 17:54:27
|
version 1.181, 2003/04/24 18:18:38
|
Line 171 sub real_handler {
|
Line 171 sub real_handler {
|
|
|
# See if there's only one map in the top-level, if we don't |
# See if there's only one map in the top-level, if we don't |
# already have a filter... if so, automatically display it |
# already have a filter... if so, automatically display it |
if (!defined($ENV{'form.filter'})) { |
if ($ENV{QUERY_STRING} !~ /filter/) { |
my $iterator = $navmap->getIterator(undef, undef, undef, 0); |
my $iterator = $navmap->getIterator(undef, undef, undef, 0); |
my $depth = 1; |
my $depth = 1; |
$iterator->next(); |
$iterator->next(); |
Line 185 sub real_handler {
|
Line 185 sub real_handler {
|
if (ref($curRes) && $curRes->is_sequence()) { |
if (ref($curRes) && $curRes->is_sequence()) { |
$sequenceCount++; |
$sequenceCount++; |
$sequenceId = $curRes->map_pc(); |
$sequenceId = $curRes->map_pc(); |
} |
} |
|
|
$curRes = $iterator->next(); |
$curRes = $iterator->next(); |
} |
} |
Line 3078 sub extractParts {
|
Line 3078 sub extractParts {
|
|
|
$self->{PARTS} = []; |
$self->{PARTS} = []; |
|
|
|
my %parts; |
|
|
# Retrieve part count, if this is a problem |
# Retrieve part count, if this is a problem |
if ($self->is_problem()) { |
if ($self->is_problem()) { |
my $metadata = &Apache::lonnet::metadata($self->src(), 'packages'); |
my $metadata = &Apache::lonnet::metadata($self->src(), 'packages'); |
Line 3089 sub extractParts {
|
Line 3091 sub extractParts {
|
foreach (split(/\,/,$metadata)) { |
foreach (split(/\,/,$metadata)) { |
if ($_ =~ /^part_(.*)$/) { |
if ($_ =~ /^part_(.*)$/) { |
my $part = $1; |
my $part = $1; |
|
# This floods the logs |
|
#if (defined($parts{$part})) { |
|
# Apache::lonnet::logthis("$part multiply defined in metadata for " . $self->symb()); |
|
# } |
|
|
# check to see if part is turned off. |
# check to see if part is turned off. |
if (! Apache::loncommon::check_if_partid_hidden($part, $self->symb())) { |
|
push @{$self->{PARTS}}, $1; |
if (!Apache::loncommon::check_if_partid_hidden($part, $self->symb())) { |
|
$parts{$part} = 1; |
} |
} |
} |
} |
} |
} |
|
|
|
|
my @sortedParts = sort @{$self->{PARTS}}; |
my @sortedParts = sort keys %parts; |
$self->{PARTS} = \@sortedParts; |
$self->{PARTS} = \@sortedParts; |
} |
} |
|
|