Diff for /loncom/auth/switchserver.pm between versions 1.1 and 1.2

version 1.1, 2005/10/24 21:32:43 version 1.2, 2005/10/24 21:35:16
Line 77  sub handler { Line 77  sub handler {
     &Apache::lonnet::log($env{'user.domain'},$env{'user.name'},      &Apache::lonnet::log($env{'user.domain'},$env{'user.name'},
  $env{'user.home'},   $env{'user.home'},
  "Switch Server to $env{'form.otherserver'} with role $env{'form.role'} $ENV{'REMOTE_ADDR'}");   "Switch Server to $env{'form.otherserver'} with role $env{'form.role'} $ENV{'REMOTE_ADDR'}");
     &Apache::lonnet::logthis(join(' -- ',$env{'user.domain'},$env{'user.name'},  
  $env{'user.home'},  
  "Switch Server to $env{'form.otherserver'} with role $env{'form.role'} $ENV{'REMOTE_ADDR'}"));  
   
     &Apache::loncommon::content_type($r,'text/html');      &Apache::loncommon::content_type($r,'text/html');
     $r->send_http_header;      $r->send_http_header;
Line 91  sub handler { Line 88  sub handler {
 # ---------------------------------------------------------------- Get handover  # ---------------------------------------------------------------- Get handover
   
     my $token = &Apache::lonnet::reply('tmpput:'.join('&',$ENV{'REMOTE_ADDR'},$env{'user.domain'},$env{'user.name'},$env{'form.role'}),$env{'form.otherserver'});      my $token = &Apache::lonnet::reply('tmpput:'.join('&',$ENV{'REMOTE_ADDR'},$env{'user.domain'},$env{'user.name'},$env{'form.role'}),$env{'form.otherserver'});
     &Apache::lonnet::logthis("token is $token $switch_to");  
     my $switch='<meta HTTP-EQUIV="Refresh" CONTENT="0.5; url=http://'.$switch_to.'/adm/migrateuser?token='.$token.'">';      my $switch='<meta HTTP-EQUIV="Refresh" CONTENT="0.5; url=http://'.$switch_to.'/adm/migrateuser?token='.$token.'">';
     my $bodytag=&Apache::loncommon::bodytag('Switching Server ...');      my $bodytag=&Apache::loncommon::bodytag('Switching Server ...');
 # --------------------------------------------------------------- Screen Output  # --------------------------------------------------------------- Screen Output
     my $doc=(<<ENDDOCUMENT);      $r->print(<<ENDDOCUMENT);
    <html>     <html>
        <head><title>The LearningOnline Network with CAPA Logout</title>         <head><title>The LearningOnline Network with CAPA Logout</title>
        $switch         $switch
Line 105  sub handler { Line 101  sub handler {
        </body>         </body>
        </html>         </html>
 ENDDOCUMENT  ENDDOCUMENT
 &Apache::lonnet::logthis($doc);  
     $r->print($doc);  
     &Apache::lonnet::flushcourselogs();      &Apache::lonnet::flushcourselogs();
     return OK;      return OK;
 }  }

Removed from v.1.1  
changed lines
  Added in v.1.2


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>