version 1.54, 2008/05/31 23:37:46
|
version 1.55, 2008/06/03 17:02:12
|
Line 2474 sub modify_login {
|
Line 2474 sub modify_login {
|
'adminmail' => 'off', |
'adminmail' => 'off', |
'newuser' => 'off', |
'newuser' => 'off', |
); |
); |
foreach my $item (@toggles) { |
if (ref($domconfig{'login'}) eq 'HASH') { |
if ($defaultchecked{$item} eq 'on') { |
foreach my $item (@toggles) { |
if (($domconfig{'login'}{$item} eq '0') && |
if ($defaultchecked{$item} eq 'on') { |
($env{'form.'.$item} eq '1')) { |
if (($domconfig{'login'}{$item} eq '0') && |
$changes{$item} = 1; |
($env{'form.'.$item} eq '1')) { |
} elsif (($domconfig{'login'}{$item} eq '' || |
$changes{$item} = 1; |
$domconfig{'login'}{$item} eq '1') && |
} elsif (($domconfig{'login'}{$item} eq '' || |
($env{'form.'.$item} eq '0')) { |
$domconfig{'login'}{$item} eq '1') && |
$changes{$item} = 1; |
($env{'form.'.$item} eq '0')) { |
} |
$changes{$item} = 1; |
} elsif ($defaultchecked{$item} eq 'off') { |
} |
if (($domconfig{'login'}{$item} eq '1') && |
} elsif ($defaultchecked{$item} eq 'off') { |
($env{'form.'.$item} eq '0')) { |
if (($domconfig{'login'}{$item} eq '1') && |
$changes{$item} = 1; |
($env{'form.'.$item} eq '0')) { |
} elsif (($domconfig{'login'}{$item} eq '' || |
$changes{$item} = 1; |
$domconfig{'login'}{$item} eq '0') && |
} elsif (($domconfig{'login'}{$item} eq '' || |
($env{'form.'.$item} eq '1')) { |
$domconfig{'login'}{$item} eq '0') && |
$changes{$item} = 1; |
($env{'form.'.$item} eq '1')) { |
|
$changes{$item} = 1; |
|
} |
} |
} |
} |
} |
} |
if (($domconfig{'login'}{'loginheader'} eq 'text') && |
if (($domconfig{'login'}{'loginheader'} eq 'text') && |
($env{'form.loginheader'} eq 'image')) { |
($env{'form.loginheader'} eq 'image')) { |
$changes{'loginheader'} = 1; |
$changes{'loginheader'} = 1; |
} elsif (($domconfig{'login'}{'loginheader'} eq '' || |
} elsif (($domconfig{'login'}{'loginheader'} eq '' || |
$domconfig{'login'}{'loginheader'} eq 'image') && |
$domconfig{'login'}{'loginheader'} eq 'image') && |
($env{'form.loginheader'} eq 'text')) { |
($env{'form.loginheader'} eq 'text')) { |
$changes{'loginheader'} = 1; |
$changes{'loginheader'} = 1; |
} |
} |
} |
if (keys(%changes) > 0 || $colchgtext) { |
if (keys(%changes) > 0 || $colchgtext) { |
&Apache::loncommon::devalidate_domconfig_cache($dom); |
&Apache::loncommon::devalidate_domconfig_cache($dom); |
Line 2534 sub color_font_choices {
|
Line 2536 sub color_font_choices {
|
img => "Header", |
img => "Header", |
bgs => "Background colors", |
bgs => "Background colors", |
links => "Link colors", |
links => "Link colors", |
|
images => "Images", |
font => "Font color", |
font => "Font color", |
pgbg => "Page", |
pgbg => "Page", |
tabbg => "Header", |
tabbg => "Header", |
Line 2549 sub modify_rolecolors {
|
Line 2552 sub modify_rolecolors {
|
my ($r,$dom,$confname,$roles,%domconfig) = @_; |
my ($r,$dom,$confname,$roles,%domconfig) = @_; |
my ($resulttext,%rolehash); |
my ($resulttext,%rolehash); |
$rolehash{'rolecolors'} = {}; |
$rolehash{'rolecolors'} = {}; |
|
if (ref($domconfig{'rolecolors'}) ne 'HASH') { |
|
if ($domconfig{'rolecolors'} eq '') { |
|
$domconfig{'rolecolors'} = {}; |
|
} |
|
} |
my ($errors,%changes) = &modify_colors($r,$dom,$confname,$roles, |
my ($errors,%changes) = &modify_colors($r,$dom,$confname,$roles, |
$domconfig{'rolecolors'},$rolehash{'rolecolors'}); |
$domconfig{'rolecolors'},$rolehash{'rolecolors'}); |
my $putresult = &Apache::lonnet::put_dom('configuration',\%rolehash, |
my $putresult = &Apache::lonnet::put_dom('configuration',\%rolehash, |
Line 3144 sub modify_quotas {
|
Line 3152 sub modify_quotas {
|
} |
} |
foreach my $key (keys(%formhash)) { |
foreach my $key (keys(%formhash)) { |
if ($formhash{$key} ne '') { |
if ($formhash{$key} ne '') { |
if (!exists($domconfig{'quotas'}{$key})) { |
if (ref($domconfig{'quotas'}) eq 'HASH') { |
|
if (!exists($domconfig{'quotas'}{$key})) { |
|
$changes{$key} = 1; |
|
} |
|
} else { |
$changes{$key} = 1; |
$changes{$key} = 1; |
} |
} |
} |
} |
Line 4247 sub modify_coursecategories {
|
Line 4259 sub modify_coursecategories {
|
my ($dom,%domconfig) = @_; |
my ($dom,%domconfig) = @_; |
my ($resulttext,%deletions,%reorderings,%needreordering,%adds,$errors); |
my ($resulttext,%deletions,%reorderings,%needreordering,%adds,$errors); |
my @deletecategory = &Apache::loncommon::get_env_multiple('form.deletecategory'); |
my @deletecategory = &Apache::loncommon::get_env_multiple('form.deletecategory'); |
if (($domconfig{'coursecategories'}{'instcode::0'} ne '') && ($env{'form.instcode'} == 0)) { |
if (ref($domconfig{'coursecategories'}) eq 'HASH') { |
push (@deletecategory,'instcode::0'); |
if (($domconfig{'coursecategories'}{'instcode::0'} ne '') && ($env{'form.instcode'} == 0)) { |
|
push (@deletecategory,'instcode::0'); |
|
} |
} |
} |
my (@predelcats,@predeltrails,%predelallitems); |
my (@predelcats,@predeltrails,%predelallitems); |
if (ref($domconfig{'coursecategories'}) eq 'HASH') { |
if (ref($domconfig{'coursecategories'}) eq 'HASH') { |