version 1.430, 2023/11/03 01:12:15
|
version 1.431, 2023/11/07 11:50:56
|
Line 13392 sub modify_authordefaults {
|
Line 13392 sub modify_authordefaults {
|
my $resulttext; |
my $resulttext; |
if ($putresult eq 'ok') { |
if ($putresult eq 'ok') { |
if (keys(%changes)) { |
if (keys(%changes)) { |
|
my %domdefaults = &Apache::lonnet::get_domain_defaults($dom); |
if ((exists($changes{'authorquota'})) || (exists($changes{'webdav'})) || |
if ((exists($changes{'authorquota'})) || (exists($changes{'webdav'})) || |
($changes{'webdav_LC_adv'})) { |
($changes{'webdav_LC_adv'})) { |
my %domdefaults = &Apache::lonnet::get_domain_defaults($dom,1); |
|
if ((exists($changes{'authorquota'})) && (ref($save_quotas{'authorquota'}) eq 'HASH')) { |
if ((exists($changes{'authorquota'})) && (ref($save_quotas{'authorquota'}) eq 'HASH')) { |
$domdefaults{'authorquota'} = $save_quotas{'authorquota'}; |
$domdefaults{'authorquota'} = $save_quotas{'authorquota'}; |
} |
} |
Line 13402 sub modify_authordefaults {
|
Line 13402 sub modify_authordefaults {
|
(ref($save_quotas{'webdav'}) eq 'HASH')) { |
(ref($save_quotas{'webdav'}) eq 'HASH')) { |
$domdefaults{'webdav'} = $save_quotas{'webdav'}; |
$domdefaults{'webdav'} = $save_quotas{'webdav'}; |
} |
} |
my $cachetime = 24*60*60; |
|
&Apache::lonnet::do_cache_new('domdefaults',$dom,\%domdefaults,$cachetime); |
|
if (ref($lastactref) eq 'HASH') { |
|
$lastactref->{'domdefaults'} = 1; |
|
} |
|
} |
} |
$resulttext = &mt('Changes made:').'<ul>'; |
$resulttext = &mt('Changes made:').'<ul>'; |
my $authoroverride; |
my $authoroverride; |
foreach my $key ('nocodemirror','domcoordacc','copyright','sourceavail') { |
foreach my $key ('nocodemirror','domcoordacc','copyright','sourceavail') { |
if (exists($changes{$key})) { |
if (exists($changes{$key})) { |
|
$domdefaults{$key} = $confhash{$key}; |
my $shown; |
my $shown; |
unless ($authoroverride) { |
unless ($authoroverride) { |
$resulttext .= '<li>'.&mt('Defaults which can be overridden by Author').'<ul>'; |
$resulttext .= '<li>'.&mt('Defaults which can be overridden by Author').'<ul>'; |
Line 13439 sub modify_authordefaults {
|
Line 13435 sub modify_authordefaults {
|
$domcoordoverride = 1; |
$domcoordoverride = 1; |
} |
} |
if ($key eq 'editors') { |
if ($key eq 'editors') { |
if (@{$confhash{'editors'}}) { |
if (ref($confhash{'editors'}) eq 'ARRAY') { |
$shown = join(', ', map { $titles{$_} } @{$confhash{'editors'}}); |
$domdefaults{'editors'} = join(',',@{$confhash{'editors'}}); |
} else { |
if (@{$confhash{'editors'}}) { |
$shown = &mt('None'); |
$shown = join(', ', map { $titles{$_} } @{$confhash{'editors'}}); |
|
} else { |
|
$shown = &mt('None'); |
|
} |
} |
} |
} elsif ($key eq 'authorquota') { |
} elsif ($key eq 'authorquota') { |
foreach my $type (@insttypes) { |
foreach my $type (@insttypes) { |
Line 13467 sub modify_authordefaults {
|
Line 13466 sub modify_authordefaults {
|
if ($domcoordoverride) { |
if ($domcoordoverride) { |
$resulttext .= '</ul></li>'; |
$resulttext .= '</ul></li>'; |
} |
} |
|
my $cachetime = 24*60*60; |
|
&Apache::lonnet::do_cache_new('domdefaults',$dom,\%domdefaults,$cachetime); |
|
if (ref($lastactref) eq 'HASH') { |
|
$lastactref->{'domdefaults'} = 1; |
|
} |
} else { |
} else { |
$resulttext = &mt('No changes made to Authoring Space defaults'); |
$resulttext = &mt('No changes made to Authoring Space defaults'); |
} |
} |