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

raeburn raeburn@source.lon-capa.org
Wed, 18 Mar 2009 21:30:05 -0000


raeburn		Wed Mar 18 21:30:05 2009 EDT

  Modified files:              (Branch: version_2_8_X)
    /loncom/interface	domainprefs.pm 
  Log:
  - Backport 1.87, 1.89.
  
  
Index: loncom/interface/domainprefs.pm
diff -u loncom/interface/domainprefs.pm:1.76.2.6 loncom/interface/domainprefs.pm:1.76.2.7
--- loncom/interface/domainprefs.pm:1.76.2.6	Fri Dec 26 22:27:24 2008
+++ loncom/interface/domainprefs.pm	Wed Mar 18 21:30:05 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set domain-wide configuration settings
 #
-# $Id: domainprefs.pm,v 1.76.2.6 2008/12/26 22:27:24 raeburn Exp $
+# $Id: domainprefs.pm,v 1.76.2.7 2009/03/18 21:30:05 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1571,7 +1571,7 @@
     my $datatable;
     my @contacts = ('adminemail','supportemail');
     my (%checked,%to,%otheremails);
-    my @mailings = ('errormail','packagesmail','helpdeskmail');
+    my @mailings = ('errormail','packagesmail','lonstatusmail','helpdeskmail');
     foreach my $type (@mailings) {
         $otheremails{$type} = '';
     }
@@ -1591,6 +1591,8 @@
                     }
                     $otheremails{$type} = $settings->{$type}{'others'};
                 }
+            } elsif ($type eq 'lonstatusmail') {
+                $checked{'lonstatusmail'}{'adminemail'} = ' checked="checked" ';
             }
         }
     } else {
@@ -1598,7 +1600,8 @@
         $to{'adminemail'} = $Apache::lonnet::perlvar{'lonAdmEMail'};
         $checked{'errormail'}{'adminemail'} = ' checked="checked" ';
         $checked{'packagesmail'}{'adminemail'} = ' checked="checked" ';
-        $checked{'helpdeskmail'}{'supportemail'} = ' checked="checked" '; 
+        $checked{'helpdeskmail'}{'supportemail'} = ' checked="checked" ';
+        $checked{'lonstatusmail'}{'adminemail'} = ' checked="checked" ';
     }
     my ($titles,$short_titles) = &contact_titles();
     my $rownum = 0;
@@ -1642,7 +1645,8 @@
                    'adminemail'   => 'Default Server Admin E-mail address',
                    'errormail'    => 'Error reports to be e-mailed to',
                    'packagesmail' => 'Package update alerts to be e-mailed to',
-                   'helpdeskmail' => 'Helpdesk requests to be e-mailed to'
+                   'helpdeskmail' => 'Helpdesk requests to be e-mailed to',
+                   'lonstatusmail' => 'E-mail from nightly status check (warnings/errors)',
                  );
     my %short_titles = &Apache::lonlocal::texthash (
                            adminemail   => 'Admin E-mail address',
@@ -4029,7 +4033,7 @@
     }
     my (%others,%to);
     my @contacts = ('supportemail','adminemail');
-    my @mailings = ('errormail','packagesmail','helpdeskmail');
+    my @mailings = ('errormail','packagesmail','helpdeskmail','lonstatusmail');
     foreach my $type (@mailings) {
         @{$newsetting{$type}} = 
             &Apache::loncommon::get_env_multiple('form.'.$type);
@@ -4074,6 +4078,7 @@
         $default{'errormail'} = 'adminemail';
         $default{'packagesmail'} = 'adminemail';
         $default{'helpdeskmail'} = 'supportemail';
+        $default{'lonstatusmail'} = 'adminemail';
         foreach my $item (@contacts) {
            if ($to{$item} ne $default{$item}) {
               $changes{$item} = 1;
@@ -4761,8 +4766,10 @@
     } else {
         $changes{'togglecats'} = 1;
         $changes{'categorize'} = 1;
-        $domconfig{'coursecategories'}{'togglecats'} = $env{'form.togglecats'};
-        $domconfig{'coursecategories'}{'categorize'} = $env{'form.categorize'};
+        $domconfig{'coursecategories'} = {
+                                             togglecats => $env{'form.togglecats'},
+                                             categorize => $env{'form.categorize'},
+                                         };
     }
     if (ref($cathash) eq 'HASH') {
         if (($domconfig{'coursecategories'}{'cats'}{'instcode::0'} ne '')  && ($env{'form.instcode'} == 0)) {