Permalink
Browse files

Merge branch 'MDL-35358_m22' of git://github.com/rwijaya/moodle into …

…MOODLE_22_STABLE
  • Loading branch information...
2 parents aab4251 + 1cd1eb5 commit ecf1f30591f08f18c1e95db7a199be5b4c948f5d @danpoltawski danpoltawski committed Nov 14, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 mod/lesson/essay.php
View
@@ -269,12 +269,12 @@
// Get all the users who have taken this lesson, order by their last name
$ufields = user_picture::fields('u');
if (!empty($cm->groupingid)) {
- $params["groupinid"] = $cm->groupingid;
+ $params["groupingid"] = $cm->groupingid;
$sql = "SELECT DISTINCT $ufields
FROM {lesson_attempts} a
INNER JOIN {user} u ON u.id = a.userid
INNER JOIN {groups_members} gm ON gm.userid = u.id
- INNER JOIN {groupings_groups} gg ON gm.groupid = :groupinid
+ INNER JOIN {groupings_groups} gg ON gm.groupid = gg.groupid AND gg.groupingid = :groupingid
WHERE a.lessonid = :lessonid
ORDER BY u.lastname";
} else {

0 comments on commit ecf1f30

Please sign in to comment.