Skip to content

Commit

Permalink
MDL-44029 mod_quiz: Fixing group deleted handler so it does not remov…
Browse files Browse the repository at this point in the history
…e user overrides.
  • Loading branch information
Matt Petro committed Feb 6, 2014
1 parent 183515d commit 74b3c4e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mod/quiz/locallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1837,7 +1837,9 @@ function quiz_process_group_deleted_in_course($courseid) {
FROM {quiz_overrides} o
JOIN {quiz} quiz ON quiz.id = o.quiz
LEFT JOIN {groups} grp ON grp.id = o.groupid
WHERE quiz.course = :courseid AND grp.id IS NULL";
WHERE quiz.course = :courseid
AND o.groupid IS NOT NULL
AND grp.id IS NULL";
$params = array('courseid' => $courseid);
$records = $DB->get_records_sql_menu($sql, $params);
if (!$records) {
Expand Down

0 comments on commit 74b3c4e

Please sign in to comment.