Merge branch 'MDL-34006_m29v6' of https://github.com/sbourget/moodle
authorDan Poltawski <dan@moodle.com>
Tue, 3 Mar 2015 11:40:17 +0000 (11:40 +0000)
committerDan Poltawski <dan@moodle.com>
Tue, 3 Mar 2015 11:40:17 +0000 (11:40 +0000)
Conflicts:
mod/lesson/version.php
mod/lesson/db/upgrade.php
mod/lesson/db/install.xml

1  2 
mod/lesson/db/install.xml
mod/lesson/db/upgrade.php
mod/lesson/version.php

@@@ -1,5 -1,5 +1,5 @@@
  <?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"
  >
@@@ -137,5 -137,21 +137,21 @@@ function xmldb_lesson_upgrade($oldversi
          // 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;
  }
@@@ -24,7 -24,7 +24,7 @@@
  
  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;