[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm loncreateuser.pm longroup.pm lonuserutils.pm
raeburn
raeburn@source.lon-capa.org
Sun, 26 Sep 2010 01:57:22 -0000
raeburn Sun Sep 26 01:57:22 2010 EDT
Modified files:
/loncom/interface lonuserutils.pm loncommon.pm longroup.pm
loncreateuser.pm
Log:
- skip check for loncapa version (via "extra" hashref passed to lonnet::dump)
when getting dump of roles for purposes other than rolesinit.
Index: loncom/interface/lonuserutils.pm
diff -u loncom/interface/lonuserutils.pm:1.126 loncom/interface/lonuserutils.pm:1.127
--- loncom/interface/lonuserutils.pm:1.126 Mon Sep 20 00:51:15 2010
+++ loncom/interface/lonuserutils.pm Sun Sep 26 01:57:21 2010
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Utility functions for managing LON-CAPA user accounts
#
-# $Id: lonuserutils.pm,v 1.126 2010/09/20 00:51:15 raeburn Exp $
+# $Id: lonuserutils.pm,v 1.127 2010/09/26 01:57:21 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -47,7 +47,8 @@
# this one. If $csec is defined, drop them from all other sections of
# this course and add them to section $csec
my ($cnum,$cdom) = &get_course_identity($courseid);
- my %roles = &Apache::lonnet::dump('roles',$udom,$unam);
+ my $extra = &Apache::lonnet::freeze_escape({'skipcheck' => 1});
+ my %roles = &Apache::lonnet::dump('roles',$udom,$unam,'.',undef,$extra);
my ($tmp) = keys(%roles);
# Bail out if we were unable to get the students roles
return "$1" if ($tmp =~ /^(con_lost|error|no_such_host)/i);
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.981 loncom/interface/loncommon.pm:1.982
--- loncom/interface/loncommon.pm:1.981 Fri Sep 24 13:15:41 2010
+++ loncom/interface/loncommon.pm Sun Sep 26 01:57:21 2010
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.981 2010/09/24 13:15:41 raeburn Exp $
+# $Id: loncommon.pm,v 1.982 2010/09/26 01:57:21 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -3825,7 +3825,9 @@
$udom = $env{'user.domain'};
}
if (($uname ne $env{'user.name'}) || ($udom ne $env{'user.domain'})) {
- my %roleshash = &Apache::lonnet::dump('roles',$udom,$uname);
+ my $extra = &Apache::lonnet::freeze_escape({'skipcheck' => 1});
+ my %roleshash = &Apache::lonnet::dump('roles',$udom,$uname,'.',undef,
+ $extra);
if (!%roles) {
%roles = (
cc => 1,
@@ -7059,7 +7061,8 @@
sub check_user_status {
my ($udom,$uname,$cdom,$crs,$role,$sec) = @_;
- my %userinfo = &Apache::lonnet::dump('roles',$udom,$uname);
+ my $extra = &Apache::lonnet::freeze_escape({'skipcheck' => 1});
+ my %userinfo = &Apache::lonnet::dump('roles',$udom,$uname,'.',undef,$extra);
my @uroles = keys %userinfo;
my $srchstr;
my $active_chk = 'none';
Index: loncom/interface/longroup.pm
diff -u loncom/interface/longroup.pm:1.25 loncom/interface/longroup.pm:1.26
--- loncom/interface/longroup.pm:1.25 Sun Aug 29 22:59:49 2010
+++ loncom/interface/longroup.pm Sun Sep 26 01:57:21 2010
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# accessor routines used to provide information about course groups
#
-# $Id: longroup.pm,v 1.25 2010/08/29 22:59:49 raeburn Exp $
+# $Id: longroup.pm,v 1.26 2010/09/26 01:57:21 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -291,7 +291,8 @@
}
if (@changegroups > 0) {
my %currpriv;
- my %roleshash = &Apache::lonnet::dump('roles',$udom,$uname,$cid);
+ my $extra = &Apache::lonnet::freeze_escape({'skipcheck' => 1});
+ my %roleshash = &Apache::lonnet::dump('roles',$udom,$uname,$cid,'.',undef,$extra);
if (my $tmp = &Apache::lonnet::error(%roleshash)) {
&Apache::lonnet::logthis('Error retrieving roles: '.$tmp.
' for '.$uname.':'.$udom);
Index: loncom/interface/loncreateuser.pm
diff -u loncom/interface/loncreateuser.pm:1.349 loncom/interface/loncreateuser.pm:1.350
--- loncom/interface/loncreateuser.pm:1.349 Mon Sep 20 00:51:14 2010
+++ loncom/interface/loncreateuser.pm Sun Sep 26 01:57:21 2010
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Create a user
#
-# $Id: loncreateuser.pm,v 1.349 2010/09/20 00:51:14 raeburn Exp $
+# $Id: loncreateuser.pm,v 1.350 2010/09/26 01:57:21 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1461,7 +1461,8 @@
$rolesdump{$newkey} = $newvalue;
}
} else {
- %rolesdump=&Apache::lonnet::dump('roles',$ccdomain,$ccuname);
+ my $extra = &Apache::lonnet::freeze_escape({'skipcheck' => 1});
+ %rolesdump=&Apache::lonnet::dump('roles',$ccdomain,$ccuname,'.',undef,$extra);
}
# Build up table of user roles to allow revocation and re-enabling of roles.
my ($tmp) = keys(%rolesdump);