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

raeburn raeburn at source.lon-capa.org
Mon May 30 08:31:07 EDT 2022


raeburn		Mon May 30 12:31:07 2022 EDT

  Modified files:              
    /loncom/interface	lonhelpmenu.pm 
  Log:
  - Bug 6907
    Stop deep-linked items escaping iframe context.
  
  
Index: loncom/interface/lonhelpmenu.pm
diff -u loncom/interface/lonhelpmenu.pm:1.48 loncom/interface/lonhelpmenu.pm:1.49
--- loncom/interface/lonhelpmenu.pm:1.48	Mon May 30 00:17:38 2022
+++ loncom/interface/lonhelpmenu.pm	Mon May 30 12:31:06 2022
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # generate frame-based help system
 #
-# $Id: lonhelpmenu.pm,v 1.48 2022/05/30 00:17:38 raeburn Exp $
+# $Id: lonhelpmenu.pm,v 1.49 2022/05/30 12:31:06 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -403,15 +403,13 @@
                                                  {'only_body' => 1,}));
     }
     my $target = '_top';
-    if (($env{'request.lti.login'}) && ($env{'request.lti.target'} eq 'iframe')) {
-        $target = '_parent';
-    }
-    if (($env{'request.deeplink.login'}) && ($env{'request.deeplink.target'} eq '_self')) {
+    if ((($env{'request.lti.login'}) && ($env{'request.lti.target'} eq 'iframe')) ||
+        (($env{'request.deeplink.login'}) && ($env{'request.deeplink.target'} eq '_self'))) {
         $target = '_parent';
     }
     if ($stayOnPage) {
         $r->print('<div>');
-    } 
+    }
     $r->print('<b>'.$lt{'chen'});
     if ($requestmail) {
         $r->print(', '.$lt{'orto'});




More information about the LON-CAPA-cvs mailing list