Skip to content

Commit

Permalink
Merge branch 'MDL-61421-master' of git://github.com/sarjona/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols committed Feb 22, 2018
2 parents 6478b4e + bfea865 commit c482497
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion admin/tool/cohortroles/classes/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public static function sync_all_cohort_roles() {
$params['roleid'] = $roleid;
$params['userid'] = $userid;

$sql = 'SELECT u.id AS userid, ra.id, ctx.id AS contextid
$sql = 'SELECT DISTINCT u.id AS userid, ra.id, ctx.id AS contextid
FROM {user} u
JOIN {cohort_members} cm ON u.id = cm.userid
JOIN {context} ctx ON u.id = ctx.instanceid AND ctx.contextlevel = :usercontext
Expand Down

0 comments on commit c482497

Please sign in to comment.