[LON-CAPA-cvs] cvs: loncom /auth migrateuser.pm
raeburn
raeburn at source.lon-capa.org
Sat May 21 02:28:35 EDT 2022
raeburn Sat May 21 06:28:35 2022 EDT
Modified files:
/loncom/auth migrateuser.pm
Log:
- Bug 6754 LON-CAPA as LTI Provider
When session was launched via LTI (i.e., lti.login is 1), use & instead
of & in query string part of URL so window.location.href will work.
Index: loncom/auth/migrateuser.pm
diff -u loncom/auth/migrateuser.pm:1.59 loncom/auth/migrateuser.pm:1.60
--- loncom/auth/migrateuser.pm:1.59 Tue Mar 29 19:12:04 2022
+++ loncom/auth/migrateuser.pm Sat May 21 06:28:35 2022
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Starts a user off based of an existing token.
#
-# $Id: migrateuser.pm,v 1.59 2022/03/29 19:12:04 raeburn Exp $
+# $Id: migrateuser.pm,v 1.60 2022/05/21 06:28:35 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -999,15 +999,26 @@
} elsif ($data{'origurl'} =~ m{^/tiny/$match_domain/\w+$}) {
$next_url=$data{'origurl'};
} else {
- $next_url='/adm/roles?selectrole=1&'.&escape($data{'role'}).'=1';
- if ($data{'origurl'} ne '') {
- $next_url .= '&orgurl='.&escape($data{'origurl'});
+ if ($data{'lti.login'}) {
+ $next_url='/adm/roles?selectrole=1&'.&escape($data{'role'}).'=1';
+ if ($data{'origurl'} ne '') {
+ $next_url .= '&orgurl='.&escape($data{'origurl'});
+ }
+ } else {
+ $next_url='/adm/roles?selectrole=1&'.&escape($data{'role'}).'=1';
+ if ($data{'origurl'} ne '') {
+ $next_url .= '&orgurl='.&escape($data{'origurl'});
+ }
}
}
if ($data{'lti.login'}) {
if (($data{'origurl'} =~ m{/default_\d+\.sequence$}) ||
($data{'origurl'} =~ m{^/res/.+\.sequence$})) {
- $next_url .= '&navmap=1';
+ if ($reuse_session) {
+ $next_url .= '&navmap=1';
+ } else {
+ $next_url .= '&navmap=1';
+ }
}
}
if ($reuse_session) {
More information about the LON-CAPA-cvs
mailing list