Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit ccdfa44df0fc0869aaffdcff01a3dea712843fd4 1 parent 9f887be
@rajeshtaneja rajeshtaneja authored
Showing with 6 additions and 2 deletions.
  1. +5 −1 enrol/self/db/upgrade.php
  2. +1 −1  enrol/self/version.php
View
6 enrol/self/db/upgrade.php
@@ -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;
}
View
2  enrol/self/version.php
@@ -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;
Please sign in to comment.
Something went wrong with that request. Please try again.