--- loncom/interface/lonnavmaps.pm 2003/01/10 17:46:46 1.123
+++ loncom/interface/lonnavmaps.pm 2003/01/13 22:41:20 1.126
@@ -2,7 +2,7 @@
# The LearningOnline Network with CAPA
# Navigate Maps Handler
#
-# $Id: lonnavmaps.pm,v 1.123 2003/01/10 17:46:46 bowersj2 Exp $
+# $Id: lonnavmaps.pm,v 1.126 2003/01/13 22:41:20 bowersj2 Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -96,6 +96,11 @@ sub real_handler {
''));
$r->print('');
+ $r->rflush();
+
+ # Now that we've displayed some stuff to the user, init the navmap
+ $navmap->init();
+
$r->print('
');
my $date=localtime;
$r->print('Key: | ');
@@ -178,9 +183,6 @@ sub real_handler {
$r->print('
');
$r->rflush();
- # Now that we've displayed some stuff to the user, init the navmap
- $navmap->init();
-
# Check that it's defined
if (!($navmap->courseMapDefined())) {
$r->print('Coursemap undefined.' .
@@ -271,6 +273,12 @@ sub real_handler {
$mapIterator->next(); # discard the first BEGIN_MAP
my $curRes = $mapIterator->next();
my $counter = 0;
+<<<<<<< lonnavmaps.pm
+
+ # We only need to do this if we need to open the maps to show the
+ # current position
+ while ($depth > 0 && !$ENV{'form.alreadyHere'}) {
+=======
my $foundJump = ($jumpType == $NOTHING); # look for jump point if we have one
my $looped = 0;
@@ -278,6 +286,7 @@ sub real_handler {
# current position. This will change the counter so we can't count
# for the jump marker with this loop.
while ($depth > 0 && !$ENV{'form.alreadyHere'}) {
+>>>>>>> 1.122
if ($curRes == $mapIterator->BEGIN_MAP()) { $depth++; }
if ($curRes == $mapIterator->END_MAP()) { $depth--; }
@@ -296,6 +305,9 @@ sub real_handler {
}
$ENV{'form.alreadyHere'} = 1;
}
+<<<<<<< lonnavmaps.pm
+
+=======
$looped = 1;
$curRes = $mapIterator->next();
@@ -325,6 +337,7 @@ sub real_handler {
$foundJump = 1;
}
+>>>>>>> 1.122
$curRes = $mapIterator->next();
}
@@ -600,7 +613,7 @@ sub real_handler {
$r->print("\n");
# SECOND COL: Is there text, feedback, errors??
- my $discussionHTML = ""; my $feedbackHTML = "";
+ my $discussionHTML = ""; my $feedbackHTML = ""; my $errorHTML = "";
if ($curRes->hasDiscussion()) {
$discussionHTML = $linkopen .
@@ -620,7 +633,19 @@ sub real_handler {
}
}
- $r->print("$discussionHTML$feedbackHTML | ");
+ if ($curRes->getErrors()) {
+ my $errors = $curRes->getErrors();
+ foreach (split(/,/, $errors)) {
+ if ($_) {
+ $errorHTML .= ' '
+ . '';
+ }
+ }
+ }
+
+ $r->print("$discussionHTML$feedbackHTML$errorHTML | ");
# Is this the first displayed part of a multi-part problem
# that has not been condensed, so we should suppress these two
@@ -672,10 +697,10 @@ sub real_handler {
$r->print('');
}
- $r->print("