version 1.79.2.9.2.3, 2023/07/05 18:57:55
|
version 1.79.2.9.2.4, 2023/09/04 20:46:02
|
Line 775 sub print_setquota {
|
Line 775 sub print_setquota {
|
$cdom,$cnum); |
$cdom,$cnum); |
my $coursequota = $settings{'internal.coursequota'}; |
my $coursequota = $settings{'internal.coursequota'}; |
my $uploadquota = $settings{'internal.uploadquota'}; |
my $uploadquota = $settings{'internal.uploadquota'}; |
if ($coursequota eq '') { |
if (($uploadquota eq '') || ($coursequota eq '')) { |
$coursequota = $staticdefaults{'coursequota'}; |
|
} |
|
if ($uploadquota eq '') { |
|
my %domdefs = &Apache::lonnet::get_domain_defaults($cdom); |
my %domdefs = &Apache::lonnet::get_domain_defaults($cdom); |
my $quotatype = &Apache::lonuserutils::get_extended_type($cdom,$cnum,$type,\%settings); |
my $quotatype = &Apache::lonuserutils::get_extended_type($cdom,$cnum,$type,\%settings); |
$uploadquota = $domdefs{$quotatype.'quota'}; |
|
if ($uploadquota eq '') { |
if ($uploadquota eq '') { |
$uploadquota = $staticdefaults{'uploadquota'}; |
$uploadquota = $domdefs{$quotatype.'quota'}; |
|
if ($uploadquota eq '') { |
|
$uploadquota = $staticdefaults{'uploadquota'}; |
|
} |
|
} |
|
if ($coursequota eq '') { |
|
$coursequota = $domdefs{$quotatype.'coursequota'}; |
|
if ($coursequota eq '') { |
|
$coursequota = $staticdefaults{'coursequota'}; |
|
} |
} |
} |
} |
} |
&print_header($r,$type); |
&print_header($r,$type); |
Line 2710 ENDJS
|
Line 2715 ENDJS
|
$js .= <<"ENDSCRIPT"; |
$js .= <<"ENDSCRIPT"; |
|
|
function verify_quota() { |
function verify_quota() { |
var newquota = document.setquota.coursequota.value; |
var newcoursequota = document.setquota.coursequota.value; |
|
var newuploadquota = document.setquota.uploadquota.value; |
var num_reg = $regexp; |
var num_reg = $regexp; |
if (num_reg.test(newquota)) { |
if ((num_reg.test(newcoursequota)) && (num_reg.test(newuploadquota))) { |
changePage(document.setquota,'processquota'); |
changePage(document.setquota,'processquota'); |
} else { |
} else { |
alert("$invalid\\n$alert"); |
alert("$invalid\\n$alert"); |