version 1.65, 2022/08/24 20:58:50
|
version 1.70, 2024/02/10 14:53:30
|
Line 289 sub ip_changed {
|
Line 289 sub ip_changed {
|
'username' => $dataref->{'username'}, |
'username' => $dataref->{'username'}, |
'sessionserver' => $lonhost, |
'sessionserver' => $lonhost, |
); |
); |
my @names = ('origurl','symb','role','linkprotuser','linkprotexit','linkprot','linkkey'); |
my @names = ('origurl','symb','role','linkprotuser','linkprotexit','linkprot','linkkey','linkprotpbid','linkprotpburl'); |
foreach my $name (@names) { |
foreach my $name (@names) { |
if ($dataref->{$name} ne '') { |
if ($dataref->{$name} ne '') { |
$info{$name} = $dataref->{$name}; |
$info{$name} = $dataref->{$name}; |
} |
} |
} |
} |
|
if ($info{'origurl'} eq '/adm/email') { |
|
if (($dataref->{'display'}) && ($dataref->{'mailrecip'})) { |
|
if (&unescape($dataref->{'mailrecip'}) eq $dataref->{'username'}.':'.$dataref->{'domain'}) { |
|
$info{'display'} = $dataref->{'display'}; |
|
$info{'mailrecip'} = $dataref->{'mailrecip'}; |
|
} |
|
} |
|
} |
my $iptoken = &Apache::lonnet::tmpput(\%info,$switchto,'link'); |
my $iptoken = &Apache::lonnet::tmpput(\%info,$switchto,'link'); |
unless ($iptoken eq 'conlost') { |
unless ($iptoken eq 'conlost') { |
$url .= (($url =~ /\?/) ? '&' : '?') . 'iptoken='.$iptoken; |
$url .= (($url =~ /\?/) ? '&' : '?') . 'iptoken='.$iptoken; |
Line 744 sub handler {
|
Line 752 sub handler {
|
if ($handle) { |
if ($handle) { |
&Apache::lonnet::transfer_profile_to_env($r->dir_config('lonIDsDir'), |
&Apache::lonnet::transfer_profile_to_env($r->dir_config('lonIDsDir'), |
$handle); |
$handle); |
my $checklaunch; |
my ($checklaunch,$prevlaunch); |
if ($data{'origurl'} =~ m{^/tiny/$match_domain/\w+$}) { |
if ($data{'origurl'} =~ m{^/tiny/$match_domain/\w+$}) { |
unless ($env{'request.linkprot'} eq $data{'linkprot'}) { |
unless ($env{'request.linkprot'} eq $data{'linkprot'}) { |
$checklaunch = 1; |
$checklaunch = 1; |
Line 752 sub handler {
|
Line 760 sub handler {
|
unless ($env{'request.linkprotexit'} eq $data{'linkprotexit'}) { |
unless ($env{'request.linkprotexit'} eq $data{'linkprotexit'}) { |
$checklaunch = 1; |
$checklaunch = 1; |
} |
} |
|
unless ($env{'request.linkprotpbid'} eq $data{'linkprotpbid'}) { |
|
$checklaunch = 1; |
|
} |
|
unless ($env{'request.linkprotpburl'} eq $data{'linkprotpburl'}) { |
|
$checklaunch = 1; |
|
} |
unless ($env{'request.linkkey'} eq $data{'linkkey'}) { |
unless ($env{'request.linkkey'} eq $data{'linkkey'}) { |
$checklaunch = 1; |
$checklaunch = 1; |
} |
} |
Line 763 sub handler {
|
Line 777 sub handler {
|
if (($env{'user.name'} ne $data{'username'}) || |
if (($env{'user.name'} ne $data{'username'}) || |
($env{'user.domain'} ne $data{'domain'})) { |
($env{'user.domain'} ne $data{'domain'})) { |
my %linkprot_env; |
my %linkprot_env; |
foreach my $item ('linkprot','linkprotexit','deeplink.login') { |
foreach my $item ('linkprot','linkprotexit','linkprotpbid','linkprotpburl','deeplink.login') { |
if ($data{$item}) { |
if ($data{$item}) { |
$linkprot_env{$item} = $data{$item}; |
$linkprot_env{$item} = $data{$item}; |
} |
} |
Line 829 sub handler {
|
Line 843 sub handler {
|
} |
} |
if ($data{'deeplink.login'}) { |
if ($data{'deeplink.login'}) { |
&Apache::lonnet::appenv({'request.deeplink.login' => $data{'deeplink.login'}}); |
&Apache::lonnet::appenv({'request.deeplink.login' => $data{'deeplink.login'}}); |
|
} elsif ($env{'request.deeplink.login'}) { |
|
$prevlaunch = $env{'request.deeplink.login'}; |
} |
} |
if ($data{'lti.login'}) { |
if ($data{'lti.login'}) { |
my $needslogout; |
my $needslogout; |
Line 913 sub handler {
|
Line 929 sub handler {
|
my %info; |
my %info; |
if ($env{'request.linkprot'}) { |
if ($env{'request.linkprot'}) { |
$info{'linkprot'} = $env{'request.linkprot'}; |
$info{'linkprot'} = $env{'request.linkprot'}; |
foreach my $item ('linkprotuser','linkprotexit') { |
foreach my $item ('linkprotuser','linkprotexit','linkprotpbid','linkprotpburl') { |
if ($data{$item}) { |
if ($data{$item}) { |
$info{$item} = $data{$item}; |
$info{$item} = $data{$item}; |
} |
} |
Line 925 sub handler {
|
Line 941 sub handler {
|
if ($checklaunch) { |
if ($checklaunch) { |
$info{'checklaunch'} = 1; |
$info{'checklaunch'} = 1; |
} |
} |
|
if ($prevlaunch) { |
|
$info{'prevlaunch'} = $prevlaunch; |
|
} |
my $token = &Apache::lonnet::tmpput(\%info,$r->dir_config('lonHostID'),'link'); |
my $token = &Apache::lonnet::tmpput(\%info,$r->dir_config('lonHostID'),'link'); |
unless (($token eq 'con_lost') || ($token eq 'refused') || ($token =~ /^error:/) || |
unless (($token eq 'con_lost') || ($token eq 'refused') || ($token =~ /^error:/) || |
($token eq 'unknown_cmd') || ($token eq 'no_such_host')) { |
($token eq 'unknown_cmd') || ($token eq 'no_such_host')) { |
Line 972 sub handler {
|
Line 991 sub handler {
|
if ($data{'linkprotexit'}) { |
if ($data{'linkprotexit'}) { |
$extra_env->{'request.linkprotexit'} = $data{'linkprotexit'}; |
$extra_env->{'request.linkprotexit'} = $data{'linkprotexit'}; |
} |
} |
|
if ($data{'linkprotpbid'}) { |
|
$extra_env->{'request.linkprotpbid'} = $data{'linkprotpbid'}; |
|
} |
|
if ($data{'linkprotpburl'}) { |
|
$extra_env->{'request.linkprotpburl'} = $data{'linkprotpburl'}; |
|
} |
} |
} |
foreach my $item ('linkprotuser','linkprotexit') { |
foreach my $item ('linkprotuser','linkprotexit','linkprotpbid','linkprotpburl') { |
if ($data{$item} ne '') { |
if ($data{$item} ne '') { |
$form{$item} = $data{$item}; |
$form{$item} = $data{$item}; |
} |
} |
Line 996 sub handler {
|
Line 1021 sub handler {
|
$extra_env = {'request.deeplink.login' => $data{'deeplink.login'}}; |
$extra_env = {'request.deeplink.login' => $data{'deeplink.login'}}; |
} |
} |
} |
} |
|
if ($desturl eq '/adm/email') { |
|
if (($data{'display'}) && ($data{'mailrecip'})) { |
|
if (&unescape($data{'mailrecip'}) eq "$data{'username'}:$data{'domain'}") { |
|
$form{'display'} = &unescape($data{'display'}); |
|
} |
|
} |
|
} |
} |
} |
my $skipcritical; |
my $skipcritical; |
if ($data{'lti.login'}) { |
if ($data{'lti.login'}) { |
Line 1078 sub handler {
|
Line 1110 sub handler {
|
if ($data{'linkprotexit'}) { |
if ($data{'linkprotexit'}) { |
$extra_env->{'request.linkprotexit'} = $data{'linkprotexit'}; |
$extra_env->{'request.linkprotexit'} = $data{'linkprotexit'}; |
} |
} |
foreach my $item ('linkprotuser','linkprotexit') { |
if ($data{'linkprotpbid'}) { |
|
$extra_env->{'request.linkprotpassbid'} = $data{'linkprotpbid'}; |
|
} |
|
if ($data{'linkprotpburl'}) { |
|
$extra_env->{'request.linkprotpassburl'} = $data{'linkprotpburl'}; |
|
} |
|
foreach my $item ('linkprotuser','linkprotexit','linkprotpbid','linkprotpburl') { |
if ($data{$item}) { |
if ($data{$item}) { |
$form{'request.'.$item} = $data{$item}; |
$form{'request.'.$item} = $data{$item}; |
} |
} |