Commit 17c97587 authored by David Monllaó's avatar David Monllaó
Browse files

Merge branch 'm28_MDL-51363_Fix_Default_Settings_1x_Restore' of...

Merge branch 'm28_MDL-51363_Fix_Default_Settings_1x_Restore' of git://github.com/scara/moodle into MOODLE_28_STABLE
parents 07d52ad8 3f121ac5
......@@ -57,11 +57,11 @@ class moodle1_mod_scorm_handler extends moodle1_mod_handler {
'scormtype' => 'local',
'sha1hash' => null,
'revision' => '0',
'forcecompleted' => 1,
'forcecompleted' => 0,
'forcenewattempt' => 0,
'lastattemptlock' => 0,
'displayattemptstatus' => 1,
'displaycoursestructure' => 1,
'displaycoursestructure' => 0,
'timeopen' => '0',
'timeclose' => '0',
'introformat' => '0',
......
......@@ -18,11 +18,11 @@
<FIELD NAME="grademethod" TYPE="int" LENGTH="2" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="whatgrade" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="maxattempt" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="1" SEQUENCE="false"/>
<FIELD NAME="forcecompleted" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="1" SEQUENCE="false"/>
<FIELD NAME="forcecompleted" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="forcenewattempt" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="lastattemptlock" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="displayattemptstatus" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="1" SEQUENCE="false"/>
<FIELD NAME="displaycoursestructure" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="1" SEQUENCE="false"/>
<FIELD NAME="displaycoursestructure" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="updatefreq" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="Define when the package must be automatically update"/>
<FIELD NAME="sha1hash" TYPE="char" LENGTH="40" NOTNULL="false" SEQUENCE="false" COMMENT="package content or ext path hash"/>
<FIELD NAME="md5hash" TYPE="char" LENGTH="32" NOTNULL="true" SEQUENCE="false" COMMENT="MD5 Hash of package file"/>
......
......@@ -315,6 +315,23 @@ function xmldb_scorm_upgrade($oldversion) {
upgrade_mod_savepoint(true, 2014111001, 'scorm');
}
if ($oldversion < 2014111003) {
$table = new xmldb_table('scorm');
// Changing the default of field forcecompleted on table scorm to 0.
$field = new xmldb_field('forcecompleted', XMLDB_TYPE_INTEGER, '1', null, XMLDB_NOTNULL, null, '0', 'maxattempt');
// Launch change of default for field forcecompleted.
$dbman->change_field_default($table, $field);
// Changing the default of field displaycoursestructure on table scorm to 0.
$field = new xmldb_field('displaycoursestructure', XMLDB_TYPE_INTEGER, '1', null, XMLDB_NOTNULL, null, '0', 'displayattemptstatus');
// Launch change of default for field displaycoursestructure.
$dbman->change_field_default($table, $field);
// Scorm savepoint reached.
upgrade_mod_savepoint(true, 2014111003, 'scorm');
}
return true;
}
......
......@@ -24,7 +24,7 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2014111002; // The current module version (Date: YYYYMMDDXX).
$plugin->version = 2014111003; // The current module version (Date: YYYYMMDDXX).
$plugin->requires = 2014110400; // Requires this Moodle version.
$plugin->component = 'mod_scorm'; // Full name of the plugin (used for diagnostics).
$plugin->cron = 300;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment