Merge branch 'MDL-78217-master' of https://github.com/rezaies/moodle

This commit is contained in:
Ilya Tregubov 2023-09-22 18:06:25 +08:00
commit 216060b637
No known key found for this signature in database
GPG Key ID: 0F58186F748E55C1
3 changed files with 3 additions and 3 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -287,7 +287,7 @@ export const init = (decSep, oldCalculation) => {
// This is only required if we are using natural weights.
if (parseInt(categoryElement.dataset.aggregation) === grade.aggregation.sum) {
const weightElement = gradeItemRow.querySelector(selectors.weightOverrideInput);
weightElement.value = formatFloat(parseWeight(weightElement.value));
weightElement.value = formatFloat(Math.max(0, parseWeight(weightElement.value)));
recalculateNaturalWeights(categoryElement);
}
}