--- loncom/interface/domainprefs.pm 2024/04/17 01:02:47 1.439 +++ loncom/interface/domainprefs.pm 2024/05/01 15:18:58 1.440 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set domain-wide configuration settings # -# $Id: domainprefs.pm,v 1.439 2024/04/17 01:02:47 raeburn Exp $ +# $Id: domainprefs.pm,v 1.440 2024/05/01 15:18:58 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -7523,6 +7523,15 @@ sub print_authordefaults { } $datatable .= ''; $itemcount ++; + my %defchecked = ( + 'archive' => 'off', + ); + my @toggles = ('archive'); + (my $archive,$itemcount) = &radiobutton_prefs($settings,['archive'], + {'archive' => 'off'}, + \%titles,$itemcount); + $datatable .= $archive."\n"; + $itemcount ++; } $$rowtotal += $itemcount; return $datatable; @@ -7546,6 +7555,7 @@ sub authordefaults_titles { none => 'No override set', overon => 'Override -- webDAV on', overoff => 'Override -- webDAV off', + archive => 'Authors can download tar.gz file of Authoring Space', ); } @@ -13428,9 +13438,10 @@ sub modify_authordefaults { 'editors' => ['edit','xml'], 'authorquota' => 500, 'webdav' => 0, + 'archive' => 'off', ); my %titles = &authordefaults_titles(); - foreach my $item ('nocodemirror','daxecollapse','domcoordacc') { + foreach my $item ('nocodemirror','daxecollapse','domcoordacc','archive') { if ($env{'form.'.$item} =~ /^(0|1)$/) { $confhash{$item} = $env{'form.'.$item}; } @@ -13474,7 +13485,7 @@ sub modify_authordefaults { $save_quotas{'webdav'}{'_LC_adv'} = $env{'form.webdav_LC_adv'}; } if (ref($domconfig{'authordefaults'}) eq 'HASH') { - foreach my $item ('nocodemirror','daxecollapse','domcoordacc','copyright','sourceavail') { + foreach my $item ('nocodemirror','daxecollapse','domcoordacc','copyright','sourceavail','archive') { if ($domconfig{'authordefaults'}{$item} ne $confhash{$item}) { $changes{$item} = 1; } @@ -13496,7 +13507,7 @@ sub modify_authordefaults { } } else { my @offon = ('off','on'); - foreach my $item ('nocodemirror','daxecollapse','domcoordacc') { + foreach my $item ('nocodemirror','daxecollapse','domcoordacc','archive') { if ($offon[$confhash{$item}] ne $staticdefaults{$item}) { $changes{$item} = 1; } @@ -13593,7 +13604,7 @@ sub modify_authordefaults { $resulttext .= ''; } my $domcoordoverride; - foreach my $key ('editors','authorquota','webdav','webdav_LC_adv') { + foreach my $key ('editors','authorquota','webdav','webdav_LC_adv','archive') { if (exists($changes{$key})) { my $shown; unless ($domcoordoverride) { @@ -13625,6 +13636,8 @@ sub modify_authordefaults { } else { $shown = $titles{'none'}; } + } elsif ($key eq 'archive') { + $shown = ($confhash{$key} ? &mt('Yes') : &mt('No')); } $resulttext .= '