Diff for /loncom/interface/domainprefs.pm between versions 1.76.4.1 and 1.83

version 1.76.4.1, 2009/09/14 15:47:17 version 1.83, 2008/12/26 21:48:43
Line 107  sub handler { Line 107  sub handler {
         'quotas' =>           'quotas' => 
                     { text => 'User blogs, home pages and portfolios',                      { text => 'User blogs, home pages and portfolios',
                       help => 'Domain_Configuration_Quotas',                        help => 'Domain_Configuration_Quotas',
                       header => [{col1 => 'User type',                        header => [{col1 => 'User affiliation',
                                   col2 => 'Available tools',                                    col2 => 'Available tools',
                                   col3 => 'Portfolio quota',}],                                    col3 => 'Portfolio quota',}],
                     },                      },
Line 175  sub handler { Line 175  sub handler {
                                }],                                 }],
                   },                    },
         'serverstatuses' =>          'serverstatuses' =>
                  {text   => 'Access to Server Status Pages',                   {text   => 'Access to server status pages',
                   help   => 'Domain_Configuration_Server_Status',                    help   => 'Domain_Configuration_Server_Status',
                   header => [{col1 => 'Status Page',                    header => [{col1 => 'Status Page',
                               col2 => 'Other named users',                                col2 => 'Other named users',
Line 817  sub login_choices { Line 817  sub login_choices {
             bgs => "Background colors",              bgs => "Background colors",
             links => "Link colors",              links => "Link colors",
             font => "Font color",              font => "Font color",
             pgbg => "Page",              pgbg => "Header",
             mainbg => "Main panel",              mainbg => "Page",
             sidebg => "Side panel",              sidebg => "Login box",
             link => "Link",              link => "Link",
             alink => "Active link",              alink => "Active link",
             vlink => "Visited link",              vlink => "Visited link",
Line 1330  sub print_quotas { Line 1330  sub print_quotas {
                       '</label></span>&nbsp; ';                        '</label></span>&nbsp; ';
     }      }
     $datatable .= '<span class="LC_nobreak">('.&mt('overrides affiliation').      $datatable .= '<span class="LC_nobreak">('.&mt('overrides affiliation').
                   ')</span></td></tr>';                    ')</span</td></tr>';
     $$rowtotal += $typecount;      $$rowtotal += $typecount;
     return $datatable;      return $datatable;
 }  }
Line 1571  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','lonstatusmail','helpdeskmail');      my @mailings = ('errormail','packagesmail','helpdeskmail');
     foreach my $type (@mailings) {      foreach my $type (@mailings) {
         $otheremails{$type} = '';          $otheremails{$type} = '';
     }      }
Line 1591  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 1600  sub print_contacts { Line 1598  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 1645  sub contact_titles { Line 1642  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 3619  sub modify_quotas { Line 3615  sub modify_quotas {
             my %newenv;              my %newenv;
             foreach my $item (@usertools) {              foreach my $item (@usertools) {
                 if (ref($changes{$item}) eq 'HASH') {                  if (ref($changes{$item}) eq 'HASH') {
                     my $newacc =                      my $newacc = 
                         &Apache::lonnet::usertools_access($env{'user.name'},                          &Apache::lonnet::usertools_access($env{'user.name'},
                                                           $env{'user.domain'},                                                            $env{'user.domain'},
                                                           $item,'reload');                                                            $item,'reload');
                     if ($env{'environment.availabletools.'.$item} ne $newacc) {                      if ($env{'environment.availabletools.'.$item} ne $newacc) { 
                             $newenv{'environment.availabletools.'.$item} = $newacc;                          $newenv{'environment.availabletools.'.$item} = $newacc;
                     }                      }
                     $resulttext .= '<li>'.$titles{$item}.'<ul>';                      $resulttext .= '<li>'.$titles{$item}.'<ul>';
                     foreach my $type (@{$types},'default','_LC_adv') {                      foreach my $type (@{$types},'default','_LC_adv') {
Line 4033  sub modify_contacts { Line 4029  sub modify_contacts {
     }      }
     my (%others,%to);      my (%others,%to);
     my @contacts = ('supportemail','adminemail');      my @contacts = ('supportemail','adminemail');
     my @mailings = ('errormail','packagesmail','helpdeskmail','lonstatusmail');      my @mailings = ('errormail','packagesmail','helpdeskmail');
     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 4078  sub modify_contacts { Line 4074  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 4766  sub modify_coursecategories { Line 4761  sub modify_coursecategories {
     } else {      } else {
         $changes{'togglecats'} = 1;          $changes{'togglecats'} = 1;
         $changes{'categorize'} = 1;          $changes{'categorize'} = 1;
         $domconfig{'coursecategories'} = {          $domconfig{'coursecategories'}{'togglecats'} = $env{'form.togglecats'};
                                              togglecats => $env{'form.togglecats'},          $domconfig{'coursecategories'}{'categorize'} = $env{'form.categorize'};
                                              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 4987  sub modify_serverstatuses { Line 4980  sub modify_serverstatuses {
     my %changes;      my %changes;
     foreach my $type (@pages) {      foreach my $type (@pages) {
         foreach my $setting ('namedusers','machines') {          foreach my $setting ('namedusers','machines') {
             my (@current,@new);              my @current = ();
             if (ref($currserverstatus{$type}) eq 'HASH') {              if (ref($currserverstatus{$type}) eq 'HASH') {
                 if ($currserverstatus{$type}{$setting} ne '') {                  @current = split(/,/,$currserverstatus{$type}{$setting});
                     @current = split(/,/,$currserverstatus{$type}{$setting});  
                 }  
             }  
             if ($newserverstatus{$type}{$setting} ne '') {  
                 @new = split(/,/,$newserverstatus{$type}{$setting});  
             }              }
               my @new = split(/,/,$newserverstatus{$type}{$setting});
             if (@current > 0) {              if (@current > 0) {
                 if (@new > 0) {                  if (@new > 0) {
                     foreach my $item (@current) {                      foreach my $item (@current) {
Line 5004  sub modify_serverstatuses { Line 4993  sub modify_serverstatuses {
                             last;                              last;
                         }                          }
                     }                      }
                     foreach my $item (@new) {                      if (!$changes{$type}{$setting}) {
                         if (!grep(/^\Q$item\E$/,@current)) {                          foreach my $item (@new) {
                             $changes{$type}{$setting} = 1;                              if (!grep(/^\Q$item\E$/,@current)) {
                             last;                                  $changes{$type}{$setting} = 1;
                                   last;
                               }
                         }                          }
                     }                      }
                 } else {                  } else {
Line 5025  sub modify_serverstatuses { Line 5016  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 (ref($changes{$type}) eq 'HASH') {                  if (defined($changes{$type})) {
                     $resulttext .= '<li>'.$titles->{$type}.'<ul>';                      $resulttext .= '<li>'.$titles->{$type}.'<ul>';
                     if ($changes{$type}{'namedusers'}) {                      if (defined($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.4.1  
changed lines
  Added in v.1.83


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