[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface lonmodifycourse.pm
raeburn
raeburn at source.lon-capa.org
Sat Sep 17 12:03:36 EDT 2016
raeburn Sat Sep 17 16:03:36 2016 EDT
Modified files: (Branch: version_2_11_X)
/loncom/interface lonmodifycourse.pm
Log:
- For 2.11
- Backport 1.85
Index: loncom/interface/lonmodifycourse.pm
diff -u loncom/interface/lonmodifycourse.pm:1.79.2.1 loncom/interface/lonmodifycourse.pm:1.79.2.2
--- loncom/interface/lonmodifycourse.pm:1.79.2.1 Sun Aug 7 01:32:52 2016
+++ loncom/interface/lonmodifycourse.pm Sat Sep 17 16:03:36 2016
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# handler for DC-only modifiable course settings
#
-# $Id: lonmodifycourse.pm,v 1.79.2.1 2016/08/07 01:32:52 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
#
@@ -44,7 +44,8 @@
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');
}
@@ -254,9 +255,9 @@
$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 (&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';
}
@@ -366,7 +367,8 @@
}
$menu_html .= ' <li>'.&mt('Override defaults for who configures self-enrollment for this specific course.').'</li>'."\n";
}
- $menu_html .= '<li>'.$setquota_text.'</li>'."\n".
+ $menu_html .= '<li>'.$mysqltables_text.'</li>'."\n".
+ '<li>'.$setquota_text.'</li>'."\n".
'<li>'.$setuploadquota_text.'</li>'."\n".
'<li>'.$anon_text.'</li>'."\n".
'<li>'.$postsubmit_text.'</li>'."\n";
@@ -752,8 +754,8 @@
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'],
- $cdom,$cnum);
+ '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'});
my @specific_managebycc = split(/,/,$settings{'internal.selfenrollmgrcc'});
@@ -901,7 +903,12 @@
&Apache::loncommon::end_data_table_row()."\n");
}
$r->print(&Apache::loncommon::end_data_table()."\n".
- '<br />'.&Apache::lonhtmlcommon::row_closure(1).
+ '<br />'.&Apache::lonhtmlcommon::row_closure().
+ &Apache::lonhtmlcommon::row_title(
+ &Apache::loncommon::help_open_topic('Modify_Course_Table_Lifetime').
+ ' '.&mt('"Temporary" Tables Lifetime (s)'))."\n".
+ '<input type="text" size="10" name="mysqltables" value="'.$settings{'internal.mysqltables'}.'" />'.
+ &Apache::lonhtmlcommon::row_closure(1).
&Apache::lonhtmlcommon::end_pick_box().'</p><p>'.$hidden_elements.
'<input type="button" onclick="javascript:changePage(this.form,'."'processparms'".');');
if ($crstype eq 'Community') {
@@ -1023,7 +1030,7 @@
my %longtype = &course_settings_descrip($type);
my @items = ('internal.courseowner','description','internal.co-owners',
'internal.pendingco-owners','internal.selfenrollmgrdc',
- 'internal.selfenrollmgrcc');
+ 'internal.selfenrollmgrcc','internal.mysqltables');
my ($selfenrollrows,$selfenrolltitles) = &Apache::lonuserutils::get_selfenroll_titles();
unless ($type eq 'Community') {
push(@items,('internal.coursecode','internal.authtype','internal.autharg',
@@ -1094,10 +1101,13 @@
$changed{'code'} = 1;
}
}
-
+ if ( exists($env{'form.mysqltables'}) ) {
+ $newattr{'mysqltables'} = $env{'form.mysqltables'};
+ $newattr{'mysqltables'} =~ s/\D+//g;
+ }
if (&showcredits($cdom) && exists($env{'form.defaultcredits'})) {
- $newattr{'defaultcredits'} =~ s/[^\d\.]//g;
$newattr{'defaultcredits'}=$env{'form.defaultcredits'};
+ $newattr{'defaultcredits'} =~ s/[^\d\.]//g;
}
}
@@ -1189,6 +1199,8 @@
$shown = &selfenroll_config_status(\@newmgrcc,$selfenrolltitles);
} elsif (($attr eq 'defaultcredits') && ($shown eq '')) {
$shown = &mt('None');
+ } elsif (($attr eq 'mysqltables') && ($shown eq '')) {
+ $shown = &mt('domain default');
}
$chgresponse .= '<li>'.&mt('[_1] now set to: [_2]',$longtype{$attr},$shown).'</li>';
} else {
@@ -1199,6 +1211,8 @@
$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 .= '<li>'.&mt('[_1] still set to: [_2]',$longtype{$attr},$shown).'</li>';
}
@@ -1270,6 +1284,8 @@
$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 .= '<li>'.&mt('[_1] still set to: [_2]',$longtype{$attr},$shown).'</li>';
}
@@ -2115,6 +2131,7 @@
'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)',
);
}
@@ -2128,7 +2145,7 @@
'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".
'<input type="hidden" name="prevphase" value="'.$env{'form.phase'}.'" />';
return $hidden_elements;
}
More information about the LON-CAPA-cvs
mailing list