--- loncom/interface/domainprefs.pm 2008/12/26 16:34:43 1.76.2.5 +++ loncom/interface/domainprefs.pm 2008/12/17 21:50:29 1.78 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set domain-wide configuration settings # -# $Id: domainprefs.pm,v 1.76.2.5 2008/12/26 16:34:43 raeburn Exp $ +# $Id: domainprefs.pm,v 1.78 2008/12/17 21:50:29 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -39,7 +39,7 @@ use Apache::lonlocal; use Apache::lonmsg(); use LONCAPA qw(:DEFAULT :match); use LONCAPA::Enrollment; -use LONCAPA::lonauthcgi(); +use LONCAPA::loncgi(); use File::Copy; use Locale::Language; use DateTime::TimeZone; @@ -107,7 +107,7 @@ sub handler { 'quotas' => { text => 'User blogs, home pages and portfolios', help => 'Domain_Configuration_Quotas', - header => [{col1 => 'User type', + header => [{col1 => 'User affiliation', col2 => 'Available tools', col3 => 'Portfolio quota',}], }, @@ -175,7 +175,7 @@ sub handler { }], }, 'serverstatuses' => - {text => 'Access to Server Status Pages', + {text => 'Access to server status pages', help => 'Domain_Configuration_Server_Status', header => [{col1 => 'Status Page', col2 => 'Other named users', @@ -817,9 +817,9 @@ sub login_choices { bgs => "Background colors", links => "Link colors", font => "Font color", - pgbg => "Page", - mainbg => "Main panel", - sidebg => "Side panel", + pgbg => "Header", + mainbg => "Page", + sidebg => "Login box", link => "Link", alink => "Active link", vlink => "Visited link", @@ -1317,11 +1317,9 @@ sub print_quotas { '
'; foreach my $item (@usertools) { my $checked = 'checked="checked" '; - if (ref($settings) eq 'HASH') { - if (ref($settings->{$item}) eq 'HASH') { - if ($settings->{$item}->{'_LC_adv'} == 0) { - $checked = ''; - } + if (ref($settings->{$item}) eq 'HASH') { + if ($settings->{$item}->{'_LC_adv'} == 0) { + $checked = ''; } } $datatable .= '  '; } - $datatable .= '('.&mt('overrides affiliation').')'; + $datatable .= '('.&mt('overrides affiliation'). + ')'; $$rowtotal += $typecount; return $datatable; } @@ -2372,7 +2371,7 @@ sub print_serverstatuses { } } } - my $titles= &LONCAPA::lonauthcgi::serverstatus_titles(); + my $titles= &LONCAPA::loncgi::serverstatus_titles(); my $rownum = 0; my $css_class; foreach my $type (@pages) { @@ -3611,16 +3610,10 @@ sub modify_quotas { } $resulttext .= ''; } - my %newenv; foreach my $item (@usertools) { if (ref($changes{$item}) eq 'HASH') { - my $newacc = - &Apache::lonnet::usertools_access($env{'user.name'}, - $env{'user.domain'}, - $item,'reload'); - if ($env{'environment.availabletools.'.$item} ne $newacc) { - $newenv{'environment.availabletools.'.$item} = $newacc; - } + my $hashid = $env{'user.name'}.':'.$env{'user.domain'}; + &Apache::lonnet::devalidate_cache_new('usertools.'.$item,$hashid); $resulttext .= '
  • '.$titles{$item}.''; - if (keys(%newenv)) { - &Apache::lonnet::appenv(\%newenv); - } } else { $resulttext = &mt('No changes made to availability of home pages, blogs, portfolios or default quotas'); } @@ -4997,30 +4987,23 @@ sub modify_serverstatuses { } 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; - } - } - foreach my $item (@newmachines) { - if (!grep(/^\Q$item\E$/,@currmachines)) { - $changes{$type}{'machines'} = 1; - last; - } - } - } else { + foreach my $item (@currmachines) { + if (!grep(/^\Q$item\E$/,@newmachines)) { + $changes{$type}{'machines'} = 1; + last; + } + } + foreach my $item (@newmachines) { + if (!grep(/^\Q$item\E$/,@currmachines)) { $changes{$type}{'machines'} = 1; + last; } - } elsif (@newmachines > 0) { - $changes{$type}{'machines'} = 1; } + } } if (keys(%changes) > 0) { - my $titles= &LONCAPA::lonauthcgi::serverstatus_titles(); + my $titles= &LONCAPA::loncgi::serverstatus_titles(); my $putresult = &Apache::lonnet::put_dom('configuration', \%serverstatushash,$dom); if ($putresult eq 'ok') {