mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 18:06:51 +02:00
Merge branch 'MDL-35358_m23' of git://github.com/rwijaya/moodle into MOODLE_23_STABLE
This commit is contained in:
commit
89a55cd9e0
1 changed files with 2 additions and 2 deletions
|
@ -269,12 +269,12 @@ switch ($mode) {
|
||||||
// Get all the users who have taken this lesson, order by their last name
|
// Get all the users who have taken this lesson, order by their last name
|
||||||
$ufields = user_picture::fields('u');
|
$ufields = user_picture::fields('u');
|
||||||
if (!empty($cm->groupingid)) {
|
if (!empty($cm->groupingid)) {
|
||||||
$params["groupinid"] = $cm->groupingid;
|
$params["groupingid"] = $cm->groupingid;
|
||||||
$sql = "SELECT DISTINCT $ufields
|
$sql = "SELECT DISTINCT $ufields
|
||||||
FROM {lesson_attempts} a
|
FROM {lesson_attempts} a
|
||||||
INNER JOIN {user} u ON u.id = a.userid
|
INNER JOIN {user} u ON u.id = a.userid
|
||||||
INNER JOIN {groups_members} gm ON gm.userid = u.id
|
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
|
WHERE a.lessonid = :lessonid
|
||||||
ORDER BY u.lastname";
|
ORDER BY u.lastname";
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue