version 1.152, 2018/05/08 15:44:11
|
version 1.153, 2018/07/01 00:03:42
|
Line 170 sub success {
|
Line 170 sub success {
|
$windowname .= 'lti';
|
$windowname .= 'lti';
|
}
|
}
|
my $windowinfo = Apache::lonhtmlcommon::scripttag('self.name="'.$windowname.'";');
|
my $windowinfo = Apache::lonhtmlcommon::scripttag('self.name="'.$windowname.'";');
|
my $header = '<meta HTTP-EQUIV="Refresh" CONTENT="0; url='.$destination.'" />';
|
|
my $brcrum = [{'href' => '',
|
my $brcrum = [{'href' => '',
|
'text' => 'Successful Login'},];
|
'text' => 'Successful Login'},];
|
my $args = {'bread_crumbs' => $brcrum,};
|
my $args = {'bread_crumbs' => $brcrum,};
|
Line 207 sub success {
|
Line 206 sub success {
|
}
|
}
|
$r->send_http_header;
|
$r->send_http_header;
|
|
|
my $start_page;
|
my ($start_page,$js,$pagebody,$end_page);
|
if ($env{'request.lti.login'}) {
|
if ($env{'request.lti.login'}) {
|
$args = {'only_body' => 1,};
|
$args = {'only_body' => 1};
|
$start_page=&Apache::loncommon::start_page('',$header,$args);
|
if ($env{'request.lti.target'} eq '') {
|
|
my $ltitarget = (($destination =~ /\?/) ? '&' : '?').
|
|
'ltitarget=iframe';
|
|
$js = <<"ENDJS";
|
|
|
|
<script type="text/javascript">
|
|
// <![CDATA[
|
|
function setLTItarget() {
|
|
var newloc = '$destination';
|
|
if (parent !== window) {
|
|
newloc += '$ltitarget';
|
|
}
|
|
window.location.href=newloc;
|
|
}
|
|
// ]]>
|
|
</script>
|
|
|
|
ENDJS
|
|
$args->{'add_entries'} = {'onload' => "javascript:setLTItarget();"};
|
|
$pagebody = '<noscript><span class="LC_warning">'
|
|
.&mt('Use of LON-CAPA requires Javascript to be enabled in your web browser.')
|
|
.'</span></noscript>';
|
|
} else {
|
|
$args->{'redirect'} = [0,$destination,1];
|
|
}
|
|
$start_page=&Apache::loncommon::start_page('',$js,$args);
|
} else {
|
} else {
|
|
$args->{'redirect'} = [0,$destination];
|
$start_page=&Apache::loncommon::start_page('Successful Login',
|
$start_page=&Apache::loncommon::start_page('Successful Login',
|
$header,$args);
|
$js,$args);
|
}
|
|
my $end_page =&Apache::loncommon::end_page();
|
|
|
|
my $continuelink='<a href="'.$destination.'">'.&mt('Continue').'</a>';
|
|
|
|
my $pagebody;
|
|
unless ($env{'request.lti.login'}) {
|
|
my %lt=&Apache::lonlocal::texthash(
|
my %lt=&Apache::lonlocal::texthash(
|
'wel' => 'Welcome',
|
'wel' => 'Welcome',
|
'pro' => 'Login problems?',
|
'pro' => 'Login problems?',
|
Line 232 sub success {
|
Line 251 sub success {
|
$pagebody .= '<p><a href="'.$loginhelp.'">'.$lt{'pro'}.'</a></p>';
|
$pagebody .= '<p><a href="'.$loginhelp.'">'.$lt{'pro'}.'</a></p>';
|
}
|
}
|
}
|
}
|
|
$end_page = &Apache::loncommon::end_page();
|
$r->print(<<ENDSUCCESS);
|
$r->print(<<ENDSUCCESS);
|
$start_page
|
$start_page
|
$windowinfo
|
$windowinfo
|
$pagebody
|
$pagebody
|
$continuelink
|
|
$end_page
|
$end_page
|
ENDSUCCESS
|
ENDSUCCESS
|
return;
|
return;
|