<?xml version="1.0" encoding="UTF-8" ?>
- <XMLDB PATH="mod/lesson/db" VERSION="20120122" COMMENT="XMLDB file for Moodle mod/lesson"
-<XMLDB PATH="mod/lesson/db" VERSION="20150201" COMMENT="XMLDB file for Moodle mod/lesson"
++<XMLDB PATH="mod/lesson/db" VERSION="20150303" COMMENT="XMLDB file for Moodle mod/lesson"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
>
// Lesson savepoint reached.
upgrade_mod_savepoint(true, 2014122900, 'lesson');
}
- if ($oldversion < 2015022500) {
+
- upgrade_mod_savepoint(true, 2015022500, 'lesson');
++ if ($oldversion < 2015030300) {
+
+ // Define field nextpageid to be added to lesson_branch.
+ $table = new xmldb_table('lesson_branch');
+ $field = new xmldb_field('nextpageid', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, '0', 'timeseen');
+
+ // Conditionally launch add field nextpageid.
+ if (!$dbman->field_exists($table, $field)) {
+ $dbman->add_field($table, $field);
+ }
+
+ // Lesson savepoint reached.
++ upgrade_mod_savepoint(true, 2015030300, 'lesson');
+ }
+
return true;
}
defined('MOODLE_INTERNAL') || die();
- $plugin->version = 2015021900; // The current module version (Date: YYYYMMDDXX)
-$plugin->version = 2015022500; // The current module version (Date: YYYYMMDDXX)
++$plugin->version = 2015030300; // The current module version (Date: YYYYMMDDXX)
$plugin->requires = 2014110400; // Requires this Moodle version
$plugin->component = 'mod_lesson'; // Full name of the plugin (used for diagnostics)
$plugin->cron = 0;