--- loncom/interface/loncommon.pm 2022/05/29 20:37:21 1.1381 +++ loncom/interface/loncommon.pm 2022/05/30 00:17:38 1.1382 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.1381 2022/05/29 20:37:21 raeburn Exp $ +# $Id: loncommon.pm,v 1.1382 2022/05/30 00:17:38 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1521,26 +1521,25 @@ sub help_open_bug { $link = $url; } - my $target = ' target="_top"'; - if (($env{'request.lti.login'}) && ($env{'request.lti.target'} eq 'iframe')) { - $target = ''; - } - if (($env{'request.deeplink.login'}) && ($env{'request.deeplink.target'})) { - $target = ' target="'.$env{'request.deeplink.target'}.'"'; + my $target = '_top'; + if ((($env{'request.lti.login'}) && ($env{'request.lti.target'} eq 'iframe')) || + (($env{'request.deeplink.login'}) && ($env{'request.deeplink.target'} eq '_self'))) { + $target = '_blank'; } + # Add the text if ($text ne "") { $template .= "<table bgcolor='#AA3333' cellspacing='1' cellpadding='1' border='0'><tr>". - "<td bgcolor='#FF5555'><a".$target." href=\"$link\"><span style=\"color:#FFFFFF;font-size:10pt;\">$text</span></a>"; + "<td bgcolor='#FF5555'><a target=\"$target\" href=\"$link\"><span style=\"color:#FFFFFF;font-size:10pt;\">$text</span></a>"; } # Add the graphic my $title = &mt('Report a Bug'); my $bugicon=&lonhttpdurl("/adm/lonMisc/smallBug.gif"); $template .= <<"ENDTEMPLATE"; - <a$target href="$link" title="$title"><img src="$bugicon" border="0" alt="(Bug: $topic)" /></a> + <a target="$target" href="$link" title="$title"><img src="$bugicon" border="0" alt="(Bug: $topic)" /></a> ENDTEMPLATE if ($text ne '') { $template.='</td></tr></table>' }; return $template;