[LON-CAPA-cvs] cvs: loncom(version_2_9_X) /interface lonnavmaps.pm

raeburn raeburn@source.lon-capa.org
Wed, 10 Feb 2010 16:45:32 -0000


raeburn		Wed Feb 10 16:45:32 2010 EDT

  Modified files:              (Branch: version_2_9_X)
    /loncom/interface	lonnavmaps.pm 
  Log:
  - Backport 1.436, 1.437, 1.441.
  
  
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.423.2.2 loncom/interface/lonnavmaps.pm:1.423.2.3
--- loncom/interface/lonnavmaps.pm:1.423.2.2	Sat Aug 15 18:46:22 2009
+++ loncom/interface/lonnavmaps.pm	Wed Feb 10 16:45:31 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Navigate Maps Handler
 #
-# $Id: lonnavmaps.pm,v 1.423.2.2 2009/08/15 18:46:22 raeburn Exp $
+# $Id: lonnavmaps.pm,v 1.423.2.3 2010/02/10 16:45:31 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -597,7 +597,7 @@
 	    my ($map,$id,$src)=&Apache::lonnet::decode_symb($res->symb());
 	    if ($map=~/\.page$/) {
 		my $url=&Apache::lonnet::clutter($map);
-		$anchor=&escape($src->shown_symb());
+                $anchor=&escape($res->shown_symb());
 		return ($url,$res->shown_symb(),$anchor);
 	    }
         }
@@ -880,11 +880,6 @@
     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);
-    $link = $left.'?'.$right;
 
     my $src = $resource->src();
     my $it = $params->{"iterator"};
@@ -3503,7 +3498,11 @@
     my $self = shift;
     my $param = shift;
     my $id = shift;
-    return $self->{NAV_MAP}->navhash($param . ($id?$self->{ID}:""));
+    my $arg = $param . ($id?$self->{ID}:"");
+    if (defined($arg)) {
+        return $self->{NAV_MAP}->navhash($arg);
+    }
+    return;
 }
 
 =pod