--- loncom/interface/lonnavmaps.pm 2004/11/11 22:39:05 1.304
+++ loncom/interface/lonnavmaps.pm 2004/12/07 22:58:05 1.307
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Navigate Maps Handler
#
-# $Id: lonnavmaps.pm,v 1.304 2004/11/11 22:39:05 albertel Exp $
+# $Id: lonnavmaps.pm,v 1.307 2004/12/07 22:58:05 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -33,7 +33,9 @@ use strict;
use Apache::Constants qw(:common :http);
use Apache::loncommon();
use Apache::lonmenu();
+use Apache::lonenc();
use Apache::lonlocal;
+use Apache::lonnet;
use POSIX qw (floor strftime);
use Data::Dumper; # for debugging, not always
@@ -375,7 +377,7 @@ ENDSUBM
-
+
");
@@ -1009,6 +1011,15 @@ sub render_resource {
my $nonLinkedText = ''; # stuff after resource title not in link
my $link = $params->{"resourceLink"};
+
+ # The URL part is not escaped at this point, but the symb is...
+ # The stuff to the left of the ? must have ' replaced by \' since
+ # it will be quoted with ' in the href.
+
+ my ($left,$right) = split(/\?/, $link);
+ $left =~ s/'/\\'/g;
+ $link = $left.'?'.$right;
+
my $src = $resource->src();
my $it = $params->{"iterator"};
my $filter = $it->{FILTER};
@@ -1024,7 +1035,11 @@ sub render_resource {
}
# links to open and close the folder
+
+
my $linkopen = "";
+
+
my $linkclose = "";
# Default icon: unknown page
@@ -1065,6 +1080,7 @@ sub render_resource {
'&jump=' .
&Apache::lonnet::escape($resource->symb()) .
"&folderManip=1'>";
+
} else {
# Don't allow users to manipulate folder
$icon = "navmap.$folderType." . ($nowOpen ? 'closed' : 'open') .
@@ -1092,6 +1108,7 @@ sub render_resource {
}
# Decide what to display
+
$result .= "$newBranchText$linkopen$icon$linkclose";
my $curMarkerBegin = '';