MDL-26644 course: Remove useless setting completionstartonenrol

This commit removes any trace of the setting 'Completion tracking
begins on enrolment' as it does not appear to do anything.
This commit is contained in:
Frederic Massart 2013-03-22 09:39:37 +08:00
parent 373a8e052c
commit 8819a83601
8 changed files with 18 additions and 40 deletions

5
lib/db/install.xml Normal file → Executable file
View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<XMLDB PATH="lib/db" VERSION="20121116" COMMENT="XMLDB file for core Moodle tables"
<XMLDB PATH="lib/db" VERSION="20130321" COMMENT="XMLDB file for core Moodle tables"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../lib/xmldb/xmldb.xsd"
>
@ -98,7 +98,6 @@
<FIELD NAME="timemodified" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="requested" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="enablecompletion" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="1 = allow use of 'completion' progress-tracking on this course. 0 = disable completion tracking on this course."/>
<FIELD NAME="completionstartonenrol" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="1 = allow use of 'activty completion' progress-tracking on this course. 0 = disable activity completion tracking on this course."/>
<FIELD NAME="completionnotify" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="Notify users when they complete this course"/>
</FIELDS>
<KEYS>
@ -2933,4 +2932,4 @@
</INDEXES>
</TABLE>
</TABLES>
</XMLDB>
</XMLDB>

View file

@ -1756,5 +1756,20 @@ function xmldb_main_upgrade($oldversion) {
// No savepoint needed for this change.
}
if ($oldversion < 2013032200.00) {
// Define field completionstartonenrol to be dropped from course.
$table = new xmldb_table('course');
$field = new xmldb_field('completionstartonenrol');
// Conditionally launch drop field completionstartonenrol.
if ($dbman->field_exists($table, $field)) {
$dbman->drop_field($table, $field);
}
// Main savepoint reached.
upgrade_main_savepoint(true, 2013032200.00);
}
return true;
}