Merge branch 'MDL-59527-master-fix1' of http://github.com/damyon/moodle
authorAndrew Nicols <andrew@nicols.co.uk>
Thu, 20 Jul 2017 02:42:31 +0000 (10:42 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Thu, 20 Jul 2017 02:42:31 +0000 (10:42 +0800)
mod/lesson/db/upgrade.php

index c030dc8..0ed06b8 100644 (file)
@@ -144,7 +144,7 @@ function xmldb_lesson_upgrade($oldversion) {
     if ($oldversion < 2017051501) {
 
         // Delete orphaned lesson answer and response files.
-        $sql = "SELECT DISTINCT f.*
+        $sql = "SELECT DISTINCT f.contextid, f.component, f.filearea, f.itemid
                   FROM {files} f
              LEFT JOIN {lesson_answers} la ON f.itemid = la.id
                  WHERE component = :component