[LON-CAPA-cvs] cvs: loncom /interface domainprefs.pm
raeburn
raeburn at source.lon-capa.org
Thu May 29 21:39:49 EDT 2014
raeburn Fri May 30 01:39:49 2014 EDT
Modified files:
/loncom/interface domainprefs.pm
Log:
- Cached domain defaults need to be updated when catalog type is changed.
Index: loncom/interface/domainprefs.pm
diff -u loncom/interface/domainprefs.pm:1.245 loncom/interface/domainprefs.pm:1.246
--- loncom/interface/domainprefs.pm:1.245 Fri May 30 00:11:06 2014
+++ loncom/interface/domainprefs.pm Fri May 30 01:39:48 2014
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set domain-wide configuration settings
#
-# $Id: domainprefs.pm,v 1.245 2014/05/30 00:11:06 raeburn Exp $
+# $Id: domainprefs.pm,v 1.246 2014/05/30 01:39:48 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -9767,9 +9767,17 @@
}
$resulttext .= '</ul>';
if ($changes{'unauth'} || $changes{'auth'}) {
- &Apache::loncommon::devalidate_domconfig_cache($dom);
+ my %domdefaults = &Apache::lonnet::get_domain_defaults($dom);
+ if ($changes{'auth'}) {
+ $domdefaults{'catauth'} = $domconfig{'coursecategories'}{'auth'};
+ }
+ if ($changes{'unauth'}) {
+ $domdefaults{'catunauth'} = $domconfig{'coursecategories'}{'unauth'};
+ }
+ my $cachetime = 24*60*60;
+ &Apache::lonnet::do_cache_new('domdefaults',$dom,\%domdefaults,$cachetime);
if (ref($lastactref) eq 'HASH') {
- $lastactref->{'domainconfig'} = 1;
+ $lastactref->{'domdefaults'} = 1;
}
}
} else {
More information about the LON-CAPA-cvs
mailing list