[LON-CAPA-cvs] cvs: loncom /auth lonroles.pm migrateuser.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Mon, 15 May 2006 17:45:48 -0000
albertel Mon May 15 13:45:48 2006 EDT
Modified files:
/loncom/auth lonroles.pm migrateuser.pm
Log:
- BUG#3254 - remote wasn't getting start when doing 'Switch Server'
Index: loncom/auth/lonroles.pm
diff -u loncom/auth/lonroles.pm:1.147 loncom/auth/lonroles.pm:1.148
--- loncom/auth/lonroles.pm:1.147 Wed Apr 5 18:39:55 2006
+++ loncom/auth/lonroles.pm Mon May 15 13:45:46 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# User Roles Screen
#
-# $Id: lonroles.pm,v 1.147 2006/04/05 22:39:55 albertel Exp $
+# $Id: lonroles.pm,v 1.148 2006/05/15 17:45:46 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -83,6 +83,7 @@
my $envkey;
my %dcroles = ();
my $numdc = &check_fordc(\%dcroles,$then);
+ &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'});
# ================================================================== Roles Init
if ($env{'form.selectrole'}) {
Index: loncom/auth/migrateuser.pm
diff -u loncom/auth/migrateuser.pm:1.5 loncom/auth/migrateuser.pm:1.6
--- loncom/auth/migrateuser.pm:1.5 Wed Apr 5 18:39:55 2006
+++ loncom/auth/migrateuser.pm Mon May 15 13:45:46 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Starts a user off based of an existing token.
#
-# $Id: migrateuser.pm,v 1.5 2006/04/05 22:39:55 albertel Exp $
+# $Id: migrateuser.pm,v 1.6 2006/05/15 17:45:46 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -29,9 +29,11 @@
package Apache::migrateuser;
use strict;
+use LONCAPA;
use Apache::Constants qw(:common :http :methods);
use Apache::lonauth;
use Apache::lonnet;
+use Apache::lonlocal;
sub goto_login {
my ($r) = @_;
@@ -54,6 +56,8 @@
my %data = &Apache::lonnet::tmpget($env{'form.token'});
my $delete = &Apache::lonnet::tmpdel($env{'form.token'});
+ &Apache::lonlocal::get_language_handle($r);
+
if ($delete ne 'ok') {
return &goto_login($r);
}
@@ -72,15 +76,13 @@
$home,'/adm/roles');
return OK;
}
+
+ my $next_url='/adm/roles?selectrole=1&'.&escape($data{'role'}).'=1';
+
- my $cookie=&Apache::lonauth::success($r,$data{'username'},$data{'domain'},
- $home,'noredirect');
- $r->header_out('Set-cookie',"lonID=$cookie; path=/");
- &Apache::lonnet::transfer_profile_to_env($r->dir_config('lonIDsDir'),
- $cookie);
- $env{'form.selectrole'}='1';
- $env{'form.'.$data{'role'}}='1';
- return &Apache::lonroles::handler($r);
+ &Apache::lonauth::success($r,$data{'username'},$data{'domain'},$home,
+ $next_url);
+ return OK;
}
1;