[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface domainprefs.pm

raeburn raeburn at source.lon-capa.org
Sun May 4 18:19:30 EDT 2014


raeburn		Sun May  4 22:19:30 2014 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/interface	domainprefs.pm 
  Log:
  - For 2.11
    - Backport 1.239
  
  
Index: loncom/interface/domainprefs.pm
diff -u loncom/interface/domainprefs.pm:1.160.6.42 loncom/interface/domainprefs.pm:1.160.6.43
--- loncom/interface/domainprefs.pm:1.160.6.42	Mon Apr 28 04:12:41 2014
+++ loncom/interface/domainprefs.pm	Sun May  4 22:19:29 2014
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set domain-wide configuration settings
 #
-# $Id: domainprefs.pm,v 1.160.6.42 2014/04/28 04:12:41 raeburn Exp $
+# $Id: domainprefs.pm,v 1.160.6.43 2014/05/04 22:19:29 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -606,7 +606,7 @@
     } elsif ($action eq 'scantron') {
         $output = &modify_scantron($r,$dom,$confname,$lastactref,%domconfig);
     } elsif ($action eq 'coursecategories') {
-        $output = &modify_coursecategories($dom,%domconfig);
+        $output = &modify_coursecategories($dom,$lastactref,%domconfig);
     } elsif ($action eq 'serverstatuses') {
         $output = &modify_serverstatuses($dom,%domconfig);
     } elsif ($action eq 'requestcourses') {
@@ -9346,7 +9346,7 @@
 }
 
 sub modify_coursecategories {
-    my ($dom,%domconfig) = @_;
+    my ($dom,$lastactref,%domconfig) = @_;
     my ($resulttext,%deletions,%reorderings,%needreordering,%adds,%changes,$errors,
         $cathash);
     my @deletecategory = &Apache::loncommon::get_env_multiple('form.deletecategory');
@@ -9587,6 +9587,12 @@
                 }
             }
             $resulttext .= '</ul>';
+            if ($changes{'unauth'} || $changes{'auth'}) {
+                &Apache::loncommon::devalidate_domconfig_cache($dom);
+                if (ref($lastactref) eq 'HASH') {
+                    $lastactref->{'domainconfig'} = 1;
+                }
+            }
         } else {
             $resulttext = '<span class="LC_error">'.
                           &mt('An error occurred: [_1]',$putresult).'</span>';




More information about the LON-CAPA-cvs mailing list