--- loncom/interface/lonmodifycourse.pm 2016/04/02 04:30:21 1.80 +++ loncom/interface/lonmodifycourse.pm 2016/04/04 01:09:48 1.81 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # handler for DC-only modifiable course settings # -# $Id: lonmodifycourse.pm,v 1.80 2016/04/02 04:30:21 raeburn Exp $ +# $Id: lonmodifycourse.pm,v 1.81 2016/04/04 01:09:48 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -41,7 +41,7 @@ use LONCAPA qw(:DEFAULT :match); sub get_dc_settable { my ($type,$cdom) = @_; - if ($type eq 'Community') { + if (($type eq 'Community') || ($type eq 'Placement')) { return ('courseowner','selfenrollmgrdc','selfenrollmgrcc'); } else { my @items = ('courseowner','coursecode','authtype','autharg','selfenrollmgrdc','selfenrollmgrcc'); @@ -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'); @@ -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:').'