--- loncom/auth/lonauth.pm 2018/03/23 01:01:29 1.149 +++ loncom/auth/lonauth.pm 2018/04/21 21:29:31 1.151 @@ -1,7 +1,7 @@ # The LearningOnline Network # User Authentication Module # -# $Id: lonauth.pm,v 1.149 2018/03/23 01:01:29 raeburn Exp $ +# $Id: lonauth.pm,v 1.151 2018/04/21 21:29:31 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -160,7 +160,11 @@ sub success { $destination .= 'source=login'; } - my $windowinfo = Apache::lonhtmlcommon::scripttag('self.name="loncapaclient";'); + my $windowname = 'loncapaclient'; + if ($env{'request.lti.login'}) { + $windowname .= 'lti'; + } + my $windowinfo = Apache::lonhtmlcommon::scripttag('self.name="'.$windowname.'";'); my $header = ''; my $brcrum = [{'href' => '', 'text' => 'Successful Login'},]; @@ -198,28 +202,35 @@ sub success { } $r->send_http_header; - my $start_page=&Apache::loncommon::start_page('Successful Login', - $header,$args); + my $start_page; + if ($env{'request.lti.login'}) { + $args = {'only_body' => 1,}; + $start_page=&Apache::loncommon::start_page('',$header,$args); + } else { + $start_page=&Apache::loncommon::start_page('Successful Login', + $header,$args); + } my $end_page =&Apache::loncommon::end_page(); my $continuelink=''.&mt('Continue').''; - my %lt=&Apache::lonlocal::texthash( - 'wel' => 'Welcome', - 'pro' => 'Login problems?', - ); - my $loginhelp = &loginhelpdisplay($domain); - if ($loginhelp) { - $loginhelp = '

'.$lt{'pro'}.'

'; + my $pagebody; + unless ($env{'request.lti.login'}) { + my %lt=&Apache::lonlocal::texthash( + 'wel' => 'Welcome', + 'pro' => 'Login problems?', + ); + $pagebody = "

$lt{'wel'}

\n". + &mt('Welcome to the Learning[_1]Online[_2] Network with CAPA. Please wait while your session is being set up.','',''); + my $loginhelp = &loginhelpdisplay($domain); + if ($loginhelp) { + $pagebody .= '

'.$lt{'pro'}.'

'; + } } - - my $welcome = &mt('Welcome to the Learning[_1]Online[_2] Network with CAPA. Please wait while your session is being set up.','',''); $r->print(<$lt{'wel'} -$welcome -$loginhelp +$pagebody $continuelink $end_page ENDSUCCESS