--- rat/lonratmenu.pm 2016/02/05 17:46:08 1.21 +++ rat/lonratmenu.pm 2022/05/27 04:35:37 1.22 @@ -2,7 +2,7 @@ # Build menu bar for Advanced RAT. Uses javascript code originally in # static file: rat/client/code.html, now in rat/client/ratcode.js # -# $Id: lonratmenu.pm,v 1.21 2016/02/05 17:46:08 damieng Exp $ +# $Id: lonratmenu.pm,v 1.22 2022/05/27 04:35:37 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -46,10 +46,16 @@ sub handler { my $readfile=$r->uri; $readfile=~s/\/loadonly\/adveditmenu$//; + my $target = '_top'; + if ((($env{'request.lti.login'}) && ($env{'request.lti.target'} eq 'iframe')) || + (($env{'request.deeplink.login'}) && ($env{'request.deeplink.target'}))) { + $target = '_parent'; + } + # Breadcrumbs my $brcrum = [{'href' => &Apache::loncommon::authorspace($r->uri), 'text' => 'Authoring Space', - 'target' => '_top'}, + 'target' => $target}, {'href' => '', 'text' => 'RAT'}, {'href' => '', @@ -133,6 +139,7 @@ sub handler { # Print Advanced RAT page header $r->send_http_header('text/html'); + my $frameset = 1; $r->print( &Apache::loncommon::start_page( @@ -142,7 +149,7 @@ sub handler { 'bread_crumbs' => $brcrum,}) .&Apache::loncommon::head_subbox( - &Apache::loncommon::CSTR_pageheader() + &Apache::loncommon::CSTR_pageheader('',$frameset) .$functions) .&Apache::loncommon::end_page()