[LON-CAPA-cvs] cvs: loncom /interface londocs.pm

raeburn raeburn at source.lon-capa.org
Fri Mar 6 14:40:58 EST 2020


raeburn		Fri Mar  6 19:40:58 2020 EDT

  Modified files:              
    /loncom/interface	londocs.pm 
  Log:
  - Support launch of external resource with anchor from link in Course Editor.
  
  
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.669 loncom/interface/londocs.pm:1.670
--- loncom/interface/londocs.pm:1.669	Fri Mar  6 18:53:27 2020
+++ loncom/interface/londocs.pm	Fri Mar  6 19:40:57 2020
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.669 2020/03/06 18:53:27 raeburn Exp $
+# $Id: londocs.pm,v 1.670 2020/03/06 19:40:57 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -4203,12 +4203,7 @@
             if (&Apache::lonnet::symbverify($symb,$url)) {
                 my $shownsymb = $symb;
                 if ($isexternal) {
-                    if ($url =~ /^([^#]+)#([^#]+)$/) {
-                        $url = $1;
-                        $anchor = $2;
-                        my $escan = &escape('#');
-                        $shownsymb =~ s/^([^\#]+)#([^\#]+)$/$1$escan$2/;
-                    }
+                    $url =~ s/\#[^#]+$//;
                     if ($container eq 'page') {
                         $url = &Apache::lonnet::clutter($url);
                     }




More information about the LON-CAPA-cvs mailing list