[LON-CAPA-cvs] cvs: loncom(version_2_8_X) /interface domainprefs.pm
raeburn
raeburn@source.lon-capa.org
Thu, 18 Dec 2008 17:06:00 -0000
raeburn Thu Dec 18 17:06:00 2008 EDT
Modified files: (Branch: version_2_8_X)
/loncom/interface domainprefs.pm
Log:
- Backport 1.80.
Index: loncom/interface/domainprefs.pm
diff -u loncom/interface/domainprefs.pm:1.76.2.2 loncom/interface/domainprefs.pm:1.76.2.3
--- loncom/interface/domainprefs.pm:1.76.2.2 Wed Dec 17 22:13:22 2008
+++ loncom/interface/domainprefs.pm Thu Dec 18 17:06:00 2008
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set domain-wide configuration settings
#
-# $Id: domainprefs.pm,v 1.76.2.2 2008/12/17 22:13:22 raeburn Exp $
+# $Id: domainprefs.pm,v 1.76.2.3 2008/12/18 17:06:00 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -3611,10 +3611,18 @@
}
$resulttext .= '</ul></li>';
}
+ my %newenv;
foreach my $item (@usertools) {
if (ref($changes{$item}) eq 'HASH') {
- my $hashid = $env{'user.name'}.':'.$env{'user.domain'};
- &Apache::lonnet::devalidate_cache_new('usertools.'.$item,$hashid);
+ my $newacc =
+ &Apache::lonnet::usertools_access($env{'user.name'},
+ $env{'user.domain'},
+ $item,'reload');
+ if ($env{'environment.tools.'.$item} ne '') {
+ if ($env{'environment.availabletools.'.$item} ne $newacc) {
+ $newenv{'environment.availabletools.'.$item} = $newacc;
+ }
+ }
$resulttext .= '<li>'.$titles{$item}.'<ul>';
foreach my $type (@{$types},'default','_LC_adv') {
if ($changes{$item}{$type}) {
@@ -3635,6 +3643,9 @@
}
}
$resulttext .= '</ul>';
+ if (keys(%newenv)) {
+ &Apache::lonnet::appenv(\%newenv);
+ }
} else {
$resulttext = &mt('No changes made to availability of home pages, blogs, portfolios or default quotas');
}