--- loncom/interface/lontiny.pm 2023/06/04 00:36:18 1.20 +++ loncom/interface/lontiny.pm 2024/02/09 20:08:16 1.21 @@ -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.20 2023/06/04 00:36:18 raeburn Exp $ +# $Id: lontiny.pm,v 1.21 2024/02/09 20:08:16 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -308,7 +308,8 @@ sub handler { sub launch_check { my ($linkuri,$symb) = @_; - my ($linkprotector,$linkproturi,$linkprotexit,$linkprotpbid,$linkprotpburl,$linkkey,$newlauncher); + my ($linkprotector,$linkproturi,$linkprotexit,$linkprotpbid,$linkprotpburl, + $linkkey,$newlauncher,$prevlaunch); if ($env{'form.ttoken'}) { my %link_info = &Apache::lonnet::tmpget($env{'form.ttoken'}); &Apache::lonnet::tmpdel($env{'form.ttoken'}); @@ -380,6 +381,9 @@ sub launch_check { if ($link_info{'checklaunch'}) { $newlauncher = 1; } + if ($link_info{'prevlaunch'} ne '') { + $prevlaunch = $link_info{'prevlaunch'}; + } } my $currdeeplinklogin = $env{'request.deeplink.login'}; my $deeplink; @@ -436,7 +440,8 @@ sub launch_check { } } } else { - unless ($currdeeplinklogin eq $linkuri) { + if (($currdeeplinklogin ne $linkuri) || + (($prevlaunch ne '') && ($currdeeplinklogin ne $prevlaunch))) { if (($linkprotector) || ($linkkey ne '')) { if ($linkprotector) { &Apache::lonnet::appenv({'request.linkprot' => $linkprotector.':'.$linkproturi});