--- loncom/auth/lonauth.pm 2022/07/08 15:40:03 1.121.2.24.2.4 +++ loncom/auth/lonauth.pm 2022/08/30 12:10:43 1.121.2.24.2.5 @@ -1,7 +1,7 @@ # The LearningOnline Network # User Authentication Module # -# $Id: lonauth.pm,v 1.121.2.24.2.4 2022/07/08 15:40:03 raeburn Exp $ +# $Id: lonauth.pm,v 1.121.2.24.2.5 2022/08/30 12:10:43 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -46,7 +46,7 @@ use CGI::Cookie(); # ------------------------------------------------------------ Successful login sub success { my ($r, $username, $domain, $authhost, $lowerurl, $extra_env, - $form,$cid,$expirepub) = @_; + $form,$cid,$expirepub,$write_to_opener) = @_; # ------------------------------------------------------------ Get cookie ready my $cookie = @@ -178,9 +178,17 @@ sub success { &Apache::lonnet::appenv({'environment.remote' => 'off'}); } } + my $startupremote; + if ($write_to_opener) { + if ($env{'environment.remote'} eq 'on') { + &Apache::lonnet::appenv({'environment.remote' => 'off'}); + } + $args->{'redirect'} = [0,$destination,'',$write_to_opener]; + } else { + $startupremote=&Apache::lonmenu::startupremote($destination); + } my $windowinfo=&Apache::lonmenu::open($env{'browser.os'}); - my $startupremote=&Apache::lonmenu::startupremote($destination); my $remoteinfo=&Apache::lonmenu::load_remote_msg($lowerurl); my $setflags=&Apache::lonmenu::setflags(); my $maincall=&Apache::lonmenu::maincall(); @@ -190,7 +198,9 @@ sub success { my $continuelink; if ($env{'environment.remote'} eq 'off') { - $continuelink=''.&mt('Continue').''; + unless ($write_to_opener) { + $continuelink=''.&mt('Continue').''; + } } # ------------------------------------------------- Output for successful login