--- loncom/interface/lonmodifycourse.pm 2016/07/24 14:34:59 1.84
+++ loncom/interface/lonmodifycourse.pm 2016/08/15 18:01:08 1.85
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# handler for DC-only modifiable course settings
#
-# $Id: lonmodifycourse.pm,v 1.84 2016/07/24 14:34:59 raeburn Exp $
+# $Id: lonmodifycourse.pm,v 1.85 2016/08/15 18:01:08 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -44,7 +44,8 @@ sub get_dc_settable {
if ($type eq 'Community') {
return ('courseowner','selfenrollmgrdc','selfenrollmgrcc');
} else {
- my @items = ('courseowner','coursecode','authtype','autharg','selfenrollmgrdc','selfenrollmgrcc');
+ my @items = ('courseowner','coursecode','authtype','autharg','selfenrollmgrdc',
+ 'selfenrollmgrcc','mysqltables');
if (&showcredits($cdom)) {
push(@items,'defaultcredits');
}
@@ -268,14 +269,15 @@ sub print_modification_menu {
$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 ne 'Placement') && (&showcredits($dom))) {
- $setparams_text = 'View/Modify course owner, institutional code, default authentication, credits, and self-enrollment';
+ $setparams_text = 'View/Modify course owner, institutional code, default authentication, credits, self-enrollment and table lifetime';
} else {
- $setparams_text = 'View/Modify course owner, institutional code, default authentication, and self-enrollment';
+ $setparams_text = 'View/Modify course owner, institutional code, default authentication, self-enrollment and table lifetime';
}
$cat_text = 'View/Modify catalog settings for course';
}
my $anon_text = &mt('Responder threshold required to display anonymous survey submissions.');
my $postsubmit_text = &mt('Override defaults for submit button behavior post-submission for this specific course.');
+ my $mysqltables_text = &mt('Override default for lifetime of "temporary" MySQL tables containing student performance data.');
my %domconf = &Apache::lonnet::get_dom('configuration',['coursecategories'],$dom);
my @additional_params = &catalog_settable($domconf{'coursecategories'},$type);
@@ -380,7 +382,8 @@ sub print_modification_menu {
}
$menu_html .= '
'.&mt('Override defaults for who configures self-enrollment for this specific course.').''."\n";
}
- $menu_html .= ''.$setquota_text.''."\n".
+ $menu_html .= ''.$mysqltables_text.''."\n".
+ ''.$setquota_text.''."\n".
''.$setuploadquota_text.''."\n".
''.$anon_text.''."\n".
''.$postsubmit_text.''."\n";
@@ -768,7 +771,8 @@ sub print_course_modification_page {
my ($ownertable,$ccrole,$javascript_validations,$authenitems,$ccname);
my %enrollvar = &get_enrollment_settings($cdom,$cnum);
my %settings = &Apache::lonnet::get('environment',['internal.coursecode','internal.textbook',
- 'internal.selfenrollmgrdc','internal.selfenrollmgrcc'],
+ 'internal.selfenrollmgrdc','internal.selfenrollmgrcc',
+ 'internal.mysqltables'],
$cdom,$cnum);
my $type = &Apache::lonuserutils::get_extended_type($cdom,$cnum,$crstype,\%settings);
my @specific_managebydc = split(/,/,$settings{'internal.selfenrollmgrdc'});
@@ -917,7 +921,12 @@ sub print_course_modification_page {
&Apache::loncommon::end_data_table_row()."\n");
}
$r->print(&Apache::loncommon::end_data_table()."\n".
- '
'.&Apache::lonhtmlcommon::row_closure(1).
+ '
'.&Apache::lonhtmlcommon::row_closure().
+ &Apache::lonhtmlcommon::row_title(
+ &Apache::loncommon::help_open_topic('Modify_Course_Table_Lifetime').
+ ' '.&mt('"Temporary" Tables Lifetime (s)'))."\n".
+ ''.
+ &Apache::lonhtmlcommon::row_closure(1).
&Apache::lonhtmlcommon::end_pick_box().''.$hidden_elements.
'';
} else {
@@ -1215,6 +1229,8 @@ sub modify_course {
$shown = &selfenroll_config_status(\@currmgrcc,$selfenrolltitles);
} elsif (($attr eq 'defaultcredits') && ($shown eq '')) {
$shown = &mt('None');
+ } elsif (($attr eq 'mysqltables') && ($shown eq '')) {
+ $shown = &mt('domain default');
}
$nochgresponse .= '
'.&mt('[_1] still set to: [_2]',$longtype{$attr},$shown).'';
}
@@ -1286,6 +1302,8 @@ sub modify_course {
$shown = &selfenroll_config_status(\@currmgrcc,$selfenrolltitles);
} elsif (($attr eq 'defaultcredits') && ($shown eq '')) {
$shown = &mt('None');
+ } elsif (($attr eq 'mysqltables') && ($shown eq '')) {
+ $shown = &mt('domain default');
}
$nochgresponse .= ''.&mt('[_1] still set to: [_2]',$longtype{$attr},$shown).'';
}
@@ -2112,6 +2130,7 @@ sub course_settings_descrip {
'co-owners' => "Username:domain of each co-owner",
'selfenrollmgrdc' => "Community-specific self-enrollment configuration by Domain Coordinator",
'selfenrollmgrcc' => "Community-specific self-enrollment configuration by Community personnel",
+ 'mysqltables' => '"Temporary" student performance tables lifetime (seconds)',
);
} else {
%longtype = &Apache::lonlocal::texthash(
@@ -2133,7 +2152,7 @@ sub course_settings_descrip {
'autodropfailsafe' => "Failsafe section enrollment count",
'selfenrollmgrdc' => "Course-specific self-enrollment configuration by Domain Coordinator",
'selfenrollmgrcc' => "Course-specific self-enrollment configuration by Course personnel",
-
+ 'mysqltables' => '"Temporary" student performance tables lifetime (seconds)',
);
}
return %longtype;
@@ -2146,7 +2165,7 @@ sub hidden_form_elements {
'locarg','krbarg','krbver','counter','hidefromcat','usecategory',
'threshold','postsubmit','postsubtimeout','defaultcredits','uploadquota',
'selfenrollmgrdc','selfenrollmgrcc','action','state','currsec_st',
- 'sections','newsec'],['^selfenrollmgr_'])."\n".
+ 'sections','newsec','mysqltables'],['^selfenrollmgr_','^selfenroll_'])."\n".
'';
return $hidden_elements;
}