Merge branch 'wip-MDL-57649-31-fix2' of git://github.com/abgreeve/moodle into MOODLE_31_STABLE

This commit is contained in:
Andrew Nicols
2017-07-20 10:24:43 +08:00
+1 -1
View File
@@ -390,7 +390,7 @@ function xmldb_lesson_upgrade($oldversion) {
if ($oldversion < 2016052301) {
// 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