--- loncom/interface/lonmodifycourse.pm 2016/04/04 01:09:48 1.81
+++ 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.81 2016/04/04 01:09:48 raeburn Exp $
+# $Id: lonmodifycourse.pm,v 1.83 2016/04/06 17:41:52 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') || ($type eq 'Placement')) {
+ if ($type eq 'Community') {
return ('courseowner','selfenrollmgrdc','selfenrollmgrcc');
} else {
my @items = ('courseowner','coursecode','authtype','autharg','selfenrollmgrdc','selfenrollmgrcc');
@@ -268,9 +268,7 @@ sub print_modification_menu {
$categorytitle = 'View/Modify Course Settings';
$setquota_text = &mt('Total disk space allocated for storage of portfolio files in all groups in a course.');
$setuploadquota_text = &mt('Disk space allocated for storage of content uploaded directly to a course via Content Editor.');
- if ($type eq 'Placement') {
- $setparams_text = 'View/Modify course owner and self-enrollment';
- } elsif (&showcredits($dom)) {
+ if (($type ne 'Placement') && (&showcredits($dom))) {
$setparams_text = 'View/Modify course owner, institutional code, default authentication, credits, and self-enrollment';
} else {
$setparams_text = 'View/Modify course owner, institutional code, default authentication, and self-enrollment';
@@ -375,10 +373,6 @@ sub print_modification_menu {
if ($type eq 'Community') {
$menu_html .= '
'.&mt('Community owner (permitted to assign Coordinator roles in the community).').''."\n".
''.&mt('Override defaults for who configures self-enrollment for this specific community').''."\n";
- } elsif ($type eq 'Placement') {
- $menu_html .= ''.&mt('Course owner (permitted to assign Course Coordinator roles in the course).').''."\n".
- ''.&mt('Override defaults for who configures self-enrollment for this specific course.').''."\n";
-
} else {
$menu_html .= ''.&mt('Course owner (permitted to assign Course Coordinator roles in the course).').''."\n".
''.&mt("Institutional code and default authentication (both required for auto-enrollment of students from institutional datafeeds).").''."\n";
@@ -853,31 +847,27 @@ sub print_course_modification_page {
$r->print(&Apache::lonhtmlcommon::row_title(
&Apache::loncommon::help_open_topic('Modify_Community_Owner').
' '.&mt('Community Owner'))."\n");
- } elsif ($crstype eq 'Placement') {
- $r->print(&Apache::lonhtmlcommon::row_title(
- &Apache::loncommon::help_open_topic('Modify_Course_Owner').
- ' '.&mt('Course Owner'))."\n");
} else {
$r->print(&Apache::lonhtmlcommon::row_title(
&Apache::loncommon::help_open_topic('Modify_Course_Instcode').
' '.&mt('Course Code'))."\n".
''.
&Apache::lonhtmlcommon::row_closure());
- if (&showcredits($cdom)) {
+ if (($crstype eq 'Course') && (&showcredits($cdom))) {
$r->print(&Apache::lonhtmlcommon::row_title(
&Apache::loncommon::help_open_topic('Modify_Course_Credithours').
' '.&mt('Credits (students)'))."\n".
''.
&Apache::lonhtmlcommon::row_closure());
- }
- $r->print(&Apache::lonhtmlcommon::row_title(
- &Apache::loncommon::help_open_topic('Modify_Course_Defaultauth').
- ' '.&mt('Default Authentication method'))."\n".
- $authenitems."\n".
- &Apache::lonhtmlcommon::row_closure().
- &Apache::lonhtmlcommon::row_title(
- &Apache::loncommon::help_open_topic('Modify_Course_Owner').
- ' '.&mt('Course Owner'))."\n");
+ }
+ $r->print(&Apache::lonhtmlcommon::row_title(
+ &Apache::loncommon::help_open_topic('Modify_Course_Defaultauth').
+ ' '.&mt('Default Authentication method'))."\n".
+ $authenitems."\n".
+ &Apache::lonhtmlcommon::row_closure().
+ &Apache::lonhtmlcommon::row_title(
+ &Apache::loncommon::help_open_topic('Modify_Course_Owner').
+ ' '.&mt('Course Owner'))."\n");
}
my ($cctitle,$rolename,$currmanages,$ccchecked,$dcchecked,$defaultchecked);
my ($selfenrollrows,$selfenrolltitles) = &Apache::lonuserutils::get_selfenroll_titles();
@@ -931,7 +921,7 @@ sub print_course_modification_page {
'
'.&Apache::lonhtmlcommon::row_closure(1).
&Apache::lonhtmlcommon::end_pick_box().''.$hidden_elements.
'print('this.form.submit();"');
} else {
$r->print('javascript:verify_message(this.form);"');
@@ -1070,9 +1060,6 @@ sub modify_course {
if ($type eq 'Community') {
%changed = ( owner => 0 );
$ccrole = 'co';
- } elsif ($type eq 'Placement') {
- %changed = ( owner => 0 );
- $ccrole = 'cc';
} else {
%changed = ( code => 0,
owner => 0,
@@ -1125,7 +1112,7 @@ sub modify_course {
}
}
- if (&showcredits($cdom) && exists($env{'form.defaultcredits'})) {
+ if (($type ne 'Placement') && (&showcredits($cdom) && exists($env{'form.defaultcredits'}))) {
$newattr{'defaultcredits'} =~ s/[^\d\.]//g;
$newattr{'defaultcredits'}=$env{'form.defaultcredits'};
}
@@ -2205,7 +2192,6 @@ sub handler {
}
my $choose_text;
my $type = $env{'form.type'};
-print STDERR "type is ||$type||\n";
if ($type eq '') {
$type = 'Course';
}