--- loncom/interface/lonmodifycourse.pm 2009/11/09 03:50:27 1.48 +++ loncom/interface/lonmodifycourse.pm 2010/03/31 20:09:07 1.53 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # handler for DC-only modifiable course settings # -# $Id: lonmodifycourse.pm,v 1.48 2009/11/09 03:50:27 raeburn Exp $ +# $Id: lonmodifycourse.pm,v 1.53 2010/03/31 20:09:07 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -49,20 +49,30 @@ sub get_dc_settable { sub autoenroll_keys { my $internals = ['coursecode','courseowner','authtype','autharg','autoadds','autodrops', - 'autostart','autoend','sectionnums','crosslistings']; + 'autostart','autoend','sectionnums','crosslistings', + 'co-owners']; my $accessdates = ['default_enrollment_start_date','default_enrollment_end_date']; return ($internals,$accessdates); } sub catalog_settable { - my ($confhash) = @_; + my ($confhash,$type) = @_; my @settable; if (ref($confhash) eq 'HASH') { - if ($confhash->{'togglecats'} ne 'crs') { - push(@settable,'togglecats'); - } - if ($confhash->{'categorize'} ne 'crs') { - push(@settable,'categorize'); + if ($type eq 'Community') { + if ($confhash->{'togglecatscomm'} ne 'comm') { + push(@settable,'togglecats'); + } + if ($confhash->{'categorizecomm'} ne 'comm') { + push(@settable,'categorize'); + } + } else { + if ($confhash->{'togglecats'} ne 'crs') { + push(@settable,'togglecats'); + } + if ($confhash->{'categorize'} ne 'crs') { + push(@settable,'categorize'); + } } } else { push(@settable,('togglecats','categorize')); @@ -97,7 +107,7 @@ sub get_enrollment_settings { } else { $enrollvar{$type} = &Apache::lonlocal::locallocaltime($settings{$item}); } - } elsif ($type eq "sectionnums") { + } elsif (($type eq 'sectionnums') || ($type eq 'co-owners')) { $enrollvar{$type} = $settings{$item}; $enrollvar{$type} =~ s/,/, /g; } elsif ($type eq "authtype" @@ -224,7 +234,7 @@ sub print_modification_menu { } ); my %domconf = &Apache::lonnet::get_dom('configuration',['coursecategories'],$dom); - my @additional_params = &catalog_settable($domconf{'coursecategories'}); + my @additional_params = &catalog_settable($domconf{'coursecategories'},$type); if (@additional_params > 0) { push (@menu, { text => $cat_text, phase => 'catsettings', @@ -326,7 +336,7 @@ sub print_settings_display { "