[LON-CAPA-cvs] cvs: loncom /interface lonnavmaps.pm
bowersj2
lon-capa-cvs@mail.lon-capa.org
Mon, 14 Oct 2002 17:34:10 -0000
bowersj2 Mon Oct 14 13:34:10 2002 EDT
Modified files:
/loncom/interface lonnavmaps.pm
Log:
Only show the current marker once; prevents multi-part problems from
having each and every part highlighted, plus will work correctly when
symbs are used.
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.77 loncom/interface/lonnavmaps.pm:1.78
--- loncom/interface/lonnavmaps.pm:1.77 Mon Oct 14 12:43:58 2002
+++ loncom/interface/lonnavmaps.pm Mon Oct 14 13:34:10 2002
@@ -2,7 +2,7 @@
# The LearningOnline Network with CAPA
# Navigate Maps Handler
#
-# $Id: lonnavmaps.pm,v 1.77 2002/10/14 16:43:58 bowersj2 Exp $
+# $Id: lonnavmaps.pm,v 1.78 2002/10/14 17:34:10 bowersj2 Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -977,6 +977,7 @@
my $now = time();
my $in24Hours = $now + 24 * 60 * 60;
my $depth = 1;
+ my $displayedHereMarker = 0;
# We know the first thing is a BEGIN_MAP (see "$self->{STARTED}"
# code in iterator->next), so ignore the first one
@@ -1178,9 +1179,10 @@
my $curMarkerEnd = "";
# Is this the current resource?
- if ($curRes->src() eq $currenturl) {
+ if ($curRes->src() eq $currenturl && !$displayedHereMarker) {
$curMarkerBegin = '<a name="curloc" /><font color="red" size="+2">> </font>';
$curMarkerEnd = '<font color="red" size="+2"> <</font>';
+ $displayedHereMarker = 1;
}
if ($curRes->is_problem() && $part ne "0" && !$condensed) {