[LON-CAPA-cvs] cvs: loncom /interface lonnavmaps.pm
bowersj2
lon-capa-cvs@mail.lon-capa.org
Fri, 15 Nov 2002 21:23:03 -0000
bowersj2 Fri Nov 15 16:23:03 2002 EDT
Modified files:
/loncom/interface lonnavmaps.pm
Log:
Fixes extraneous END_BRANCHES at the end of a map. Changes some titles.
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.110 loncom/interface/lonnavmaps.pm:1.111
--- loncom/interface/lonnavmaps.pm:1.110 Fri Nov 15 15:12:11 2002
+++ loncom/interface/lonnavmaps.pm Fri Nov 15 16:23:03 2002
@@ -2,7 +2,7 @@
# The LearningOnline Network with CAPA
# Navigate Maps Handler
#
-# $Id: lonnavmaps.pm,v 1.110 2002/11/15 20:12:11 bowersj2 Exp $
+# $Id: lonnavmaps.pm,v 1.111 2002/11/15 21:23:03 bowersj2 Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -83,8 +83,11 @@
return HTTP_NOT_ACCEPTABLE;
}
+ $r->print("<html><head>\n");
+ $r->print("<title>Navigate Course Contents</title>");
+
# Header
- $r->print(&Apache::loncommon::bodytag('Navigate Course Map','',
+ $r->print(&Apache::loncommon::bodytag('Navigate Course Contents','',
''));
$r->print('<script>window.focus();</script>');
@@ -1509,8 +1512,11 @@
# BC branch and gets to C, it will see F as the only next resource, but it's
# one level lower. Thus, this is the end of the branch, since there are no
# more resources added to this level or above.
+ # We don't do this if the examined resource is the finish resource,
+ # because the condition given above is true, but the "END_MAP" will
+ # take care of things and we should already be at depth 0.
my $isEndOfBranch = $maxDepthAdded < $self->{CURRENT_DEPTH};
- if ($isEndOfBranch) { # **9**
+ if ($isEndOfBranch && $here != $self->{FINISH_RESOURCE}) { # **9**
push @{$self->{STACK}->[$self->{CURRENT_DEPTH}]}, END_BRANCH();
}