--- loncom/interface/lonnavmaps.pm 2002/12/02 14:04:52 1.118
+++ loncom/interface/lonnavmaps.pm 2003/01/14 14:59:47 1.128
@@ -2,7 +2,7 @@
# The LearningOnline Network with CAPA
# Navigate Maps Handler
#
-# $Id: lonnavmaps.pm,v 1.118 2002/12/02 14:04:52 bowersj2 Exp $
+# $Id: lonnavmaps.pm,v 1.128 2003/01/14 14:59:47 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.' .
@@ -280,9 +282,10 @@ sub real_handler {
while ($depth > 0 && !$ENV{'form.alreadyHere'}) {
if ($curRes == $mapIterator->BEGIN_MAP()) { $depth++; }
if ($curRes == $mapIterator->END_MAP()) { $depth--; }
+
if (ref($curRes) && !$ENV{'form.alreadyHere'} &&
($hereType == $SYMB && $curRes->symb() eq $here) ||
- ($hereType == $URL && $curRes->src() eq $here)) {
+ (ref($curRes) && $hereType == $URL && $curRes->src() eq $here)) {
my $mapStack = $mapIterator->getStack();
# Ensure the parent maps are open
@@ -485,6 +488,10 @@ sub real_handler {
'"';
my $title = $curRes->compTitle();
+ if ($src=~/^\/uploaded\//) {
+ $nonLinkedText=$title;
+ $title='';
+ }
my $partLabel = "";
my $newBranchText = "";
@@ -595,7 +602,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 .
@@ -615,7 +622,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
@@ -667,10 +686,10 @@ sub real_handler {
$r->print('');
}
- $r->print("