[LON-CAPA-cvs] cvs: loncom /auth lonroles.pm

www lon-capa-cvs@mail.lon-capa.org
Tue, 04 Feb 2003 16:25:37 -0000


www		Tue Feb  4 11:25:37 2003 EDT

  Modified files:              
    /loncom/auth	lonroles.pm 
  Log:
  Better handover in "Switch Server" - transfer username and domain.
  
  
Index: loncom/auth/lonroles.pm
diff -u loncom/auth/lonroles.pm:1.50 loncom/auth/lonroles.pm:1.51
--- loncom/auth/lonroles.pm:1.50	Mon Feb  3 13:03:52 2003
+++ loncom/auth/lonroles.pm	Tue Feb  4 11:25:37 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # User Roles Screen
 #
-# $Id: lonroles.pm,v 1.50 2003/02/03 18:03:52 harris41 Exp $
+# $Id: lonroles.pm,v 1.51 2003/02/04 16:25:37 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -310,8 +310,11 @@
                     my $home = &Apache::lonnet::homeserver($trest,$tdom);
                     if ($home ne $r->dir_config('lonHostID')) {
 			$button=0;
-                        $switchserver='http://'.
-                         $Apache::lonnet::hostname{$home}.'/priv/'.$trest;
+                        $switchserver=&Apache::lonnet::escape('http://'.
+                         $Apache::lonnet::hostname{$home}.
+                         '/adm/login?domain='.$ENV{'user.domain'}.
+			  '&username='.$ENV{'user.name'}.
+                          '&firsturl=/priv/'.$trest);
                     }
                     #next if ($home eq 'no_host');
                     $home = $Apache::lonnet::hostname{$home};
@@ -325,9 +328,11 @@
                         ($ENV{'user.name'},$ENV{'user.domain'});
                     if ($home ne $r->dir_config('lonHostID')) {
 			$button=0;
-                        $switchserver='http://'.
-                         $Apache::lonnet::hostname{$home}.'/priv/'.
-                         $ENV{'user.name'};
+                        $switchserver=&Apache::lonnet::escape('http://'.
+                         $Apache::lonnet::hostname{$home}.
+                          '/adm/login?domain='.$ENV{'user.domain'}.
+			   '&username='.$ENV{'user.name'}.
+                           '&firsturl=/priv/'.$ENV{'user.name'});
                     }
                     #next if ($home eq 'no_host');
                     $home = $Apache::lonnet::hostname{$home};