version 1.14, 2007/08/25 00:52:47
|
version 1.15, 2007/08/25 01:24:05
|
Line 62 sub init_env {
|
Line 62 sub init_env {
|
sub do_redirect { |
sub do_redirect { |
my ($r,$url,$only_body,$extra_text) = @_; |
my ($r,$url,$only_body,$extra_text) = @_; |
$r->send_http_header; |
$r->send_http_header; |
my $switch='<meta HTTP-EQUIV="Refresh" CONTENT="0; url='.$url.'">'; |
my $switch='<meta HTTP-EQUIV="Refresh" CONTENT="0.5; url='.$url.'">'; |
my $start_page = |
my $start_page = |
&Apache::loncommon::start_page('Switching Server ...', $switch, |
&Apache::loncommon::start_page('Switching Server ...', $switch, |
{'no_inline_link' => 1, |
{'no_inline_link' => 1, |
Line 138 sub handler {
|
Line 138 sub handler {
|
my $token = &Apache::lonnet::tmpput(\%info,$env{'form.otherserver'}); |
my $token = &Apache::lonnet::tmpput(\%info,$env{'form.otherserver'}); |
my $url ='http://'.$switch_to.'/adm/login?'. |
my $url ='http://'.$switch_to.'/adm/login?'. |
'domain='.$env{'user.domain'}. |
'domain='.$env{'user.domain'}. |
'&username='.$env{'user.name'}. |
'&username='.$env{'user.name'}. |
'&token='.$token; |
'&token='.$token; |
# --------------------------------------------------------------- Screen Output |
# --------------------------------------------------------------- Screen Output |
&Apache::lonnet::flushcourselogs(); |
&Apache::lonnet::flushcourselogs(); |
return &do_redirect($r,$url,0,$windowinfo); |
return &do_redirect($r,$url,0,$windowinfo); |