[LON-CAPA-cvs] cvs: loncom /auth lonauth.pm
raeburn
raeburn at source.lon-capa.org
Sat Apr 21 17:29:32 EDT 2018
raeburn Sat Apr 21 21:29:32 2018 EDT
Modified files:
/loncom/auth lonauth.pm
Log:
- Bug 6754 LON-CAPA as LTI Provider
- Simplified display when initializing LON-CAPA session after LTI launch.
Index: loncom/auth/lonauth.pm
diff -u loncom/auth/lonauth.pm:1.150 loncom/auth/lonauth.pm:1.151
--- loncom/auth/lonauth.pm:1.150 Sat Apr 14 02:30:11 2018
+++ loncom/auth/lonauth.pm Sat Apr 21 21:29:31 2018
@@ -1,7 +1,7 @@
# The LearningOnline Network
# User Authentication Module
#
-# $Id: lonauth.pm,v 1.150 2018/04/14 02:30:11 raeburn Exp $
+# $Id: lonauth.pm,v 1.151 2018/04/21 21:29:31 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -202,28 +202,35 @@
}
$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='<a href="'.$destination.'">'.&mt('Continue').'</a>';
- my %lt=&Apache::lonlocal::texthash(
- 'wel' => 'Welcome',
- 'pro' => 'Login problems?',
- );
- my $loginhelp = &loginhelpdisplay($domain);
- if ($loginhelp) {
- $loginhelp = '<p><a href="'.$loginhelp.'">'.$lt{'pro'}.'</a></p>';
+ my $pagebody;
+ unless ($env{'request.lti.login'}) {
+ my %lt=&Apache::lonlocal::texthash(
+ 'wel' => 'Welcome',
+ 'pro' => 'Login problems?',
+ );
+ $pagebody = "<h1>$lt{'wel'}</h1>\n".
+ &mt('Welcome to the Learning[_1]Online[_2] Network with CAPA. Please wait while your session is being set up.','<i>','</i>');
+ my $loginhelp = &loginhelpdisplay($domain);
+ if ($loginhelp) {
+ $pagebody .= '<p><a href="'.$loginhelp.'">'.$lt{'pro'}.'</a></p>';
+ }
}
-
- my $welcome = &mt('Welcome to the Learning[_1]Online[_2] Network with CAPA. Please wait while your session is being set up.','<i>','</i>');
$r->print(<<ENDSUCCESS);
$start_page
$windowinfo
-<h1>$lt{'wel'}</h1>
-$welcome
-$loginhelp
+$pagebody
$continuelink
$end_page
ENDSUCCESS
More information about the LON-CAPA-cvs
mailing list