diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index 598edadde7a..ddefdd1f69a 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -1992,7 +1992,7 @@ function xmldb_main_upgrade($oldversion) { if ($oldversion < 2013041200.00) { // MDL-29877 Some bad restores created grade items with no category information. - $sql = "UPDATE mdl_grade_items + $sql = "UPDATE {grade_items} SET categoryid = courseid WHERE itemtype <> 'course' and itemtype <> 'category' AND categoryid IS NULL";