version 1.76.2.4, 2008/12/25 02:22:08
|
version 1.78, 2008/12/17 21:50:29
|
Line 39 use Apache::lonlocal;
|
Line 39 use Apache::lonlocal;
|
use Apache::lonmsg(); |
use Apache::lonmsg(); |
use LONCAPA qw(:DEFAULT :match); |
use LONCAPA qw(:DEFAULT :match); |
use LONCAPA::Enrollment; |
use LONCAPA::Enrollment; |
use LONCAPA::lonauthcgi(); |
use LONCAPA::loncgi(); |
use File::Copy; |
use File::Copy; |
use Locale::Language; |
use Locale::Language; |
use DateTime::TimeZone; |
use DateTime::TimeZone; |
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 1317 sub print_quotas {
|
Line 1317 sub print_quotas {
|
'<td class="LC_left_item" colspan="2"><br />'; |
'<td class="LC_left_item" colspan="2"><br />'; |
foreach my $item (@usertools) { |
foreach my $item (@usertools) { |
my $checked = 'checked="checked" '; |
my $checked = 'checked="checked" '; |
if (ref($settings) eq 'HASH') { |
if (ref($settings->{$item}) eq 'HASH') { |
if (ref($settings->{$item}) eq 'HASH') { |
if ($settings->{$item}->{'_LC_adv'} == 0) { |
if ($settings->{$item}->{'_LC_adv'} == 0) { |
$checked = ''; |
$checked = ''; |
|
} |
|
} |
} |
} |
} |
$datatable .= '<span class="LC_nobreak"><label>'. |
$datatable .= '<span class="LC_nobreak"><label>'. |
Line 1329 sub print_quotas {
|
Line 1327 sub print_quotas {
|
'" value="_LC_adv" '.$checked.'/>'.$titles{$item}. |
'" value="_LC_adv" '.$checked.'/>'.$titles{$item}. |
'</label></span> '; |
'</label></span> '; |
} |
} |
$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 2372 sub print_serverstatuses {
|
Line 2371 sub print_serverstatuses {
|
} |
} |
} |
} |
} |
} |
my $titles= &LONCAPA::lonauthcgi::serverstatus_titles(); |
my $titles= &LONCAPA::loncgi::serverstatus_titles(); |
my $rownum = 0; |
my $rownum = 0; |
my $css_class; |
my $css_class; |
foreach my $type (@pages) { |
foreach my $type (@pages) { |
Line 3611 sub modify_quotas {
|
Line 3610 sub modify_quotas {
|
} |
} |
$resulttext .= '</ul></li>'; |
$resulttext .= '</ul></li>'; |
} |
} |
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 $hashid = $env{'user.name'}.':'.$env{'user.domain'}; |
&Apache::lonnet::usertools_access($env{'user.name'}, |
&Apache::lonnet::devalidate_cache_new('usertools.'.$item,$hashid); |
$env{'user.domain'}, |
|
$item,'reload'); |
|
if ($env{'environment.availabletools.'.$item} ne $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') { |
if ($changes{$item}{$type}) { |
if ($changes{$item}{$type}) { |
Line 3641 sub modify_quotas {
|
Line 3634 sub modify_quotas {
|
} |
} |
} |
} |
$resulttext .= '</ul>'; |
$resulttext .= '</ul>'; |
if (keys(%newenv)) { |
|
&Apache::lonnet::appenv(\%newenv); |
|
} |
|
} else { |
} else { |
$resulttext = &mt('No changes made to availability of home pages, blogs, portfolios or default quotas'); |
$resulttext = &mt('No changes made to availability of home pages, blogs, portfolios or default quotas'); |
} |
} |
Line 5013 sub modify_serverstatuses {
|
Line 5003 sub modify_serverstatuses {
|
} |
} |
} |
} |
if (keys(%changes) > 0) { |
if (keys(%changes) > 0) { |
my $titles= &LONCAPA::lonauthcgi::serverstatus_titles(); |
my $titles= &LONCAPA::loncgi::serverstatus_titles(); |
my $putresult = &Apache::lonnet::put_dom('configuration', |
my $putresult = &Apache::lonnet::put_dom('configuration', |
\%serverstatushash,$dom); |
\%serverstatushash,$dom); |
if ($putresult eq 'ok') { |
if ($putresult eq 'ok') { |