Merge branch 'MDL-51402' of git://github.com/timhunt/moodle
authorDan Poltawski <dan@moodle.com>
Tue, 29 Sep 2015 19:54:45 +0000 (20:54 +0100)
committerDan Poltawski <dan@moodle.com>
Tue, 29 Sep 2015 19:54:45 +0000 (20:54 +0100)
mod/quiz/locallib.php

index 85da20a..aa13741 100644 (file)
@@ -1550,7 +1550,7 @@ function quiz_send_notification_messages($course, $quiz, $attempt, $context, $cm
     // Check for notifications required.
     $notifyfields = 'u.id, u.username, u.idnumber, u.email, u.emailstop, u.lang, u.timezone, u.mailformat, u.maildisplay, ';
     $notifyfields .= get_all_user_name_fields(true, 'u');
-    $groups = groups_get_all_groups($course->id, $submitter->id);
+    $groups = groups_get_all_groups($course->id, $submitter->id, $cm->groupingid);
     if (is_array($groups) && count($groups) > 0) {
         $groups = array_keys($groups);
     } else if (groups_get_activity_groupmode($cm, $course) != NOGROUPS) {