--- loncom/interface/lontiny.pm 2022/07/02 17:23:02 1.14 +++ loncom/interface/lontiny.pm 2022/07/02 19:55:15 1.15 @@ -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.14 2022/07/02 17:23:02 raeburn Exp $ +# $Id: lontiny.pm,v 1.15 2022/07/02 19:55:15 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -289,7 +289,7 @@ sub handler { sub launch_check { my ($linkuri,$symb) = @_; - my ($linkprotector,$linkproturi,$linkkey,$newlauncher); + my ($linkprotector,$linkproturi,$linkprotexit,$linkkey,$newlauncher); if ($env{'form.ttoken'}) { my %link_info = &Apache::lonnet::tmpget($env{'form.ttoken'}); &Apache::lonnet::tmpdel($env{'form.ttoken'}); @@ -327,6 +327,9 @@ sub launch_check { } else { &Apache::lonnet::appenv({'user.linkproturi' => $linkproturi}); } + if ($link_info{'linkprotexit'}) { + $linkprotexit = $link_info{'linkprotexit'}; + } } elsif ($link_info{'linkkey'} ne '') { $linkkey = $link_info{'linkkey'}; my $keyedlinkuri = $linkuri; @@ -366,7 +369,7 @@ sub launch_check { } if ($deeplink ne '') { my $disallow; - my ($state,$others,$listed,$scope,$protect,$display,$target) = split(/,/,$deeplink); + my ($state,$others,$listed,$scope,$protect,$display,$target,$exit) = split(/,/,$deeplink); if (($protect ne 'none') && ($protect ne '')) { my ($acctype,$item) = split(/:/,$protect); if ($acctype =~ /lti(c|d)$/) { @@ -394,6 +397,12 @@ sub launch_check { if ($env{'request.deeplink.target'} ne '') { &Apache::lonnet::delenv('request.deeplink.target'); } + if ($env{'request.linkprot'} ne '') { + &Apache::lonnet::delenv('request.linkprot'); + } + if ($env{'request.linkprotexit'} ne '') { + &Apache::lonnet::delenv('request.linkprotexit'); + } } } else { unless ($currdeeplinklogin eq $linkuri) { @@ -403,6 +412,11 @@ sub launch_check { } elsif ($env{'request.linkprot'}) { &Apache::lonnet::delenv('request.linkprot'); } + if ($linkprotexit) { + &Apache::lonnet::appenv({'request.linkprotexit' => $linkprotexit}); + } elsif ($env{'request.linkprotexit'}) { + &Apache::lonnet::delenv('request.linkprotexit'); + } if ($linkkey ne '') { &Apache::lonnet::appenv({'request.linkkey' => $linkkey}); } elsif ($env{'request.linkkey'} ne '') { @@ -424,6 +438,11 @@ sub launch_check { } elsif ($env{'request.linkprot'}) { &Apache::lonnet::delenv('request.linkprot'); } + if ($linkprotexit) { + &Apache::lonnet::appenv({'request.linkprotexit' => $linkprotexit}); + } elsif ($env{'request.linkprotexit'}) { + &Apache::lonnet::delenv('request.linkprotexit'); + } if ($linkkey ne '') { &Apache::lonnet::appenv({'request.linkkey' => $linkkey}); } else {