diff --git a/mod/scorm/db/install.xml b/mod/scorm/db/install.xml
index ccd2f3e1905..9cb0b594ad8 100644
--- a/mod/scorm/db/install.xml
+++ b/mod/scorm/db/install.xml
@@ -105,7 +105,6 @@
-
diff --git a/mod/scorm/db/upgrade.php b/mod/scorm/db/upgrade.php
index bc4788313f7..5d2380ff5c3 100644
--- a/mod/scorm/db/upgrade.php
+++ b/mod/scorm/db/upgrade.php
@@ -66,5 +66,18 @@ function xmldb_scorm_upgrade($oldversion) {
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
+ if ($oldversion < 2018123100) {
+
+ // Remove un-used/large index on element field.
+ $table = new xmldb_table('scorm_scoes_track');
+ $index = new xmldb_index('element', XMLDB_INDEX_UNIQUE, ['element']);
+ if ($dbman->index_exists($table, $index)) {
+ $dbman->drop_index($table, $index);
+ }
+
+ // Scorm savepoint reached.
+ upgrade_mod_savepoint(true, 2018123100, 'scorm');
+ }
+
return true;
}
diff --git a/mod/scorm/version.php b/mod/scorm/version.php
index 1ab3ec1c280..f87996bb8ac 100644
--- a/mod/scorm/version.php
+++ b/mod/scorm/version.php
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
-$plugin->version = 2018120300; // The current module version (Date: YYYYMMDDXX).
+$plugin->version = 2018123100; // The current module version (Date: YYYYMMDDXX).
$plugin->requires = 2018112800; // Requires this Moodle version.
$plugin->component = 'mod_scorm'; // Full name of the plugin (used for diagnostics).
\ No newline at end of file