Skip to content

Commit

Permalink
Merge branch 'master_MDL-59857' of https://github.com/danmarsden/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Apr 18, 2018
2 parents 6d4bc5b + 679eab0 commit 45fc655
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
8 changes: 4 additions & 4 deletions mod/scorm/db/install.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<XMLDB PATH="mod/scorm/db" VERSION="20140725" COMMENT="XMLDB file for Moodle mod/scorm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
<XMLDB PATH="mod/scorm/db" VERSION="20180315" COMMENT="XMLDB file for Moodle mod/scorm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
>
<TABLES>
<TABLE NAME="scorm" COMMENT="each table is one SCORM module and its configuration">
Expand Down Expand Up @@ -44,7 +44,7 @@
<FIELD NAME="timeclose" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="timemodified" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="completionstatusrequired" TYPE="int" LENGTH="1" NOTNULL="false" SEQUENCE="false"/>
<FIELD NAME="completionscorerequired" TYPE="int" LENGTH="2" NOTNULL="false" SEQUENCE="false"/>
<FIELD NAME="completionscorerequired" TYPE="int" LENGTH="10" NOTNULL="false" SEQUENCE="false"/>
<FIELD NAME="completionstatusallscos" TYPE="int" LENGTH="1" NOTNULL="false" SEQUENCE="false"/>
<FIELD NAME="displayactivityname" TYPE="int" LENGTH="4" NOTNULL="true" DEFAULT="1" SEQUENCE="false"/>
<FIELD NAME="autocommit" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
Expand Down
13 changes: 13 additions & 0 deletions mod/scorm/db/upgrade.php
Expand Up @@ -62,5 +62,18 @@ function xmldb_scorm_upgrade($oldversion) {
upgrade_mod_savepoint(true, 2018032300, 'scorm');
}

if ($oldversion < 2018041100) {

// Changing precision of field completionscorerequired on table scorm to (10).
$table = new xmldb_table('scorm');
$field = new xmldb_field('completionscorerequired', XMLDB_TYPE_INTEGER, '10', null, null, null, null, 'completionstatusrequired');

// Launch change of precision for field completionscorerequired.
$dbman->change_field_precision($table, $field);

// Scorm savepoint reached.
upgrade_mod_savepoint(true, 2018041100, 'scorm');
}

return true;
}
2 changes: 1 addition & 1 deletion mod/scorm/version.php
Expand Up @@ -24,6 +24,6 @@

defined('MOODLE_INTERNAL') || die();

$plugin->version = 2018032300; // The current module version (Date: YYYYMMDDXX).
$plugin->version = 2018041100; // The current module version (Date: YYYYMMDDXX).
$plugin->requires = 2017110800; // Requires this Moodle version.
$plugin->component = 'mod_scorm'; // Full name of the plugin (used for diagnostics).

0 comments on commit 45fc655

Please sign in to comment.