version 1.32, 2022/02/06 21:37:00
|
version 1.33, 2022/02/08 15:08:53
|
Line 1054 sub linkprot_session {
|
Line 1054 sub linkprot_session {
|
my ($r,$uname,$cnum,$cdom,$uhome,$itemid,$ltitype,$dest,$lonhost) = @_; |
my ($r,$uname,$cnum,$cdom,$uhome,$itemid,$ltitype,$dest,$lonhost) = @_; |
$r->user($uname); |
$r->user($uname); |
if ($ltitype eq 'c') { |
if ($ltitype eq 'c') { |
&Apache::lonnet::logthis("Course Link Protector ($itemid) authorized student: $uname:$cdom, course: $cdom\_$cnum"); |
&Apache::lonnet::logthis("Link Protector: $itemid (c) authorized student: $uname:$cdom, course: $cdom\_$cnum"); |
} elsif ($ltitype eq 'd') { |
} elsif ($ltitype eq 'd') { |
&Apache::lonnet::logthis("Domain LTI for link protection ($itemid) authorized student: $uname:$cdom, course: $cdom\_$cnum"); |
&Apache::lonnet::logthis("Link Protector: $itemid (d) authorized student: $uname:$cdom, course: $cdom\_$cnum"); |
} |
} |
my ($is_balancer,$otherserver,$hosthere) = &check_balancer($r,$uname,$cdom); |
my ($is_balancer,$otherserver,$hosthere) = &check_balancer($r,$uname,$cdom); |
if (($is_balancer) && (!$hosthere)) { |
if (($is_balancer) && (!$hosthere)) { |
# login but immediately go to switch server |
# login but immediately go to switch server |
|
&Apache::lonauth::success($r,$uname,$cdom,$uhome,'noredirect'); |
$env{'form.origurl'} = $dest; |
$env{'form.origurl'} = $dest; |
$env{'request.linkprot'} = $itemid.$ltitype.':'.$dest; |
$env{'request.linkprot'} = $itemid.$ltitype.':'.$dest; |
$env{'request.deeplink.login'} = $dest; |
$env{'request.deeplink.login'} = $dest; |
Line 1128 sub invalid_request {
|
Line 1129 sub invalid_request {
|
&mt('Launch of LON-CAPA is unavailable from the "external tool" link you had followed in another web application.'). |
&mt('Launch of LON-CAPA is unavailable from the "external tool" link you had followed in another web application.'). |
&mt('Launch failed for the following reason:'). |
&mt('Launch failed for the following reason:'). |
'</p>'. |
'</p>'. |
'<p class="LC_error">'.$msga'.</p>'. |
'<p class="LC_error">'.$msg.'</p>'. |
&Apache::loncommon::end_page()); |
&Apache::loncommon::end_page()); |
return; |
return; |
} |
} |