]> git.mjollnir.org Git - moodle.git/commitdiff
merged fix for MDL-7112 select distinct on text field
authortoyomoyo <toyomoyo>
Thu, 2 Nov 2006 02:17:39 +0000 (02:17 +0000)
committertoyomoyo <toyomoyo>
Thu, 2 Nov 2006 02:17:39 +0000 (02:17 +0000)
mod/lesson/essay.php
mod/lesson/report.php

index 56b764f8fc852bce39c0e28ccdf5dbd9dfd63577..3a5235d24692963f8e44be09dbd74e9549166eaf 100644 (file)
@@ -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
                 }
             } 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
index a4fa18f7d65de8ea77c592c7637cd7be72a45b4e..6d4d32a987286999f1b91b29c436e92276f9637f 100644 (file)
@@ -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