MDL-42904 self_enrol: Set customint1 if it's null

This commit is contained in:
Rajesh Taneja
2013-11-25 10:10:48 +08:00
parent 9f887be6a6
commit ccdfa44df0
2 changed files with 6 additions and 2 deletions
+5 -1
View File
@@ -41,7 +41,11 @@ function xmldb_enrol_self_upgrade($oldversion) {
// Moodle v2.4.0 release upgrade line
// Put any upgrade step following this
if ($oldversion < 2013112100) {
// Set customint1 (group enrolment key) to 0 if it was not set (null).
$DB->execute("UPDATE {enrol} SET customint1 = 0 WHERE enrol = 'self' AND customint1 IS NULL");
upgrade_plugin_savepoint(true, 2013112100, 'enrol', 'self');
}
return true;
}
+1 -1
View File
@@ -24,7 +24,7 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
$plugin->version = 2013112100; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'enrol_self'; // Full name of the plugin (used for diagnostics)
$plugin->cron = 600;