version 1.427, 2023/06/20 14:03:52
|
version 1.428, 2023/07/29 20:33:25
|
Line 6789 sub print_coursedefaults {
|
Line 6789 sub print_coursedefaults {
|
my %choices = &Apache::lonlocal::texthash ( |
my %choices = &Apache::lonlocal::texthash ( |
canuse_pdfforms => 'Course/Community users can create/upload PDF forms', |
canuse_pdfforms => 'Course/Community users can create/upload PDF forms', |
uploadquota => 'Default quota for files uploaded directly to course/community using Course Editor (MB)', |
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', |
anonsurvey_threshold => 'Responder count needed before showing submissions for anonymous surveys', |
coursecredits => 'Credits can be specified for courses', |
coursecredits => 'Credits can be specified for courses', |
uselcmath => 'Math preview uses LON-CAPA previewer (javascript) in place of DragMath (Java)', |
uselcmath => 'Math preview uses LON-CAPA previewer (javascript) in place of DragMath (Java)', |
Line 6805 sub print_coursedefaults {
|
Line 6806 sub print_coursedefaults {
|
my %staticdefaults = ( |
my %staticdefaults = ( |
anonsurvey_threshold => 10, |
anonsurvey_threshold => 10, |
uploadquota => 500, |
uploadquota => 500, |
|
coursequota => 20, |
postsubmit => 60, |
postsubmit => 60, |
mysqltables => 172800, |
mysqltables => 172800, |
domexttool => 1, |
domexttool => 1, |
Line 6922 sub print_coursedefaults {
|
Line 6924 sub print_coursedefaults {
|
$itemcount ++; |
$itemcount ++; |
} else { |
} else { |
$css_class = $itemcount%2 ? ' class="LC_odd_row"' : ''; |
$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 $currusecredits = 0; |
my $postsubmitclient = 1; |
my $postsubmitclient = 1; |
my $ltiauth = 0; |
my $ltiauth = 0; |
Line 6959 sub print_coursedefaults {
|
Line 6962 sub print_coursedefaults {
|
$curruploadquota{$type} = $settings->{'uploadquota'}{$type}; |
$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') { |
if (ref($settings->{'coursecredits'}) eq 'HASH') { |
foreach my $type (@types) { |
foreach my $type (@types) { |
next if ($type eq 'community'); |
next if ($type eq 'community'); |
Line 7018 sub print_coursedefaults {
|
Line 7026 sub print_coursedefaults {
|
if ($curruploadquota{$type} eq '') { |
if ($curruploadquota{$type} eq '') { |
$curruploadquota{$type} = $staticdefaults{'uploadquota'}; |
$curruploadquota{$type} = $staticdefaults{'uploadquota'}; |
} |
} |
|
if ($currcoursequota{$type} eq '') { |
|
$currcoursequota{$type} = $staticdefaults{'coursequota'}; |
|
} |
} |
} |
$datatable .= |
$datatable .= |
'<tr'.$css_class.'><td><span class="LC_nobreak">'. |
'<tr'.$css_class.'><td><span class="LC_nobreak">'. |
Line 7041 sub print_coursedefaults {
|
Line 7052 sub print_coursedefaults {
|
} |
} |
$datatable .= '</tr></table></td></tr>'."\n"; |
$datatable .= '</tr></table></td></tr>'."\n"; |
$itemcount ++; |
$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 $onclick = "toggleDisplay(this.form,'credits');"; |
my $display = 'none'; |
my $display = 'none'; |
if ($currusecredits) { |
if ($currusecredits) { |
Line 20491 sub modify_coursedefaults {
|
Line 20515 sub modify_coursedefaults {
|
my @toggles = ('canuse_pdfforms','uselcmath','usejsme','inline_chem','ltiauth'); |
my @toggles = ('canuse_pdfforms','uselcmath','usejsme','inline_chem','ltiauth'); |
my @numbers = ('anonsurvey_threshold','uploadquota_official','uploadquota_unofficial', |
my @numbers = ('anonsurvey_threshold','uploadquota_official','uploadquota_unofficial', |
'uploadquota_community','uploadquota_textbook','uploadquota_placement', |
'uploadquota_community','uploadquota_textbook','uploadquota_placement', |
'mysqltables_official','mysqltables_unofficial','mysqltables_community', |
'coursequota_official','coursequota_unofficial','coursequota_community', |
'mysqltables_textbook','mysqltables_placement'); |
'coursequota_textbook','coursequota_placement','mysqltables_official', |
|
'mysqltables_unofficial','mysqltables_community','mysqltables_textbook', |
|
'mysqltables_placement'); |
my @types = ('official','unofficial','community','textbook','placement'); |
my @types = ('official','unofficial','community','textbook','placement'); |
my %staticdefaults = ( |
my %staticdefaults = ( |
anonsurvey_threshold => 10, |
anonsurvey_threshold => 10, |
uploadquota => 500, |
uploadquota => 500, |
|
coursequota => 20, |
postsubmit => 60, |
postsubmit => 60, |
mysqltables => 172800, |
mysqltables => 172800, |
domexttool => 1, |
domexttool => 1, |
Line 20544 sub modify_coursedefaults {
|
Line 20571 sub modify_coursedefaults {
|
} |
} |
$defaultshash{'coursedefaults'}{$item} = $newdef; |
$defaultshash{'coursedefaults'}{$item} = $newdef; |
} else { |
} else { |
my ($setting,$type) = ($item =~ /^(uploadquota|mysqltables)_(\w+)$/); |
my ($setting,$type) = ($item =~ /^(uploadquota|coursequota|mysqltables)_(\w+)$/); |
if (ref($domconfig{'coursedefaults'}{$setting}) eq 'HASH') { |
if (ref($domconfig{'coursedefaults'}{$setting}) eq 'HASH') { |
$currdef = $domconfig{'coursedefaults'}{$setting}{$type}; |
$currdef = $domconfig{'coursedefaults'}{$setting}{$type}; |
} |
} |
Line 20556 sub modify_coursedefaults {
|
Line 20583 sub modify_coursedefaults {
|
unless (($currdef eq '') && ($newdef == $staticdefaults{$item})) { |
unless (($currdef eq '') && ($newdef == $staticdefaults{$item})) { |
$changes{$item} = 1; |
$changes{$item} = 1; |
} |
} |
} elsif ($item =~ /^(uploadquota|mysqltables)_/) { |
} elsif ($item =~ /^(uploadquota|coursequota|mysqltables)_/) { |
my $setting = $1; |
my $setting = $1; |
unless (($currdef eq '') && ($newdef == $staticdefaults{$setting})) { |
unless (($currdef eq '') && ($newdef == $staticdefaults{$setting})) { |
$changes{$setting} = 1; |
$changes{$setting} = 1; |
Line 20742 sub modify_coursedefaults {
|
Line 20769 sub modify_coursedefaults {
|
($changes{'coursecredits'}) || ($changes{'uselcmath'}) || ($changes{'usejsme'}) || |
($changes{'coursecredits'}) || ($changes{'uselcmath'}) || ($changes{'usejsme'}) || |
($changes{'canclone'}) || ($changes{'mysqltables'}) || ($changes{'texengine'}) || |
($changes{'canclone'}) || ($changes{'mysqltables'}) || ($changes{'texengine'}) || |
($changes{'inline_chem'}) || ($changes{'ltiauth'}) || ($changes{'domexttool'}) || |
($changes{'inline_chem'}) || ($changes{'ltiauth'}) || ($changes{'domexttool'}) || |
($changes{'exttool'}) ) { |
($changes{'exttool'}) || ($changes{'coursequota'})) { |
foreach my $item ('canuse_pdfforms','uselcmath','usejsme','inline_chem','texengine', |
foreach my $item ('canuse_pdfforms','uselcmath','usejsme','inline_chem','texengine', |
'ltiauth') { |
'ltiauth') { |
if ($changes{$item}) { |
if ($changes{$item}) { |
Line 20775 sub modify_coursedefaults {
|
Line 20802 sub modify_coursedefaults {
|
} |
} |
} |
} |
} |
} |
|
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 ($changes{'canclone'}) { |
if (ref($defaultshash{'coursedefaults'}{'canclone'}) eq 'HASH') { |
if (ref($defaultshash{'coursedefaults'}{'canclone'}) eq 'HASH') { |
if (ref($defaultshash{'coursedefaults'}{'canclone'}{'instcode'}) eq 'ARRAY') { |
if (ref($defaultshash{'coursedefaults'}{'canclone'}{'instcode'}) eq 'ARRAY') { |
Line 20853 sub modify_coursedefaults {
|
Line 20887 sub modify_coursedefaults {
|
} else { |
} else { |
$resulttext .= '<li>'.&mt('Default quota for content uploaded via Course Editor remains default: [_1] MB',$staticdefaults{'uploadquota'}).'</li>'; |
$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('Placement tests: [_1] MB','<b>'.$defaultshash{'coursedefaults'}{'coursequota'}{'placement'}.'</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') { |
} elsif ($item eq 'mysqltables') { |
if (ref($defaultshash{'coursedefaults'}{'mysqltables'}) eq 'HASH') { |
if (ref($defaultshash{'coursedefaults'}{'mysqltables'}) eq 'HASH') { |
$resulttext .= '<li>'.&mt('Lifetime of "Temporary" MySQL tables (student performance data) on homeserver').'<ul>'. |
$resulttext .= '<li>'.&mt('Lifetime of "Temporary" MySQL tables (student performance data) on homeserver').'<ul>'. |