diff --git a/mod/lesson/db/install.xml b/mod/lesson/db/install.xml
index 470a172d5ae..29f858fe26e 100644
--- a/mod/lesson/db/install.xml
+++ b/mod/lesson/db/install.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/mod/lesson/db/upgrade.php b/mod/lesson/db/upgrade.php
index 3d78bf107dd..1f91609cece 100644
--- a/mod/lesson/db/upgrade.php
+++ b/mod/lesson/db/upgrade.php
@@ -124,5 +124,18 @@ function xmldb_lesson_upgrade($oldversion) {
// Lesson savepoint reached.
upgrade_mod_savepoint(true, 2014112300, 'lesson');
}
+
+ if ($oldversion < 2014122900) {
+
+ // Changing precision of field grade on table lesson to (10).
+ $table = new xmldb_table('lesson');
+ $field = new xmldb_field('grade', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, '0', 'conditions');
+
+ // Launch change of precision for field grade.
+ $dbman->change_field_precision($table, $field);
+
+ // Lesson savepoint reached.
+ upgrade_mod_savepoint(true, 2014122900, 'lesson');
+ }
return true;
}
diff --git a/mod/lesson/version.php b/mod/lesson/version.php
index ac10eb593a2..1920b7ad33d 100644
--- a/mod/lesson/version.php
+++ b/mod/lesson/version.php
@@ -24,7 +24,7 @@
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2014112300; // The current module version (Date: YYYYMMDDXX)
+$plugin->version = 2014122900; // 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;