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

version 1.1, 2005/10/24 21:32:43 version 1.3, 2005/10/25 19:14:32
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 90  sub handler { Line 87  sub handler {
     $windowinfo.=&Apache::lonnavmaps::close();      $windowinfo.=&Apache::lonnavmaps::close();
 # ---------------------------------------------------------------- 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 %info=('ip'       => $ENV{'REMOTE_ADDR'},
     &Apache::lonnet::logthis("token is $token $switch_to");        'domain'   => $env{'user.domain'},
         'username' => $env{'user.name'},
         'role'     => $env{'form.role'},
         'server'   => $r->dir_config('lonHostID'));
       my $token = &Apache::lonnet::tmpput(\%info,$env{'form.otherserver'});
     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 106  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.3


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