Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fcb4dec
)
MDL-24690 fixed incorrect cohort condition when auto-creating groups
author
Petr Skoda
<skodak@moodle.org>
Mon, 18 Oct 2010 08:26:57 +0000
(08:26 +0000)
committer
Petr Skoda
<skodak@moodle.org>
Mon, 18 Oct 2010 08:26:57 +0000
(08:26 +0000)
group/lib.php
patch
|
blob
|
blame
|
history
diff --git
a/group/lib.php
b/group/lib.php
index
cdfa2e5
..
8fd4c12
100644
(file)
--- a/
group/lib.php
+++ b/
group/lib.php
@@
-542,8
+542,8
@@
function groups_get_potential_members($courseid, $roleid = null, $cohortid = nul
}
if ($cohortid) {
}
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 = "";
}
} else {
$cohortjoin = "";
}