-
Bug
-
Resolution: Fixed
-
Blocker
-
3.0.7, 3.1.2, 3.2
-
MOODLE_30_STABLE, MOODLE_31_STABLE, MOODLE_32_STABLE
-
MOODLE_30_STABLE, MOODLE_31_STABLE
-
MDL-56303-master -
Reported by colin:
The mod/quiz/db/upgrade.php entry for this ticket appears to be updating a lot more than just quiz course modules. Neither the SELECT nor the UPDATE are specific enough to include only quizzes.
if ($oldversion < 2015111602) {
|
// Find quizzes with the combination of require passing grade and grade to pass 0.
|
$quizzes = $DB->get_records_sql("
|
SELECT gi.id, gi.iteminstance
|
FROM {quiz} q
|
INNER JOIN {course_modules} cm ON q.id = cm.instance
|
INNER JOIN {grade_items} gi ON q.id = gi.iteminstance
|
WHERE q.completionpass = 1
|
AND gi.gradepass = 0
|
AND cm.completiongradeitemnumber IS NULL");
|
if ($quizzes) {
|
foreach ($quizzes as $quiz) {
|
$DB->execute("UPDATE {course_modules}
|
SET completiongradeitemnumber = :gradeitemid
|
WHERE instance = :quizid",
|
array('gradeitemid' => $quiz->id, 'quizid' => $quiz->iteminstance));
|
}
|
}
|
- is a regression caused by
-
MDL-54802 Unable to complete quiz which requires passing grade and grade to pass of 0
-
- Closed
-