--- loncom/interface/lonhtmlcommon.pm 2018/04/14 02:29:44 1.392
+++ loncom/interface/lonhtmlcommon.pm 2020/08/30 20:30:22 1.396
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common html routines
#
-# $Id: lonhtmlcommon.pm,v 1.392 2018/04/14 02:29:44 raeburn Exp $
+# $Id: lonhtmlcommon.pm,v 1.396 2020/08/30 20:30:22 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -105,9 +105,13 @@ sub direct_parm_link {
$filter=&entity_encode($filter);
$part=&entity_encode($part);
if (($symb) && (&Apache::lonnet::allowed('opa')) && ($target ne 'tex')) {
- return "$linktext";
+ my $target=' target="_top"';
+ if (($env{'request.lti.login'}) && ($env{'request.lti.target'} eq 'iframe')) {
+ $target='';
+ }
+ return "$linktext";
} else {
- return $linktext;
+ return $linktext;
}
}
##############################################
@@ -1929,9 +1933,9 @@ returns: nothing
}
}
}
- my $target;
- unless (($env{'request.lti.login'}) && ($env{'request.lti.target'} eq 'iframe')) {
- $target='_top';
+ my $target = '_top';
+ if (($env{'request.lti.login'}) && ($env{'request.lti.target'} eq 'iframe')) {
+ $target='';
}
$menulink = { href =>'/adm/menu',
title =>'Go to main menu',
@@ -1954,7 +1958,10 @@ returns: nothing
class => 'LC_menubuttons_link',
};
if ($env{'request.noversionuri'} eq '/adm/searchcat') {
- $hashref->{'target'} = '_top';
+ $hashref->{'target'} = '_top';
+ if (($env{'request.lti.login'}) && ($env{'request.lti.target'} eq 'iframe')) {
+ $hashref->{'target'} = '';
+ }
}
$links=&htmltag( 'a','',
$hashref);
@@ -2653,9 +2660,9 @@ sub course_custom_roles {
sub resource_info_box {
- my ($symb,$onlyfolderflag,$stuvcurrent,$stuvdisp)=@_;
+ my ($symb,$onlyfolderflag,$stuvcurrent,$stuvdisp,$divforres)=@_;
my $return='';
- if ($stuvcurrent ne '') {
+ if (($stuvcurrent ne '') || ($divforres)) {
$return = '
'.&mt('No context provided.').'
'; } - if ($stuvcurrent ne '') { + if (($stuvcurrent ne '') || ($divforres)) { $return .= '