Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-19263 assignment: only notify users enrolled in course

  • Loading branch information...
commit 4ef25d16cb1a6d9e00c29fdc1226a5142fa80aed 1 parent 8e35d0a
@mackensen mackensen authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 mod/assignment/lib.php
View
8 mod/assignment/lib.php
@@ -1856,8 +1856,14 @@ function send_file($filearea, $args) {
* @return array
*/
function get_graders($user) {
+ global $DB;
+
//potential graders
- $potgraders = get_users_by_capability($this->context, 'mod/assignment:grade', '', '', '', '', '', '', false, false);
+ list($enrolledsql, $params) = get_enrolled_sql($this->context, 'mod/assignment:grade', 0, true);
+ $sql = "SELECT u.*
+ FROM {user} u
+ JOIN ($enrolledsql) je ON je.id = u.id";
+ $potgraders = $DB->get_records_sql($sql, $params);
$graders = array();
if (groups_get_activity_groupmode($this->cm) == SEPARATEGROUPS) { // Separate groups are being used
Please sign in to comment.
Something went wrong with that request. Please try again.