--- loncom/interface/lonmodifycourse.pm 2014/04/28 22:20:13 1.73 +++ loncom/interface/lonmodifycourse.pm 2016/07/24 14:34:59 1.84 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # handler for DC-only modifiable course settings # -# $Id: lonmodifycourse.pm,v 1.73 2014/04/28 22:20:13 raeburn Exp $ +# $Id: lonmodifycourse.pm,v 1.84 2016/07/24 14:34:59 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -55,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']; + 'crosslistings','co-owners','autodropfailsafe']; my $accessdates = ['default_enrollment_start_date','default_enrollment_end_date']; return ($internals,$accessdates); } @@ -71,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'); @@ -117,14 +124,13 @@ sub get_enrollment_settings { $enrollvar{$type} =~ s/,/, /g; } elsif ($type eq "authtype" || $type eq "autharg" || $type eq "coursecode" - || $type eq "crosslistings") { + || $type eq "crosslistings" || $type eq "selfenrollmgr" + || $type eq "autodropfailsafe") { $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 +173,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 +186,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:').'