MDL-45661 Assign: Clean bad data from DB after MDL-42526

Conflicts:
	mod/assign/db/upgrade.php
	mod/assign/version.php
This commit is contained in:
Damyon Wiese
2014-05-26 12:37:19 +08:00
parent af8bd4de8e
commit d60e4f6684
2 changed files with 10 additions and 3 deletions
+9
View File
@@ -462,5 +462,14 @@ function xmldb_assign_upgrade($oldversion) {
// Moodle v2.6.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2013110501) {
// Cleanup bad database records where assignid is missing.
$DB->delete_records('assign_user_mapping', array('assignment'=>0));
// Assign savepoint reached.
upgrade_mod_savepoint(true, 2013110501, 'assign');
}
return true;
}
+1 -3
View File
@@ -25,8 +25,6 @@
defined('MOODLE_INTERNAL') || die();
$module->component = 'mod_assign'; // Full name of the plugin (used for diagnostics).
$module->version = 2013110500; // The current module version (Date: YYYYMMDDXX).
$module->version = 2013110501; // The current module version (Date: YYYYMMDDXX).
$module->requires = 2013110500; // Requires this Moodle version.
$module->cron = 60;