Skip to content

Commit

Permalink
MDL-24690 fixed incorrect cohort condition when auto-creating groups
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Oct 18, 2010
1 parent fcb4dec commit d490ca8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions group/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -542,8 +542,8 @@ function groups_get_potential_members($courseid, $roleid = null, $cohortid = nul
}

if ($cohortid) {
$cohortjoin = "JOIN {cohort_members} cm ON cm.userid = u.id
JOIN {cohort} c ON c.id = cm.cohortid";
$cohortjoin = "JOIN {cohort_members} cm ON (cm.userid = u.id AND cm.cohortid = :cohortid)";
$params['cohortid'] = $cohortid;
} else {
$cohortjoin = "";
}
Expand Down

0 comments on commit d490ca8

Please sign in to comment.