Diff for /loncom/interface/domainprefs.pm between versions 1.76.2.6 and 1.82

version 1.76.2.6, 2008/12/26 22:27:24 version 1.82, 2008/12/26 16:34:01
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 3615  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 4977  sub modify_serverstatuses { Line 4977  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) {
         foreach my $setting ('namedusers','machines') {          if (ref($currserverstatus{$type}) eq 'HASH') {
             my (@current,@new);              my @currnamed = split(/,/,$currserverstatus{$type}{'namedusers'});
             if (ref($currserverstatus{$type}) eq 'HASH') {              my @newusers = split(/,/,$newserverstatus{$type}{'namedusers'});
                 if ($currserverstatus{$type}{$setting} ne '') {              foreach my $item (@currnamed) {
                     @current = split(/,/,$currserverstatus{$type}{$setting});                  if (!grep(/^\Q$item\E$/,@newusers)) {
                       $changes{$type}{'namedusers'} = 1;
                       last;
                 }                  }
             }              }
             if ($newserverstatus{$type}{$setting} ne '') {              foreach my $item (@newusers) {
                 @new = split(/,/,$newserverstatus{$type}{$setting});                  if (!grep(/^\Q$item\E$/,@currnamed)) {
             }                      $changes{$type}{'namedusers'} = 1;
             if (@current > 0) {                      last;
                 if (@new > 0) {                  }
                     foreach my $item (@current) {              }
                         if (!grep(/^\Q$item\E$/,@new)) {              my @currmachines = split(/,/,$currserverstatus{$type}{'machines'});
                             $changes{$type}{$setting} = 1;              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 (@new) {                      foreach my $item (@newmachines) {
                         if (!grep(/^\Q$item\E$/,@current)) {                          if (!grep(/^\Q$item\E$/,@currmachines)) {
                             $changes{$type}{$setting} = 1;                              $changes{$type}{'machines'} = 1;
                             last;                              last;
                         }                          }
                     }                      }
                 } else {                  } else {
                     $changes{$type}{$setting} = 1;                      $changes{$type}{'machines'} = 1;
                 }                  }
             } elsif (@new > 0) {              } elsif (@newmachines > 0) {
                 $changes{$type}{$setting} = 1;                  $changes{$type}{'machines'} = 1;
             }              }
         }          }
     }      }
Line 5018  sub modify_serverstatuses { Line 5027  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.2.6  
changed lines
  Added in v.1.82


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