--- loncom/interface/lonmodifycourse.pm 2014/03/13 14:46:46 1.69 +++ loncom/interface/lonmodifycourse.pm 2016/09/17 16:03:36 1.79.2.2 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # handler for DC-only modifiable course settings # -# $Id: lonmodifycourse.pm,v 1.69 2014/03/13 14:46:46 raeburn Exp $ +# $Id: lonmodifycourse.pm,v 1.79.2.2 2016/09/17 16:03:36 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -34,16 +34,18 @@ use Apache::loncommon; use Apache::lonhtmlcommon; use Apache::lonlocal; use Apache::lonuserutils; +use Apache::loncreateuser; use Apache::lonpickcourse; use lib '/home/httpd/lib/perl'; -use LONCAPA; +use LONCAPA qw(:DEFAULT :match); sub get_dc_settable { my ($type,$cdom) = @_; if ($type eq 'Community') { - return ('courseowner'); + return ('courseowner','selfenrollmgrdc','selfenrollmgrcc'); } else { - my @items = ('courseowner','coursecode','authtype','autharg'); + my @items = ('courseowner','coursecode','authtype','autharg','selfenrollmgrdc', + 'selfenrollmgrcc','mysqltables'); if (&showcredits($cdom)) { push(@items,'defaultcredits'); } @@ -54,7 +56,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); } @@ -116,7 +118,8 @@ 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)) { @@ -153,7 +156,7 @@ sub print_course_search_page { $type = 'Course'; } &print_header($r,$type); - my ($filterlist,$filter) = &get_filters(); + my ($filterlist,$filter) = &get_filters($dom); my ($numtitles,$cctitle,$dctitle,@codetitles); my $ccrole = 'cc'; if ($type eq 'Community') { @@ -161,7 +164,7 @@ sub print_course_search_page { } $cctitle = &Apache::lonnet::plaintext($ccrole,$type); $dctitle = &Apache::lonnet::plaintext('dc'); - $r->print(&Apache::lonpickcourse::js_changer()); + $r->print(&Apache::loncommon::js_changer()); if ($type eq 'Community') { $r->print('

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

'); } else { @@ -169,7 +172,7 @@ sub print_course_search_page { } $r->print(&Apache::loncommon::build_filters($filterlist,$type,undef,undef,$filter,$action, \$numtitles,'modifycourse',undef,undef,undef, - \@codetitles,$filter->{'domainfilter'})); + \@codetitles,$dom)); if ($type eq 'Community') { $r->print(&mt('Actions available after searching for a community:').'