Skip to content
Browse files

MDL-35358 Lesson Module: fixed teacher grade essays display when less…

…on is only available for group members only
  • Loading branch information...
1 parent 9819795 commit 254fef3a9c8f31ee8e5fec252da0c36f45d5efe3 @deraadt deraadt committed with rwijaya
Showing with 2 additions and 2 deletions.
  1. +2 −2 mod/lesson/essay.php
View
4 mod/lesson/essay.php
@@ -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 254fef3

Please sign in to comment.
Something went wrong with that request. Please try again.