[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm /lonnet/perl lonnet.pm
raeburn
raeburn@source.lon-capa.org
Fri, 24 Sep 2010 13:15:47 -0000
raeburn Fri Sep 24 13:15:47 2010 EDT
Modified files:
/loncom/interface loncommon.pm
/loncom/lonnet/perl lonnet.pm
Log:
- Efficiency.
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.980 loncom/interface/loncommon.pm:1.981
--- loncom/interface/loncommon.pm:1.980 Fri Sep 24 03:14:58 2010
+++ loncom/interface/loncommon.pm Fri Sep 24 13:15:41 2010
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.980 2010/09/24 03:14:58 raeburn Exp $
+# $Id: loncommon.pm,v 1.981 2010/09/24 13:15:41 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -10649,7 +10649,7 @@
$env{'browser.interface'}=$form->{'interface'};
}
- my %is_adv = ( is_adv => &Apache::lonnet::is_advanced_user($domain,$username) );
+ my %is_adv = ( is_adv => $env{'user.adv'} );
my %domdef = &Apache::lonnet::get_domain_defaults($domain);
foreach my $tool ('aboutme','blog','portfolio') {
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1084 loncom/lonnet/perl/lonnet.pm:1.1085
--- loncom/lonnet/perl/lonnet.pm:1.1084 Fri Sep 24 03:15:04 2010
+++ loncom/lonnet/perl/lonnet.pm Fri Sep 24 13:15:47 2010
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.1084 2010/09/24 03:15:04 raeburn Exp $
+# $Id: lonnet.pm,v 1.1085 2010/09/24 13:15:47 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -5065,6 +5065,11 @@
sub is_advanced_user {
my ($udom,$uname) = @_;
+ if ($udom ne '' && $uname ne '') {
+ if (($udom eq $env{'user.domain'}) && ($uname eq $env{'user.name'})) {
+ return $env{'user.adv'};
+ }
+ }
my %roleshash = &get_my_roles($uname,$udom,'userroles',undef,undef,undef,1);
my %allroles;
my $is_adv;