--- loncom/auth/switchserver.pm 2021/06/27 17:25:47 1.56 +++ loncom/auth/switchserver.pm 2022/06/30 21:04:13 1.61 @@ -1,7 +1,7 @@ # The LearningOnline Network # Switch Servers Handler # -# $Id: switchserver.pm,v 1.56 2021/06/27 17:25:47 raeburn Exp $ +# $Id: switchserver.pm,v 1.61 2022/06/30 21:04:13 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -97,7 +97,7 @@ sub flush_course_logs { sub handler { my ($r) = @_; - + my $handle=&init_env($r); if (!defined($handle)) { return FORBIDDEN; } @@ -294,15 +294,13 @@ sub handler { my $ssologoutscript = ''; if ($env{'request.sso.login'}) { $info{'sso.login'} = $env{'request.sso.login'}; - my $dom = $env{'user.domain'}; if (defined($r->dir_config("lonSSOUserLogoutScriptFile_$info{domain}"))) { if (open(my $fh,'<',$r->dir_config("lonSSOUserLogoutScriptFile_$info{domain}"))) { $ssologoutscript .= join('',<$fh>); close($fh); } } - if ($env{'request.sso.login'} - && defined($r->dir_config('lonSSOUserLogoutScriptFile'))) { + if (defined($r->dir_config('lonSSOUserLogoutScriptFile'))) { if (open(my $fh,'<',$r->dir_config('lonSSOUserLogoutScriptFile'))) { $ssologoutscript .= join('',<$fh>); close($fh); @@ -314,12 +312,16 @@ sub handler { } if ($env{'request.linkprot'}) { $info{'linkprot'} = $env{'request.linkprot'}; + foreach my $item ('linkprotuser','linkprotexit') { + if ($env{'request.'.$item}) { + $info{$item} = $env{'request.'.$item}; + } + } + } elsif ($env{'request.linkkey'} ne '') { + $info{'linkkey'} = $env{'request.linkkey'}; } if ($env{'request.deeplink.login'}) { $info{'deeplink.login'} = $env{'request.deeplink.login'}; - if ($env{'request.linkkey'}) { - $info{'linkkey'} = $env{'request.linkkey'}; - } } if ($env{'request.lti.login'}) { $info{'lti.login'} = $env{'request.lti.login'};