version 1.71, 2002/10/08 20:39:43
|
version 1.72, 2002/10/11 14:56:43
|
Line 1
|
Line 1
|
|
|
# The LearningOnline Network with CAPA |
# The LearningOnline Network with CAPA |
# Navigate Maps Handler |
# Navigate Maps Handler |
# |
# |
Line 930 sub new_handle {
|
Line 931 sub new_handle {
|
} |
} |
|
|
my $mapIterator = $navmap->getIterator(undef, undef, \%filterHash, $condition); |
my $mapIterator = $navmap->getIterator(undef, undef, \%filterHash, $condition); |
my $curRes = $mapIterator->next(); |
|
undef $res; # so we don't accidentally use it later |
undef $res; # so we don't accidentally use it later |
my $indentLevel = -1; |
my $indentLevel = 0; |
my $indentString = "<img src=\"/adm/lonIcons/whitespace1.gif\" width=\"25\" height=\"1\" alt=\"\" border=\"0\" />"; |
my $indentString = "<img src=\"/adm/lonIcons/whitespace1.gif\" width=\"25\" height=\"1\" alt=\"\" border=\"0\" />"; |
|
|
my $isNewBranch = 0; |
my $isNewBranch = 0; |
my $now = time(); |
my $now = time(); |
my $in24Hours = $now + 24 * 60 * 60; |
my $in24Hours = $now + 24 * 60 * 60; |
|
my $depth = 1; |
|
|
|
# We know the first thing is a BEGIN_MAP (see "$self->{STARTED}" |
|
# code in iterator->next), so ignore the first one |
|
$mapIterator->next(); |
|
my $curRes = $mapIterator->next(); |
|
|
while ($curRes != $mapIterator->END_MAP()) { |
while ($depth > 0) { |
if ($curRes == $mapIterator->BEGIN_MAP() || |
if ($curRes == $mapIterator->BEGIN_MAP() || |
$curRes == $mapIterator->BEGIN_BRANCH()) { |
$curRes == $mapIterator->BEGIN_BRANCH()) { |
$indentLevel++; |
$indentLevel++; |
Line 951 sub new_handle {
|
Line 957 sub new_handle {
|
if ($curRes == $mapIterator->BEGIN_BRANCH()) { |
if ($curRes == $mapIterator->BEGIN_BRANCH()) { |
$isNewBranch = 1; |
$isNewBranch = 1; |
} |
} |
|
if ($curRes == $mapIterator->BEGIN_MAP()) { |
|
$depth++; |
|
} |
|
if ($curRes == $mapIterator->END_MAP()) { |
|
$depth--; |
|
} |
|
|
# Is this resource being blotted out? |
# Is this resource being blotted out? |
if (ref($curRes) && !advancedUser() && $curRes->randomout()) { |
if (ref($curRes) && !advancedUser() && $curRes->randomout()) { |