version 1.436, 2024/02/27 15:48:01
|
version 1.437, 2024/03/03 00:08:37
|
Line 7324 sub print_authordefaults {
|
Line 7324 sub print_authordefaults {
|
if ($position eq 'top') { |
if ($position eq 'top') { |
my %defaultchecked = ( |
my %defaultchecked = ( |
'nocodemirror' => 'off', |
'nocodemirror' => 'off', |
|
'daxecollapse' => 'off', |
'domcoordacc' => 'on', |
'domcoordacc' => 'on', |
); |
); |
my @toggles = ('nocodemirror','domcoordacc'); |
my @toggles = ('nocodemirror','daxecollapse','domcoordacc'); |
($datatable,$itemcount) = &radiobutton_prefs($settings,\@toggles,\%defaultchecked, |
($datatable,$itemcount) = &radiobutton_prefs($settings,\@toggles,\%defaultchecked, |
\%titles,$itemcount); |
\%titles,$itemcount); |
my %staticdefaults = ( |
my %staticdefaults = ( |
Line 7495 sub authordefaults_titles {
|
Line 7496 sub authordefaults_titles {
|
webdav => 'WebDAV', |
webdav => 'WebDAV', |
authorquota => 'Authoring Space quotas (MB)', |
authorquota => 'Authoring Space quotas (MB)', |
nocodemirror => 'Deactivate CodeMirror for EditXML editor', |
nocodemirror => 'Deactivate CodeMirror for EditXML editor', |
|
daxecollapse => 'Daxe editor: LON-CAPA standard menus start collapsed', |
domcoordacc => 'Dom. Coords. can enter Authoring Spaces in domain', |
domcoordacc => 'Dom. Coords. can enter Authoring Spaces in domain', |
edit => 'Standard editor (Edit)', |
edit => 'Standard editor (Edit)', |
xml => 'Text editor (EditXML)', |
xml => 'Text editor (EditXML)', |
Line 13381 sub modify_authordefaults {
|
Line 13383 sub modify_authordefaults {
|
'copyright' => 'default', |
'copyright' => 'default', |
'sourceavail' => 'closed', |
'sourceavail' => 'closed', |
'nocodemirror' => 'off', |
'nocodemirror' => 'off', |
|
'daxecollapse' => 'off', |
'domcoordacc' => 'on', |
'domcoordacc' => 'on', |
'editors' => ['edit','xml']. |
'editors' => ['edit','xml']. |
'authorquota' => 500, |
'authorquota' => 500, |
'webdav' => 0, |
'webdav' => 0, |
); |
); |
my %titles = &authordefaults_titles(); |
my %titles = &authordefaults_titles(); |
foreach my $item ('nocodemirror','domcoordacc') { |
foreach my $item ('nocodemirror','daxecollapse','domcoordacc') { |
if ($env{'form.'.$item} =~ /^(0|1)$/) { |
if ($env{'form.'.$item} =~ /^(0|1)$/) { |
$confhash{$item} = $env{'form.'.$item}; |
$confhash{$item} = $env{'form.'.$item}; |
} |
} |
Line 13431 sub modify_authordefaults {
|
Line 13434 sub modify_authordefaults {
|
$save_quotas{'webdav'}{'_LC_adv'} = $env{'form.webdav_LC_adv'}; |
$save_quotas{'webdav'}{'_LC_adv'} = $env{'form.webdav_LC_adv'}; |
} |
} |
if (ref($domconfig{'authordefaults'}) eq 'HASH') { |
if (ref($domconfig{'authordefaults'}) eq 'HASH') { |
foreach my $item ('nocodemirror','domcoordacc','copyright','sourceavail') { |
foreach my $item ('nocodemirror','daxecollapse','domcoordacc','copyright','sourceavail') { |
if ($domconfig{'authordefaults'}{$item} ne $confhash{$item}) { |
if ($domconfig{'authordefaults'}{$item} ne $confhash{$item}) { |
$changes{$item} = 1; |
$changes{$item} = 1; |
} |
} |
Line 13453 sub modify_authordefaults {
|
Line 13456 sub modify_authordefaults {
|
} |
} |
} else { |
} else { |
my @offon = ('off','on'); |
my @offon = ('off','on'); |
foreach my $item ('nocodemirror','domcoordacc') { |
foreach my $item ('nocodemirror','daxecollapse','domcoordacc') { |
if ($offon[$confhash{$item}] ne $staticdefaults{$item}) { |
if ($offon[$confhash{$item}] ne $staticdefaults{$item}) { |
$changes{$item} = 1; |
$changes{$item} = 1; |
} |
} |
Line 13522 sub modify_authordefaults {
|
Line 13525 sub modify_authordefaults {
|
} |
} |
$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','daxecollapse','domcoordacc','copyright','sourceavail') { |
if (exists($changes{$key})) { |
if (exists($changes{$key})) { |
$domdefaults{$key} = $confhash{$key}; |
$domdefaults{$key} = $confhash{$key}; |
my $shown; |
my $shown; |
Line 13530 sub modify_authordefaults {
|
Line 13533 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 'daxecollapse') || ($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}); |