version 1.435, 2024/02/27 15:46:42
|
version 1.436, 2024/02/27 15:48:01
|
Line 670 sub handler {
|
Line 670 sub handler {
|
{col1 => 'Rules for shared secrets', |
{col1 => 'Rules for shared secrets', |
col2 => 'Settings'}, |
col2 => 'Settings'}, |
{col1 => 'Link Protectors in Courses', |
{col1 => 'Link Protectors in Courses', |
col2 => 'Values'}, |
col2 => 'Values'}, |
{col1 => 'Link Protectors', |
{col1 => 'Link Protectors', |
col2 => 'Settings'}, |
col2 => 'Settings'}, |
{col1 => 'Consumers', |
{col1 => 'Consumers', |
Line 686 sub handler {
|
Line 686 sub handler {
|
print => \&print_ipaccess, |
print => \&print_ipaccess, |
modify => \&modify_ipaccess, |
modify => \&modify_ipaccess, |
}, |
}, |
'authordefaults' => |
'authordefaults' => |
{text => 'Authoring Space defaults', |
{text => 'Authoring Space defaults', |
help => 'Domain_Configuration_Author_Defaults', |
help => 'Domain_Configuration_Author_Defaults', |
header => [{col1 => 'Defaults which can be overridden by Author', |
header => [{col1 => 'Defaults which can be overridden by Author', |
Line 7445 sub print_authordefaults {
|
Line 7445 sub print_authordefaults {
|
my $checkedno = ' checked="checked"'; |
my $checkedno = ' checked="checked"'; |
my ($checkedon,$checkedoff); |
my ($checkedon,$checkedoff); |
if (ref($quotas{'webdav'}) eq 'HASH') { |
if (ref($quotas{'webdav'}) eq 'HASH') { |
if ($quotas{'webdav'}{'_LC_adv'} =~ /^0|1$/) { |
if ($quotas{'webdav'}{'_LC_adv'} =~ /^0|1$/) { |
if ($quotas{'webdav'}{'_LC_adv'}) { |
if ($quotas{'webdav'}{'_LC_adv'}) { |
$checkedon = $checkedno; |
$checkedon = $checkedno; |
} else { |
} else { |
Line 7474 sub print_authordefaults {
|
Line 7474 sub print_authordefaults {
|
$text = $titles{'overon'}; |
$text = $titles{'overon'}; |
$val = 1; |
$val = 1; |
$checked = $checkedon; |
$checked = $checkedon; |
} |
} |
$datatable .= '<span class="LC_nobreak"><label>'. |
$datatable .= '<span class="LC_nobreak"><label>'. |
'<input type="radio" name="webdav_LC_adv"'. |
'<input type="radio" name="webdav_LC_adv"'. |
' value="'.$val.'"'.$checked.' />'. |
' value="'.$val.'"'.$checked.' />'. |
Line 7503 sub authordefaults_titles {
|
Line 7503 sub authordefaults_titles {
|
webdav_LC_adv_over => '(overrides access based on affiliation, if set)', |
webdav_LC_adv_over => '(overrides access based on affiliation, if set)', |
none => 'No override set', |
none => 'No override set', |
overon => 'Override -- webDAV on', |
overon => 'Override -- webDAV on', |
overoff => 'Override -- webDAV off', |
overoff => 'Override -- webDAV off', |
); |
); |
} |
} |
|
|
Line 13407 sub modify_authordefaults {
|
Line 13407 sub modify_authordefaults {
|
} |
} |
} |
} |
$confhash{'editors'} = \@editors; |
$confhash{'editors'} = \@editors; |
|
|
my ($othertitle,$usertypes,$types) = &Apache::loncommon::sorted_inst_types($dom); |
my ($othertitle,$usertypes,$types) = &Apache::loncommon::sorted_inst_types($dom); |
my @insttypes; |
my @insttypes; |
if (ref($types) eq 'ARRAY') { |
if (ref($types) eq 'ARRAY') { |
Line 13437 sub modify_authordefaults {
|
Line 13437 sub modify_authordefaults {
|
} |
} |
} |
} |
if (ref($domconfig{'authordefaults'}{'editors'}) eq 'ARRAY') { |
if (ref($domconfig{'authordefaults'}{'editors'}) eq 'ARRAY') { |
my @diffs = |
my @diffs = |
&Apache::loncommon::compare_arrays($confhash{'editors'}, |
&Apache::loncommon::compare_arrays($confhash{'editors'}, |
$domconfig{'authordefaults'}{'editors'}); |
$domconfig{'authordefaults'}{'editors'}); |
unless (@diffs == 0) { |
unless (@diffs == 0) { |
Line 13454 sub modify_authordefaults {
|
Line 13454 sub modify_authordefaults {
|
} else { |
} else { |
my @offon = ('off','on'); |
my @offon = ('off','on'); |
foreach my $item ('nocodemirror','domcoordacc') { |
foreach my $item ('nocodemirror','domcoordacc') { |
if ($offon[$confhash{$item}] ne $staticdefaults{$item}) { |
if ($offon[$confhash{$item}] ne $staticdefaults{$item}) { |
$changes{$item} = 1; |
$changes{$item} = 1; |
} |
} |
} |
} |
Line 13491 sub modify_authordefaults {
|
Line 13491 sub modify_authordefaults {
|
} |
} |
if (ref($curr_quotas{'webdav'}) eq 'HASH') { |
if (ref($curr_quotas{'webdav'}) eq 'HASH') { |
if (exists($save_quotas{'webdav'}{'_LC_adv'})) { |
if (exists($save_quotas{'webdav'}{'_LC_adv'})) { |
if ($save_quotas{'webdav'}{'_LC_adv'} ne $curr_quotas{'webdav'}{'_LC_adv'}) { |
if ($save_quotas{'webdav'}{'_LC_adv'} ne $curr_quotas{'webdav'}{'_LC_adv'}) { |
$changes{'webdav_LC_adv'} = 1; |
$changes{'webdav_LC_adv'} = 1; |
} |
} |
} elsif (exists($curr_quotas{'webdav'}{'_LC_adv'})) { |
} elsif (exists($curr_quotas{'webdav'}{'_LC_adv'})) { |
Line 13511 sub modify_authordefaults {
|
Line 13511 sub modify_authordefaults {
|
if (keys(%changes)) { |
if (keys(%changes)) { |
my %domdefaults = &Apache::lonnet::get_domain_defaults($dom); |
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'})) { |
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 13530 sub modify_authordefaults {
|
Line 13530 sub modify_authordefaults {
|
$resulttext .= '<li>'.&mt('Defaults which can be overridden by Author').'<ul>'; |
$resulttext .= '<li>'.&mt('Defaults which can be overridden by Author').'<ul>'; |
$authoroverride = 1; |
$authoroverride = 1; |
} |
} |
if (($key eq 'nocodemirror') || ($key eq 'domcoordacc')) { |
if (($key eq 'nocodemirror') || ($key eq 'domcoordacc')) { |
$shown = ($confhash{$key} ? &mt('Yes') : &mt('No')); |
$shown = ($confhash{$key} ? &mt('Yes') : &mt('No')); |
} elsif ($key eq 'copyright') { |
} elsif ($key eq 'copyright') { |
$shown = &Apache::loncommon::copyrightdescription($confhash{$key}); |
$shown = &Apache::loncommon::copyrightdescription($confhash{$key}); |
} elsif ($key eq 'sourceavail') { |
} elsif ($key eq 'sourceavail') { |
$shown = &Apache::loncommon::source_copyrightdescription($confhash{$key}); |
$shown = &Apache::loncommon::source_copyrightdescription($confhash{$key}); |
} |
} |
$resulttext .= '<li>'.&mt('[_1] set to: [_2]',$titles{$key},$shown).'</li>'; |
$resulttext .= '<li>'.&mt('[_1] set to: [_2]',$titles{$key},$shown).'</li>'; |
} |
} |
} |
} |
if ($authoroverride) { |
if ($authoroverride) { |
Line 13578 sub modify_authordefaults {
|
Line 13578 sub modify_authordefaults {
|
} |
} |
} |
} |
$resulttext .= '<li>'.&mt('[_1] set to: [_2]',$titles{$key},$shown).'</li>'; |
$resulttext .= '<li>'.&mt('[_1] set to: [_2]',$titles{$key},$shown).'</li>'; |
} |
} |
} |
} |
if ($domcoordoverride) { |
if ($domcoordoverride) { |
$resulttext .= '</ul></li>'; |
$resulttext .= '</ul></li>'; |