Permalink
Browse files

Merge branch 'MDL-19263-22' of https://github.com/mackensen/moodle in…

…to MOODLE_22_STABLE
  • Loading branch information...
2 parents b8fffc6 + e895355 commit c821346cfeac9cd6807b4058fdc277be1938c96f @stronk7 stronk7 committed Apr 26, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 mod/assignment/lib.php
View
@@ -1993,8 +1993,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

0 comments on commit c821346

Please sign in to comment.