version 1.29, 2010/08/18 19:25:12
|
version 1.32, 2013/09/29 00:49:24
|
Line 62 sub do_redirect {
|
Line 62 sub do_redirect {
|
'only_body' => $only_body,}); |
'only_body' => $only_body,}); |
my $end_page = &Apache::loncommon::end_page(); |
my $end_page = &Apache::loncommon::end_page(); |
$r->print($start_page.$extra_text.$end_page); |
$r->print($start_page.$extra_text.$end_page); |
|
unless ($env{'user.name'} eq 'public' && ($env{'user.domain'} eq 'public')) { |
|
$r->register_cleanup(\&flush_course_logs); |
|
} |
return OK; |
return OK; |
|
} |
|
|
|
sub flush_course_logs { |
|
&Apache::lonnet::flushcourselogs(); |
|
return OK; |
} |
} |
|
|
sub handler { |
sub handler { |
Line 108 sub handler {
|
Line 115 sub handler {
|
if (&Apache::lonnet::homeserver($env{'user.name'},$env{'user.domain'}) eq $env{'form.otherserver'}) { |
if (&Apache::lonnet::homeserver($env{'user.name'},$env{'user.domain'}) eq $env{'form.otherserver'}) { |
$skip_canhost_check = 1; |
$skip_canhost_check = 1; |
} |
} |
} elsif ($env{'form.role'} =~ m{^[ac]a\./($match_domain)/($match_username)/$}) { |
} elsif ($env{'form.role'} =~ m{^[ac]a\./($match_domain)/($match_username)$}) { |
if (&Apache::lonnet::homeserver($2,$1) eq $env{'form.otherserver'}) { |
if (&Apache::lonnet::homeserver($2,$1) eq $env{'form.otherserver'}) { |
$skip_canhost_check = 1; |
$skip_canhost_check = 1; |
} |
} |
Line 166 sub handler {
|
Line 173 sub handler {
|
|
|
# ---------------------------------------------------------------- Get handover |
# ---------------------------------------------------------------- Get handover |
|
|
|
my ($is_balancer) = &Apache::lonnet::check_loadbalancing($env{'user.name'},$env{'user.domain'}); |
my %info=('ip' => $ENV{'REMOTE_ADDR'}, |
my %info=('ip' => $ENV{'REMOTE_ADDR'}, |
'domain' => $env{'user.domain'}, |
'domain' => $env{'user.domain'}, |
'username' => $env{'user.name'}, |
'username' => $env{'user.name'}, |
'role' => $env{'form.role'}, |
'role' => $env{'form.role'}, |
'server' => $r->dir_config('lonHostID')); |
'server' => $r->dir_config('lonHostID'), |
|
'balancer' => $is_balancer); |
if ($env{'form.origurl'}) { |
if ($env{'form.origurl'}) { |
$info{'origurl'} = $env{'form.origurl'}; |
$info{'origurl'} = $env{'form.origurl'}; |
} |
} |
Line 189 sub handler {
|
Line 198 sub handler {
|
'&username='.$env{'user.name'}. |
'&username='.$env{'user.name'}. |
'&token='.$token; |
'&token='.$token; |
# --------------------------------------------------------------- Screen Output |
# --------------------------------------------------------------- Screen Output |
&Apache::lonnet::flushcourselogs(); |
|
return &do_redirect($r, $url, 0); |
return &do_redirect($r, $url, 0); |
} |
} |
|
|