Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-44029 mod_quiz: Fixing group deleted handler so it does not remov…

…e user overrides.
  • Loading branch information...
commit b095ee9f3aa8662a016e55c9cdd7d7abce6a4b72 1 parent a7cae26
Matt Petro mpetrowi authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 mod/quiz/locallib.php
4 mod/quiz/locallib.php
View
@@ -1638,7 +1638,9 @@ function quiz_groups_group_deleted_handler($event) {
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'=>$event->courseid);
$records = $DB->get_records_sql_menu($sql, $params);
if (!$records) {
Please sign in to comment.
Something went wrong with that request. Please try again.