Skip to content

Commit

Permalink
MDL-42904 self_enrol: Set customint1 if it's null
Browse files Browse the repository at this point in the history
  • Loading branch information
Rajesh Taneja committed Nov 25, 2013
1 parent 9f887be commit ccdfa44
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion enrol/self/db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion enrol/self/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

0 comments on commit ccdfa44

Please sign in to comment.