--- loncom/interface/lonmodifycourse.pm 2023/06/05 02:22:29 1.100 +++ loncom/interface/lonmodifycourse.pm 2023/07/29 20:33:25 1.101 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # handler for DC-only modifiable course settings # -# $Id: lonmodifycourse.pm,v 1.100 2023/06/05 02:22:29 raeburn Exp $ +# $Id: lonmodifycourse.pm,v 1.101 2023/07/29 20:33:25 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -795,15 +795,20 @@ sub print_setquota { $cdom,$cnum); my $coursequota = $settings{'internal.coursequota'}; my $uploadquota = $settings{'internal.uploadquota'}; - if ($coursequota eq '') { - $coursequota = $staticdefaults{'coursequota'}; - } - if ($uploadquota eq '') { + if (($uploadquota eq '') || ($coursequota eq '')) { my %domdefs = &Apache::lonnet::get_domain_defaults($cdom); my $quotatype = &Apache::lonuserutils::get_extended_type($cdom,$cnum,$type,\%settings); - $uploadquota = $domdefs{$quotatype.'quota'}; 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); @@ -2732,9 +2737,10 @@ ENDJS $js .= <<"ENDSCRIPT"; 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; - if (num_reg.test(newquota)) { + if ((num_reg.test(newcoursequota)) && (num_reg.test(newuploadquota))) { changePage(document.setquota,'processquota'); } else { alert("$invalid\\n$alert");