--- loncom/interface/lonhtmlcommon.pm 2017/12/18 16:36:34 1.391 +++ loncom/interface/lonhtmlcommon.pm 2018/04/14 02:29:44 1.392 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common html routines # -# $Id: lonhtmlcommon.pm,v 1.391 2017/12/18 16:36:34 raeburn Exp $ +# $Id: lonhtmlcommon.pm,v 1.392 2018/04/14 02:29:44 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -78,7 +78,11 @@ sub java_not_enabled { sub coursepreflink { my ($text,$category)=@_; if (&Apache::lonnet::allowed('opa',$env{'request.course.id'})) { - return '&"').'">'.$text.''; + my $target =' target="_top"'; + if (($env{'request.lti.login'}) && ($env{'request.lti.target'} eq 'iframe')) { + $target =''; + } + return '&"').'">'.$text.''; } else { return ''; } @@ -1925,9 +1929,13 @@ returns: nothing } } } + my $target; + unless (($env{'request.lti.login'}) && ($env{'request.lti.target'} eq 'iframe')) { + $target='_top'; + } $menulink = { href =>'/adm/menu', title =>'Go to main menu', - target =>'_top', + target =>$target, text =>$description, no_mt =>$no_mt_descr, }; if($last) {