--- loncom/interface/lonmodifycourse.pm 2016/09/17 16:03:36 1.79.2.2 +++ loncom/interface/lonmodifycourse.pm 2016/04/06 17:41:52 1.83 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # handler for DC-only modifiable course settings # -# $Id: lonmodifycourse.pm,v 1.79.2.2 2016/09/17 16:03:36 raeburn Exp $ +# $Id: lonmodifycourse.pm,v 1.83 2016/04/06 17:41:52 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -44,8 +44,7 @@ sub get_dc_settable { if ($type eq 'Community') { return ('courseowner','selfenrollmgrdc','selfenrollmgrcc'); } else { - my @items = ('courseowner','coursecode','authtype','autharg','selfenrollmgrdc', - 'selfenrollmgrcc','mysqltables'); + my @items = ('courseowner','coursecode','authtype','autharg','selfenrollmgrdc','selfenrollmgrcc'); if (&showcredits($cdom)) { push(@items,'defaultcredits'); } @@ -56,7 +55,7 @@ sub get_dc_settable { sub autoenroll_keys { my $internals = ['coursecode','courseowner','authtype','autharg','defaultcredits', 'autoadds','autodrops','autostart','autoend','sectionnums', - 'crosslistings','co-owners','autodropfailsafe']; + 'crosslistings','co-owners']; my $accessdates = ['default_enrollment_start_date','default_enrollment_end_date']; return ($internals,$accessdates); } @@ -72,6 +71,13 @@ sub catalog_settable { if ($confhash->{'categorizecomm'} ne 'comm') { push(@settable,'categorize'); } + } elsif ($type eq 'Placement') { + if ($confhash->{'togglecatsplace'} ne 'place') { + push(@settable,'togglecats'); + } + if ($confhash->{'categorizeplace'} ne 'place') { + push(@settable,'categorize'); + } } else { if ($confhash->{'togglecats'} ne 'crs') { push(@settable,'togglecats'); @@ -118,13 +124,14 @@ sub get_enrollment_settings { $enrollvar{$type} =~ s/,/, /g; } elsif ($type eq "authtype" || $type eq "autharg" || $type eq "coursecode" - || $type eq "crosslistings" || $type eq "selfenrollmgr" -+ || $type eq "autodropfailsafe") { + || $type eq "crosslistings") { $enrollvar{$type} = $settings{$item}; } elsif ($type eq 'defaultcredits') { if (&showcredits($cdom)) { $enrollvar{$type} = $settings{$item}; } + } elsif ($type eq 'selfenrollmgr') { + $enrollvar{$type} = $settings{$item}; } elsif ($type eq 'courseowner') { if ($settings{$item} =~ /^[^:]+:[^:]+$/) { $enrollvar{$type} = $settings{$item}; @@ -167,6 +174,8 @@ sub print_course_search_page { $r->print(&Apache::loncommon::js_changer()); if ($type eq 'Community') { $r->print('

'.&mt('Search for a community in the [_1] domain',$domdesc).'

'); + } elsif ($type eq 'Placement') { + $r->print('

'.&mt('Search for a placement test in the [_1] domain',$domdesc).'

'); } else { $r->print('

'.&mt('Search for a course in the [_1] domain',$domdesc).'

'); } @@ -178,6 +187,11 @@ sub print_course_search_page { '
  • '.&mt('Enter the community with the role of [_1]',$cctitle).'
  • '."\n". '
  • '.&mt('View or modify community settings which only a [_1] may modify.',$dctitle). '
  • '."\n".''); + } elsif ($type eq 'Placement') { + $r->print(&mt('Actions available after searching for a placement test:').''); } else { $r->print(&mt('Actions available after searching for a course:').'