version 1.57, 2022/02/06 21:37:04
|
version 1.60, 2022/05/21 06:28:35
|
Line 722 sub handler {
|
Line 722 sub handler {
|
$handle); |
$handle); |
my $checklaunch; |
my $checklaunch; |
if ($data{'origurl'} =~ m{^/tiny/$match_domain/\w+$}) { |
if ($data{'origurl'} =~ m{^/tiny/$match_domain/\w+$}) { |
if ($env{'request.linkprot'} ne '') { |
unless ($env{'request.linkprot'} eq $data{'linkprot'}) { |
unless ($env{'request.linkprot'} eq $data{'linkprot'}) { |
$checklaunch = 1; |
$checklaunch = 1; |
|
} |
|
} |
|
if ($env{'request.linkkey'} ne '') { |
|
unless ($env{'request.linkkey'} eq $data{'linkkey'}) { |
|
$checklaunch = 1; |
|
} |
|
} |
} |
if ($env{'request.deeplink.login'}) { |
unless ($env{'request.linkkey'} eq $data{'linkkey'}) { |
unless ($env{'request.deeplink.login'} eq $data{'deeplink.login'}) { |
$checklaunch = 1; |
$checklaunch = 1; |
} |
} |
unless ($env{'request.deeplink.login'} eq $data{'deeplink.login'}) { |
|
$checklaunch = 1; |
} |
} |
} |
} |
if ($data{'linkprot'} ne '') { |
if ($data{'linkprot'} ne '') { |
Line 1005 sub handler {
|
Line 999 sub handler {
|
} elsif ($data{'origurl'} =~ m{^/tiny/$match_domain/\w+$}) { |
} elsif ($data{'origurl'} =~ m{^/tiny/$match_domain/\w+$}) { |
$next_url=$data{'origurl'}; |
$next_url=$data{'origurl'}; |
} else { |
} else { |
$next_url='/adm/roles?selectrole=1&'.&escape($data{'role'}).'=1'; |
if ($data{'lti.login'}) { |
if ($data{'origurl'} ne '') { |
$next_url='/adm/roles?selectrole=1&'.&escape($data{'role'}).'=1'; |
$next_url .= '&orgurl='.&escape($data{'origurl'}); |
if ($data{'origurl'} ne '') { |
|
$next_url .= '&orgurl='.&escape($data{'origurl'}); |
|
} |
|
} else { |
|
$next_url='/adm/roles?selectrole=1&'.&escape($data{'role'}).'=1'; |
|
if ($data{'origurl'} ne '') { |
|
$next_url .= '&orgurl='.&escape($data{'origurl'}); |
|
} |
} |
} |
} |
} |
if ($data{'lti.login'}) { |
if ($data{'lti.login'}) { |
if (($data{'origurl'} =~ m{/default_\d+\.sequence$}) || |
if (($data{'origurl'} =~ m{/default_\d+\.sequence$}) || |
($data{'origurl'} =~ m{^/res/.+\.sequence$})) { |
($data{'origurl'} =~ m{^/res/.+\.sequence$})) { |
$next_url .= '&navmap=1'; |
if ($reuse_session) { |
|
$next_url .= '&navmap=1'; |
|
} else { |
|
$next_url .= '&navmap=1'; |
|
} |
} |
} |
} |
} |
if ($reuse_session) { |
if ($reuse_session) { |
$r->internal_redirect($next_url); |
$r->internal_redirect($next_url); |
} elsif ($data{'deeplink.login'}) { |
} else { |
if (ref($extra_env) eq 'HASH') { |
if ($data{'deeplink.login'}) { |
$extra_env->{'request.deeplink.login'} = $data{'deeplink.login'}; |
if (ref($extra_env) eq 'HASH') { |
} else { |
$extra_env->{'request.deeplink.login'} = $data{'deeplink.login'}; |
$extra_env = {'request.deeplink.login' => $data{'deeplink.login'}}; |
} else { |
} |
$extra_env = {'request.deeplink.login' => $data{'deeplink.login'}}; |
if ($data{'linkprot'}) { |
} |
$extra_env->{'request.linkprot'} = $data{'linkprot'}; |
if ($data{'linkprot'}) { |
} elsif ($data{'linkkey'} ne '') { |
$extra_env->{'request.linkprot'} = $data{'linkprot'}; |
$extra_env->{'request.linkkey'} = $data{'linkkey'}; |
} elsif ($data{'linkkey'} ne '') { |
|
$extra_env->{'request.linkkey'} = $data{'linkkey'}; |
|
} |
} |
} |
&Apache::lonauth::success($r,$data{'username'},$data{'domain'},$home, |
&Apache::lonauth::success($r,$data{'username'},$data{'domain'},$home, |
$next_url,$extra_env,\%form,'',$cid); |
$next_url,$extra_env,\%form,'',$cid); |