version 1.100, 2023/06/05 02:22:29
|
version 1.101, 2023/07/29 20:33:25
|
Line 795 sub print_setquota {
|
Line 795 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 2732 ENDJS
|
Line 2737 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"); |