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:
@@ -425,6 +425,15 @@ function xmldb_assign_upgrade($oldversion) {
|
||||
// Moodle v2.5.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
if ($oldversion < 2013050101) {
|
||||
|
||||
// Cleanup bad database records where assignid is missing.
|
||||
|
||||
$DB->delete_records('assign_user_mapping', array('assignment'=>0));
|
||||
// Assign savepoint reached.
|
||||
upgrade_mod_savepoint(true, 2013050101, 'assign');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -25,8 +25,7 @@
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$module->component = 'mod_assign'; // Full name of the plugin (used for diagnostics).
|
||||
$module->version = 2013050100; // The current module version (Date: YYYYMMDDXX).
|
||||
$module->version = 2013050101; // The current module version (Date: YYYYMMDDXX).
|
||||
$module->requires = 2013050100; // Requires this Moodle version.
|
||||
$module->cron = 60;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user