--- loncom/interface/lonhelpmenu.pm 2017/02/20 00:36:40 1.45 +++ loncom/interface/lonhelpmenu.pm 2022/05/30 00:17:38 1.48 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # generate frame-based help system # -# $Id: lonhelpmenu.pm,v 1.45 2017/02/20 00:36:40 raeburn Exp $ +# $Id: lonhelpmenu.pm,v 1.48 2022/05/30 00:17:38 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -180,6 +180,15 @@ sub helpmenu_items { lastloc => 'Go back', close => 'Close', ); + my ($target,$bugs_target); + if ((($env{'request.lti.login'}) && ($env{'request.lti.target'} eq 'iframe')) || + (($env{'request.deeplink.login'}) && ($env{'request.deeplink.target'} eq '_self'))) { + $target = '_parent'; + $bugs_target = '_blank'; + } else { + $target = '_top'; + $bugs_target = '_top'; + } my %items = ( general => { href => '/adm/help/'.$general_help.'.hlp', @@ -211,6 +220,7 @@ sub helpmenu_items { img => $location.'/lonMisc/smallBug.gif', alt => $lt{'bugs'}, text => $lt{'bugs'}, + target => $bugs_target, }, manuals_web => { href => '', @@ -229,14 +239,14 @@ sub helpmenu_items { img => '/res/adm/pages/tolastloc.png', alt => $lt{'lastloc'}, text => $lt{'lastloc'}, - target => '_top', + target => $target, }, close => { href => 'javascript:window.close()', img => $location.'/lonIcons/close.gif', alt => $lt{'close'}, text => $lt{'close'}, - target => '_top', + target => $target, }, ); my %help_submenu = ( @@ -392,6 +402,13 @@ sub display_help_mainpage { $r->print(&Apache::loncommon::start_page('Help Content',undef, {'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')) { + $target = '_parent'; + } if ($stayOnPage) { $r->print('
'); } @@ -425,7 +442,7 @@ sub display_help_mainpage { &mt('[_1]Note[_2]: questions about course content should not be directed to the support team, but instead should be sent to the course instructor.'). ' '. &mt('This can be done by clicking the [_1]Communicate[_2] link or the "Send Feedback" link when viewing a content page.', - '','')); + '','')); } $r->print("

"); }