Correction bug

This commit is contained in:
Valentin Moguérou 2023-07-19 02:18:32 +02:00
parent 8aa5d7e86f
commit 730899c99e

View File

@ -28,9 +28,12 @@ function calcul_section(data) {
epreuve.entries.forEach(entry => {
let field = document.getElementById(entry + "-note");
if (field.valid) caduque = false;
if (field.valid || field.required) {
points_epreuve += epreuve.coef * arrondi_dixieme(parseFloat((field.value) ? field.value : 0));
if (field.value && field.checkValidity()) {
console.log(field.id);
points_epreuve += epreuve.coef * arrondi_dixieme(parseFloat(field.value));
coefficients += epreuve.coef;
caduque = false;
} else if (field.required) {
coefficients += epreuve.coef;
}
});