[LON-CAPA-cvs] cvs: rat / lonpage.pm loncom/interface lonnavmaps.pm
www
lon-capa-cvs@mail.lon-capa.org
Tue, 24 Feb 2004 19:14:42 -0000
www Tue Feb 24 14:14:42 2004 EDT
Modified files:
/loncom/interface lonnavmaps.pm
/rat lonpage.pm
Log:
* Bug #1685: anchors on .page, jump there from NAV
* General: NAV did not treat anchors correctly when appending symb
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.248 loncom/interface/lonnavmaps.pm:1.249
--- loncom/interface/lonnavmaps.pm:1.248 Tue Feb 24 11:09:30 2004
+++ loncom/interface/lonnavmaps.pm Tue Feb 24 14:14:42 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Navigate Maps Handler
#
-# $Id: lonnavmaps.pm,v 1.248 2004/02/24 16:09:30 www Exp $
+# $Id: lonnavmaps.pm,v 1.249 2004/02/24 19:14:42 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -297,7 +297,8 @@
# in case folder was skipped over as "only sequence"
my ($map,$id,$src)=&Apache::lonnet::decode_symb($res->symb());
if ($map=~/\.page$/) {
- return &Apache::lonnet::clutter($map);
+ return &Apache::lonnet::clutter($map).'#'.
+ &Apache::lonnet::escape(&Apache::lonnet::declutter($src));
}
}
}
@@ -1539,11 +1540,15 @@
my $filter = $it->{FILTER};
my $stack = $it->getStack();
my $src = getLinkForResource($stack);
-
+ my $anchor='';
+ if ($src=~s/(\#.*$)//) {
+ $anchor=$1;
+ }
my $srcHasQuestion = $src =~ /\?/;
$args->{"resourceLink"} = $src.
($srcHasQuestion?'&':'?') .
- 'symb=' . &Apache::lonnet::escape($curRes->symb());
+ 'symb=' . &Apache::lonnet::escape($curRes->symb()).
+ $anchor;
# Now, display each column.
foreach my $col (@$cols) {
Index: rat/lonpage.pm
diff -u rat/lonpage.pm:1.54 rat/lonpage.pm:1.55
--- rat/lonpage.pm:1.54 Tue Oct 21 16:40:10 2003
+++ rat/lonpage.pm Tue Feb 24 14:14:42 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Page Handler
#
-# $Id: lonpage.pm,v 1.54 2003/10/21 20:40:10 albertel Exp $
+# $Id: lonpage.pm,v 1.55 2004/02/24 19:14:42 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -158,7 +158,7 @@
my $number_of_columns = 1;
my $requrl=$r->uri;
my $target = $ENV{'form.grade_target'};
- &Apache::lonnet::logthis("Got a target of $target");
+# &Apache::lonnet::logthis("Got a target of $target");
if ($target eq 'meta') {
&Apache::loncommon::content_type($r,'text/html');
$r->send_http_header;
@@ -402,7 +402,9 @@
my $avespan=$lcm/($#colcont+1);
for ($j=0;$j<=$#colcont;$j++) {
my $rid=$colcont[$j];
- my $metainfo='<a href="'.
+ my $metainfo='<a name="'.
+ &Apache::lonnet::escape(&Apache::lonnet::declutter($hash{'src_'.$rid})).'" />'.
+ '<a href="'.
$metalink{$rid}.'" target="LONcatInfo">'.
'<img src="/adm/lonMisc/cat_button.gif" border=0>'.
'</img></a><a href="/adm/evaluate?postdata='.