Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'MDL-35175_24' of git://github.com/rlorenzo/moodle into …

…MOODLE_24_STABLE
  • Loading branch information...
commit a083389c63e395f6d5c51e4b064ecab03367886f 2 parents 56d22f1 + b20c4d5
@damyon damyon authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 mod/lesson/report.php
View
7 mod/lesson/report.php
@@ -47,13 +47,14 @@
$params = array_merge($params, $sortparams);
// TODO: Improve this. Fetching all students always is crazy!
if (!empty($cm->groupingid)) {
- $params["groupid"] = $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 = :groupid
- WHERE a.lessonid = :lessonid
+ INNER JOIN {groupings_groups} gg ON gm.groupid = gg.groupid
+ WHERE a.lessonid = :lessonid AND
+ gg.groupingid = :groupingid
ORDER BY $sort";
} else {
$sql = "SELECT DISTINCT $ufields
Please sign in to comment.
Something went wrong with that request. Please try again.