--- loncom/auth/migrateuser.pm 2023/07/05 20:42:05 1.25.2.5.2.9 +++ loncom/auth/migrateuser.pm 2024/02/10 14:55:02 1.25.2.5.2.10 @@ -1,7 +1,7 @@ # The LearningOnline Network # Starts a user off based of an existing token. # -# $Id: migrateuser.pm,v 1.25.2.5.2.9 2023/07/05 20:42:05 raeburn Exp $ +# $Id: migrateuser.pm,v 1.25.2.5.2.10 2024/02/10 14:55:02 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -475,7 +475,7 @@ sub handler { if ($handle) { &Apache::lonnet::transfer_profile_to_env($r->dir_config('lonIDsDir'), $handle); - my $checklaunch; + my ($checklaunch,$prevlaunch); if ($data{'origurl'} =~ m{^/tiny/$match_domain/\w+$}) { unless ($env{'request.linkprot'} eq $data{'linkprot'}) { $checklaunch = 1; @@ -569,6 +569,8 @@ sub handler { if ($env{'environment.remote'} eq 'on') { &Apache::lonnet::appenv({'environment.remote' => 'off'}); } + } elsif ($env{'request.deeplink.login'}) { + $prevlaunch = $env{'request.deeplink.login'}; } if ($data{'lti.login'}) { if ($env{'environment.remote'} eq 'on') { @@ -668,6 +670,9 @@ sub handler { if ($checklaunch) { $info{'checklaunch'} = 1; } + if ($prevlaunch) { + $info{'prevlaunch'} = $prevlaunch; + } my $token = &Apache::lonnet::tmpput(\%info,$r->dir_config('lonHostID'),'link'); unless (($token eq 'con_lost') || ($token eq 'refused') || ($token =~ /^error:/) || ($token eq 'unknown_cmd') || ($token eq 'no_such_host')) {