mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-45522 quiz Check that sumgrade is valid before saving.
This commit is contained in:
parent
281e37eb0e
commit
6794a98f6c
@ -668,6 +668,9 @@ function xmldb_quiz_upgrade($oldversion) {
|
||||
FROM {quiz_slots}
|
||||
WHERE quizid = ?",
|
||||
array($quiz->id));
|
||||
if (!$newsumgrades) {
|
||||
$newsumgrades = 0;
|
||||
}
|
||||
if (abs($newsumgrades - $quiz->sumgrades) > 0.000005) {
|
||||
debugging('Because of the previously mentioned problems, ' .
|
||||
'sumgrades for quiz ' . $quiz->id .
|
||||
|
Loading…
x
Reference in New Issue
Block a user