[prev in list] [next in list] [prev in thread] [next in thread]
List: lon-capa-cvs
Subject: [LON-CAPA-cvs] cvs: rat / lonpage.pm
From: raeburn <raeburn () source ! lon-capa ! org>
Date: 2020-03-06 20:04:01
Message-ID: cvsraeburn1583525041 () cvsserver
[Download RAW message or body]
raeburn Fri Mar 6 20:04:01 2020 EDT
Modified files:
/rat lonpage.pm
Log:
- Support jumping to an item in a composite page from the Contents listing
where the item is an external resource containing an anchor.
Index: rat/lonpage.pm
diff -u rat/lonpage.pm:1.137 rat/lonpage.pm:1.138
--- rat/lonpage.pm:1.137 Thu Mar 5 19:24:35 2020
+++ rat/lonpage.pm Fri Mar 6 20:04:01 2020
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Page Handler
#
-# $Id: lonpage.pm,v 1.137 2020/03/05 19:24:35 raeburn Exp $
+# $Id: lonpage.pm,v 1.138 2020/03/06 20:04:01 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -368,7 +368,7 @@
if (($hash{'encrypted_'.$_}) && ($symb) && \
(!$env{'request.role.adv'})) {
$showsrc .= \
'?symb='.&Apache::lonenc::encrypted($symb); } elsif ($anchor) {
- $showsrc .= $anchor
+ $showsrc .= $anchor;
}
$ssibody{$_} = <<ENDEXT;
<iframe src="$showsrc" width="100%" height="300px">No iframe support!</iframe>
@@ -947,7 +947,12 @@
if (($hash->{'encrypted_'.$rid}) && (!$env{'request.role.adv'})) {
$aname = 'LC_'.$rid;
} else {
- $aname = &escape($symb);
+ my $shownsymb = $symb;
+ if ($symb =~ /\#([^\#]+)$/) {
+ my $escan = &escape('#');
+ $shownsymb =~ s/#([^\#]+)$/$escan$1/;
+ }
+ $aname = &escape($shownsymb);
}
my $metainfo = '<a name="'.$aname.'"></a>';
unless ($env{'request.role.adv'}) {
_______________________________________________
LON-CAPA-cvs mailing list
LON-CAPA-cvs@mail.lon-capa.org
http://mail.lon-capa.org/mailman/listinfo/lon-capa-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic