fix for MDL-7112 select distinct on text fields
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
// Get only the attempts that are in response to essay questions
|
||||
if ($essayattempts = get_records_select('lesson_attempts', 'pageid IN('.implode(',', array_keys($pages)).')')) {
|
||||
// Get all the users who have taken this lesson, order by their last name
|
||||
if (!$users = get_records_sql("SELECT DISTINCT u.*
|
||||
if (!$users = get_records_sql("SELECT u.*
|
||||
FROM {$CFG->prefix}user u,
|
||||
{$CFG->prefix}lesson_attempts a
|
||||
WHERE a.lessonid = '$lesson->id' and
|
||||
@@ -130,7 +130,7 @@
|
||||
}
|
||||
} else {
|
||||
$queryadd = '';
|
||||
if (!$users = get_records_sql("SELECT DISTINCT u.*
|
||||
if (!$users = get_records_sql("SELECT u.*
|
||||
FROM {$CFG->prefix}user u,
|
||||
{$CFG->prefix}lesson_attempts a
|
||||
WHERE a.lessonid = '$lesson->id' and
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
list($cm, $course, $lesson) = lesson_get_basics($id);
|
||||
|
||||
if (! $students = get_records_sql("SELECT DISTINCT u.*
|
||||
if (! $students = get_records_sql("SELECT u.*
|
||||
FROM {$CFG->prefix}user u,
|
||||
{$CFG->prefix}lesson_attempts a
|
||||
WHERE a.lessonid = '$lesson->id' and
|
||||
|
||||
Reference in New Issue
Block a user