[LON-CAPA-cvs] cvs: doc /loncapafiles langcheck.piml loncom/interface domainprefs.pm
raeburn
raeburn at source.lon-capa.org
Sat Jun 22 15:33:23 EDT 2024
raeburn Sat Jun 22 19:33:23 2024 EDT
Modified files:
/loncom/interface domainprefs.pm
/doc/loncapafiles langcheck.piml
Log:
- Check for en successful if LANG=en_US.UTF-8 or LANG="en_US.UTF-8" (or
equivalents for RC_LANG).
-------------- next part --------------
Index: loncom/interface/domainprefs.pm
diff -u loncom/interface/domainprefs.pm:1.160.6.118.2.14 loncom/interface/domainprefs.pm:1.160.6.118.2.15
--- loncom/interface/domainprefs.pm:1.160.6.118.2.14 Wed Jul 5 17:08:22 2023
+++ loncom/interface/domainprefs.pm Mon Sep 4 17:40:47 2023
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set domain-wide configuration settings
#
-# $Id: domainprefs.pm,v 1.160.6.118.2.14 2023/07/05 17:08:22 raeburn Exp $
+# $Id: domainprefs.pm,v 1.160.6.118.2.15 2023/09/04 17:40:47 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -5919,6 +5919,7 @@
my $itemcount = 1;
my %choices = &Apache::lonlocal::texthash (
uploadquota => 'Default quota for files uploaded directly to course/community using Course Editor (MB)',
+ coursequota => 'Default cumulative quota for all group portfolio spaces in course',
anonsurvey_threshold => 'Responder count needed before showing submissions for anonymous surveys',
coursecredits => 'Credits can be specified for courses',
uselcmath => 'Math preview uses LON-CAPA previewer (javascript) in place of DragMath (Java)',
@@ -5935,6 +5936,7 @@
my %staticdefaults = (
anonsurvey_threshold => 10,
uploadquota => 500,
+ coursequota => 20,
postsubmit => 60,
mysqltables => 172800,
domexttool => 1,
@@ -6051,7 +6053,8 @@
$itemcount ++;
} else {
$css_class = $itemcount%2 ? ' class="LC_odd_row"' : '';
- my ($currdefresponder,%defcredits,%curruploadquota,%deftimeout,%currmysql);
+ my ($currdefresponder,%defcredits,%curruploadquota,%currcoursequota,
+ %deftimeout,%currmysql);
my $currusecredits = 0;
my $postsubmitclient = 1;
my $ltiauth = 0;
@@ -6088,6 +6091,11 @@
$curruploadquota{$type} = $settings->{'uploadquota'}{$type};
}
}
+ if (ref($settings->{'coursequota'}) eq 'HASH') {
+ foreach my $type (keys(%{$settings->{'coursequota'}})) {
+ $currcoursequota{$type} = $settings->{'coursequota'}{$type};
+ }
+ }
if (ref($settings->{'coursecredits'}) eq 'HASH') {
foreach my $type (@types) {
next if ($type eq 'community');
@@ -6147,6 +6155,9 @@
if ($curruploadquota{$type} eq '') {
$curruploadquota{$type} = $staticdefaults{'uploadquota'};
}
+ if ($currcoursequota{$type} eq '') {
+ $currcoursequota{$type} = $staticdefaults{'coursequota'};
+ }
}
$datatable .=
'<tr'.$css_class.'><td><span class="LC_nobreak">'.
@@ -6170,6 +6181,19 @@
}
$datatable .= '</tr></table></td></tr>'."\n";
$itemcount ++;
+ $css_class = $itemcount%2 ? ' class="LC_odd_row"' : '';
+ $datatable .= '<tr'.$css_class.'><td><span class="LC_nobreak">'.
+ $choices{'coursequota'}.
+ '</span></td>'.
+ '<td style="text-align: right" class="LC_right_item">'.
+ '<table><tr>';
+ foreach my $type (@types) {
+ $datatable .= '<td style="text-align: center">'.&mt($type).'<br />'.
+ '<input type="text" name="coursequota_'.$type.'"'.
+ ' value="'.$currcoursequota{$type}.'" size="5" /></td>';
+ }
+ $datatable .= '</tr></table></td></tr>'."\n";
+ $itemcount ++;
my $onclick = "toggleDisplay(this.form,'credits');";
my $display = 'none';
if ($currusecredits) {
@@ -18327,12 +18351,15 @@
);
my @toggles = ('uselcmath','usejsme','inline_chem','ltiauth');
my @numbers = ('anonsurvey_threshold','uploadquota_official','uploadquota_unofficial',
- 'uploadquota_community','uploadquota_textbook','mysqltables_official',
- 'mysqltables_unofficial','mysqltables_community','mysqltables_textbook');
+ 'uploadquota_community','uploadquota_textbook','coursequota_official',
+ 'coursequota_unofficial','coursequota_community','coursequota_textbook',
+ 'mysqltables_official','mysqltables_unofficial','mysqltables_community',
+ 'mysqltables_textbook');
my @types = ('official','unofficial','community','textbook');
my %staticdefaults = (
anonsurvey_threshold => 10,
uploadquota => 500,
+ coursequota => 20,
postsubmit => 60,
mysqltables => 172800,
domexttool => 1,
@@ -18380,7 +18407,7 @@
}
$defaultshash{'coursedefaults'}{$item} = $newdef;
} else {
- my ($setting,$type) = ($item =~ /^(uploadquota|mysqltables)_(\w+)$/);
+ my ($setting,$type) = ($item =~ /^(uploadquota|coursequota|mysqltables)_(\w+)$/);
if (ref($domconfig{'coursedefaults'}{$setting}) eq 'HASH') {
$currdef = $domconfig{'coursedefaults'}{$setting}{$type};
}
@@ -18392,7 +18419,7 @@
unless (($currdef eq '') && ($newdef == $staticdefaults{$item})) {
$changes{$item} = 1;
}
- } elsif ($item =~ /^(uploadquota|mysqltables)_/) {
+ } elsif ($item =~ /^(uploadquota|coursequota|mysqltables)_/) {
my $setting = $1;
unless (($currdef eq '') && ($newdef == $staticdefaults{$setting})) {
$changes{$setting} = 1;
@@ -18578,7 +18605,7 @@
($changes{'coursecredits'}) || ($changes{'uselcmath'}) || ($changes{'usejsme'}) ||
($changes{'canclone'}) || ($changes{'mysqltables'}) || ($changes{'texengine'}) ||
($changes{'inline_chem'}) || ($changes{'ltiauth'}) || ($changes{'domexttool'}) ||
- ($changes{'exttool'})) {
+ ($changes{'exttool'}) || ($changes{'coursequota'})) {
foreach my $item ('uselcmath','usejsme','inline_chem','texengine','ltiauth') {
if ($changes{$item}) {
$domdefaults{$item}=$defaultshash{'coursedefaults'}{$item};
@@ -18610,6 +18637,13 @@
}
}
}
+ if ($changes{'coursequota'}) {
+ if (ref($defaultshash{'coursedefaults'}{'coursequota'}) eq 'HASH') {
+ foreach my $type (@types) {
+ $domdefaults{$type.'coursequota'}=$defaultshash{'coursedefaults'}{'coursequota'}{$type};
+ }
+ }
+ }
if ($changes{'canclone'}) {
if (ref($defaultshash{'coursedefaults'}{'canclone'}) eq 'HASH') {
if (ref($defaultshash{'coursedefaults'}{'canclone'}{'instcode'}) eq 'ARRAY') {
@@ -18681,6 +18715,18 @@
} else {
$resulttext .= '<li>'.&mt('Default quota for content uploaded via Course Editor remains default: [_1] MB',$staticdefaults{'uploadquota'}).'</li>';
}
+ } elsif ($item eq 'coursequota') {
+ if (ref($defaultshash{'coursedefaults'}{'coursequota'}) eq 'HASH') {
+ $resulttext .= '<li>'.&mt('Default cumulative quota for all group portfolio spaces in course set as follows:').'<ul>'.
+ '<li>'.&mt('Official courses: [_1] MB','<b>'.$defaultshash{'coursedefaults'}{'coursequota'}{'official'}.'</b>').'</li>'.
+ '<li>'.&mt('Unofficial courses: [_1] MB','<b>'.$defaultshash{'coursedefaults'}{'coursequota'}{'unofficial'}.'</b>').'</li>'.
+ '<li>'.&mt('Textbook courses: [_1] MB','<b>'.$defaultshash{'coursedefaults'}{'coursequota'}{'textbook'}.'</b>').'</li>'.
+ '<li>'.&mt('Communities: [_1] MB','<b>'.$defaultshash{'coursedefaults'}{'coursequota'}{'community'}.'</b>').'</li>'.
+ '</ul>'.
+ '</li>';
+ } else {
+ $resulttext .= '<li>'.&mt('Default cumulative quota for all group portfolio spaces in course remains default: [_1] MB',$staticdefaults{'coursequota'}).'</li>';
+ }
} elsif ($item eq 'mysqltables') {
if (ref($defaultshash{'coursedefaults'}{'mysqltables'}) eq 'HASH') {
$resulttext .= '<li>'.&mt('Lifetime of "Temporary" MySQL tables (student performance data) on homeserver').'<ul>'.
Index: doc/loncapafiles/langcheck.piml
diff -u doc/loncapafiles/langcheck.piml:1.37 doc/loncapafiles/langcheck.piml:1.38
--- doc/loncapafiles/langcheck.piml:1.37 Thu Jun 20 04:04:54 2024
+++ doc/loncapafiles/langcheck.piml Sat Jun 22 19:33:23 2024
@@ -2,7 +2,7 @@
"http://lpml.sourceforge.net/DTD/piml.dtd">
<!-- langcheck.piml -->
-<!-- $Id: langcheck.piml,v 1.37 2024/06/20 04:04:54 raeburn Exp $ -->
+<!-- $Id: langcheck.piml,v 1.38 2024/06/22 19:33:23 raeburn Exp $ -->
<!--
@@ -69,7 +69,7 @@
'<DIST />' eq 'suse12.3' || '<DIST />' eq 'suse13.1' || '<DIST />' eq 'suse13.2') {
if (open(PIPE,"cat /etc/sysconfig/language |grep '^RC_LANG' |")) {
print "Checking OS language";
- if (<PIPE> =~ /^RC_LANG="en/) {
+ if (<PIPE> =~ /^RC_LANG="?en/) {
print "... OK\n";
} else {
print $osmsg.
@@ -84,7 +84,7 @@
'<DIST />' eq 'debian10' || '<DIST />' eq 'debian11' || '<DIST />' eq 'debian12') {
if (open(PIPE,"cat /etc/default/locale |grep '^LANG' |")) {
print "Checking OS language";
- if (<PIPE> =~ /^LANG=en/) {
+ if (<PIPE> =~ /^LANG="?en/) {
print "... OK\n";
} else {
print $osmsg.
@@ -107,7 +107,7 @@
'<DIST />' eq 'rocky9' || '<DIST />' eq 'alma9') {
if (open(PIPE,"cat /etc/locale.conf |grep '^LANG' |")) {
print "Checking OS language";
- if (<PIPE> =~ /^LANG="en/) {
+ if (<PIPE> =~ /^LANG="?en/) {
print "... OK\n";
} else {
print $osmsg.
More information about the LON-CAPA-cvs
mailing list