Diff for /loncom/interface/domainprefs.pm between versions 1.76.2.5 and 1.76.2.7

version 1.76.2.5, 2008/12/26 16:34:43 version 1.76.2.7, 2009/03/18 21:30:05
Line 1329  sub print_quotas { Line 1329  sub print_quotas {
                       '" value="_LC_adv" '.$checked.'/>'.$titles{$item}.                        '" value="_LC_adv" '.$checked.'/>'.$titles{$item}.
                       '</label></span>&nbsp; ';                        '</label></span>&nbsp; ';
     }      }
     $datatable .= '('.&mt('overrides affiliation').')</td></tr>';      $datatable .= '<span class="LC_nobreak">('.&mt('overrides affiliation').
                     ')</span></td></tr>';
     $$rowtotal += $typecount;      $$rowtotal += $typecount;
     return $datatable;      return $datatable;
 }  }
Line 1570  sub print_contacts { Line 1571  sub print_contacts {
     my $datatable;      my $datatable;
     my @contacts = ('adminemail','supportemail');      my @contacts = ('adminemail','supportemail');
     my (%checked,%to,%otheremails);      my (%checked,%to,%otheremails);
     my @mailings = ('errormail','packagesmail','helpdeskmail');      my @mailings = ('errormail','packagesmail','lonstatusmail','helpdeskmail');
     foreach my $type (@mailings) {      foreach my $type (@mailings) {
         $otheremails{$type} = '';          $otheremails{$type} = '';
     }      }
Line 1590  sub print_contacts { Line 1591  sub print_contacts {
                     }                      }
                     $otheremails{$type} = $settings->{$type}{'others'};                      $otheremails{$type} = $settings->{$type}{'others'};
                 }                  }
               } elsif ($type eq 'lonstatusmail') {
                   $checked{'lonstatusmail'}{'adminemail'} = ' checked="checked" ';
             }              }
         }          }
     } else {      } else {
Line 1597  sub print_contacts { Line 1600  sub print_contacts {
         $to{'adminemail'} = $Apache::lonnet::perlvar{'lonAdmEMail'};          $to{'adminemail'} = $Apache::lonnet::perlvar{'lonAdmEMail'};
         $checked{'errormail'}{'adminemail'} = ' checked="checked" ';          $checked{'errormail'}{'adminemail'} = ' checked="checked" ';
         $checked{'packagesmail'}{'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 ($titles,$short_titles) = &contact_titles();
     my $rownum = 0;      my $rownum = 0;
Line 1641  sub contact_titles { Line 1645  sub contact_titles {
                    'adminemail'   => 'Default Server Admin E-mail address',                     'adminemail'   => 'Default Server Admin E-mail address',
                    'errormail'    => 'Error reports to be e-mailed to',                     'errormail'    => 'Error reports to be e-mailed to',
                    'packagesmail' => 'Package update alerts 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 (      my %short_titles = &Apache::lonlocal::texthash (
                            adminemail   => 'Admin E-mail address',                             adminemail   => 'Admin E-mail address',
Line 4028  sub modify_contacts { Line 4033  sub modify_contacts {
     }      }
     my (%others,%to);      my (%others,%to);
     my @contacts = ('supportemail','adminemail');      my @contacts = ('supportemail','adminemail');
     my @mailings = ('errormail','packagesmail','helpdeskmail');      my @mailings = ('errormail','packagesmail','helpdeskmail','lonstatusmail');
     foreach my $type (@mailings) {      foreach my $type (@mailings) {
         @{$newsetting{$type}} =           @{$newsetting{$type}} = 
             &Apache::loncommon::get_env_multiple('form.'.$type);              &Apache::loncommon::get_env_multiple('form.'.$type);
Line 4073  sub modify_contacts { Line 4078  sub modify_contacts {
         $default{'errormail'} = 'adminemail';          $default{'errormail'} = 'adminemail';
         $default{'packagesmail'} = 'adminemail';          $default{'packagesmail'} = 'adminemail';
         $default{'helpdeskmail'} = 'supportemail';          $default{'helpdeskmail'} = 'supportemail';
           $default{'lonstatusmail'} = 'adminemail';
         foreach my $item (@contacts) {          foreach my $item (@contacts) {
            if ($to{$item} ne $default{$item}) {             if ($to{$item} ne $default{$item}) {
               $changes{$item} = 1;                $changes{$item} = 1;
Line 4760  sub modify_coursecategories { Line 4766  sub modify_coursecategories {
     } else {      } else {
         $changes{'togglecats'} = 1;          $changes{'togglecats'} = 1;
         $changes{'categorize'} = 1;          $changes{'categorize'} = 1;
         $domconfig{'coursecategories'}{'togglecats'} = $env{'form.togglecats'};          $domconfig{'coursecategories'} = {
         $domconfig{'coursecategories'}{'categorize'} = $env{'form.categorize'};                                               togglecats => $env{'form.togglecats'},
                                                categorize => $env{'form.categorize'},
                                            };
     }      }
     if (ref($cathash) eq 'HASH') {      if (ref($cathash) eq 'HASH') {
         if (($domconfig{'coursecategories'}{'cats'}{'instcode::0'} ne '')  && ($env{'form.instcode'} == 0)) {          if (($domconfig{'coursecategories'}{'cats'}{'instcode::0'} ne '')  && ($env{'form.instcode'} == 0)) {
Line 4976  sub modify_serverstatuses { Line 4984  sub modify_serverstatuses {
     my %serverstatushash =  (      my %serverstatushash =  (
                                 serverstatuses => \%newserverstatus,                                  serverstatuses => \%newserverstatus,
                             );                              );
     my $putresult = &Apache::lonnet::put_dom('configuration',\%serverstatushash,  
                                              $dom);  
     my %changes;      my %changes;
     foreach my $type (@pages) {      foreach my $type (@pages) {
         if (ref($currserverstatus{$type}) eq 'HASH') {          foreach my $setting ('namedusers','machines') {
             my @currnamed = split(/,/,$currserverstatus{$type}{'namedusers'});              my (@current,@new);
             my @newusers = split(/,/,$newserverstatus{$type}{'namedusers'});              if (ref($currserverstatus{$type}) eq 'HASH') {
             foreach my $item (@currnamed) {                  if ($currserverstatus{$type}{$setting} ne '') {
                 if (!grep(/^\Q$item\E$/,@newusers)) {                      @current = split(/,/,$currserverstatus{$type}{$setting});
                     $changes{$type}{'namedusers'} = 1;                  }
                     last;              }
                 }              if ($newserverstatus{$type}{$setting} ne '') {
             }                  @new = split(/,/,$newserverstatus{$type}{$setting});
             foreach my $item (@newusers) {              }
                 if (!grep(/^\Q$item\E$/,@currnamed)) {              if (@current > 0) {
                     $changes{$type}{'namedusers'} = 1;                  if (@new > 0) {
                     last;                      foreach my $item (@current) {
                 }                          if (!grep(/^\Q$item\E$/,@new)) {
             }                              $changes{$type}{$setting} = 1;
             my @currmachines = split(/,/,$currserverstatus{$type}{'machines'});  
             my @newmachines = split(/,/,$newserverstatus{$type}{'machines'});  
             if (@currmachines > 0) {  
                 if (@newmachines > 0) {  
                     foreach my $item (@currmachines) {  
                         if (!grep(/^\Q$item\E$/,@newmachines)) {  
                             $changes{$type}{'machines'} = 1;  
                             last;                              last;
                         }                          }
                     }                      }
                     foreach my $item (@newmachines) {                      foreach my $item (@new) {
                         if (!grep(/^\Q$item\E$/,@currmachines)) {                          if (!grep(/^\Q$item\E$/,@current)) {
                             $changes{$type}{'machines'} = 1;                              $changes{$type}{$setting} = 1;
                             last;                              last;
                         }                          }
                     }                      }
                 } else {                  } else {
                     $changes{$type}{'machines'} = 1;                      $changes{$type}{$setting} = 1;
                 }                  }
             } elsif (@newmachines > 0) {              } elsif (@new > 0) {
                 $changes{$type}{'machines'} = 1;                   $changes{$type}{$setting} = 1;
             }              }
         }          }
     }      }
Line 5026  sub modify_serverstatuses { Line 5025  sub modify_serverstatuses {
         if ($putresult eq 'ok') {          if ($putresult eq 'ok') {
             $resulttext .= &mt('Changes made:').'<ul>';              $resulttext .= &mt('Changes made:').'<ul>';
             foreach my $type (@pages) {              foreach my $type (@pages) {
                 if (defined($changes{$type})) {                  if (ref($changes{$type}) eq 'HASH') {
                     $resulttext .= '<li>'.$titles->{$type}.'<ul>';                      $resulttext .= '<li>'.$titles->{$type}.'<ul>';
                     if (defined($changes{$type}{'namedusers'})) {                      if ($changes{$type}{'namedusers'}) {
                         if ($newserverstatus{$type}{'namedusers'} eq '') {                          if ($newserverstatus{$type}{'namedusers'} eq '') {
                             $resulttext .= '<li>'.&mt("Access terminated for all specific (named) users").'</li>'."\n";                              $resulttext .= '<li>'.&mt("Access terminated for all specific (named) users").'</li>'."\n";
                         } else {                          } else {
                             $resulttext .= '<li>'.&mt("Access available for the following specified users: ").$newserverstatus{$type}{'namedusers'}.'</li>'."\n";                              $resulttext .= '<li>'.&mt("Access available for the following specified users: ").$newserverstatus{$type}{'namedusers'}.'</li>'."\n";
                         }                          }
                     } elsif (defined($changes{$type}{'machines'})) {                      }
                       if ($changes{$type}{'machines'}) {
                         if ($newserverstatus{$type}{'machines'} eq '') {                          if ($newserverstatus{$type}{'machines'} eq '') {
                             $resulttext .= '<li>'.&mt("Access terminated for all specific IP addresses").'</li>'."\n";                              $resulttext .= '<li>'.&mt("Access terminated for all specific IP addresses").'</li>'."\n";
                         } else {                          } else {

Removed from v.1.76.2.5  
changed lines
  Added in v.1.76.2.7


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>