--- loncom/interface/lontiny.pm 2018/01/12 13:33:38 1.1 +++ loncom/interface/lontiny.pm 2018/05/10 03:49:51 1.3 @@ -2,7 +2,7 @@ # Extract domain, courseID, and symb from a shortened URL, # and switch role to a role in designated course. # -# $Id: lontiny.pm,v 1.1 2018/01/12 13:33:38 raeburn Exp $ +# $Id: lontiny.pm,v 1.3 2018/05/10 03:49:51 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -132,13 +132,16 @@ sub handler { sub do_redirect { my ($r,$destination) = @_; - my $windowinfo = Apache::lonhtmlcommon::scripttag('self.name="loncapaclient";'); + my $windowname = 'loncapaclient'; + if ($env{'request.lti.login'}) { + $windowname .= 'lti'; + } my $header = ''; my $args = {'bread_crumbs' => [{'href' => '','text' => 'Role initialization'},],}; &Apache::loncommon::content_type($r,'text/html'); $r->send_http_header; $r->print(&Apache::loncommon::start_page('Valid link',$header,$args). - &Apache::lonhtmlcommon::scripttag('self.name="loncapaclient";'). + &Apache::lonhtmlcommon::scripttag('self.name="'.$windowname.'";'). '
'.&mt('Welcome to the Learning[_1]Online[_2] Network with CAPA. Please wait while your session is being set up.','','').'
'. @@ -273,13 +276,16 @@ ENDJS sub generic_error { my ($r) = @_; - my $linktext; - if ($env{'user.adv'}) { - $linktext = &mt('Continue to your roles page'); - } else { - $linktext = &mt('Continue to your courses page'); + my $continuelink; + unless ($env{'request.lti.login'}) { + my $linktext; + if ($env{'user.adv'}) { + $linktext = &mt('Continue to your roles page'); + } else { + $linktext = &mt('Continue to your courses page'); + } + $continuelink=''.$linktext.''; } - my $continuelink=''.$linktext.''; my $msg = &mt('The page you requested does not exist.'); &Apache::loncommon::content_type($r,'text/html'); $r->send_http_header;