MDL-63276 upgrade: clean < 3.2.0 upgrade steps

3.7 (min PHP 7.1) requires 3.2 (first version supporting PHP 7.1)

This just deletes all the upgrade steps previous to 3.2.0. Some
small adjustments, like adding missing MOODLE_INTERNAL or tweaking
globals can also be applied when needed.

Also includes an upgrade step to prevent upgrading from any
version < 2016120500 (v3.2.0) as anti-cheating measure.

Next commit will get rid of/deprecate all the upgradelib functions
not used anymore in codebase. (note there isn't any this time).
This commit is contained in:
Eloy Lafuente (stronk7)
2019-01-03 01:17:17 +01:00
parent f580d20adf
commit a12207be25
106 changed files with 13 additions and 1166 deletions
-3
View File
@@ -29,9 +29,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_tool_customlang_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -33,9 +33,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_tool_log_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
@@ -27,9 +27,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_logstore_database_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
@@ -27,9 +27,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_logstore_standard_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-20
View File
@@ -33,26 +33,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_tool_monitor_upgrade($oldversion) {
global $CFG, $DB;
$dbman = $DB->get_manager();
if ($oldversion < 2016052305) {
// Define field inactivedate to be added to tool_monitor_subscriptions.
$table = new xmldb_table('tool_monitor_subscriptions');
$field = new xmldb_field('inactivedate', XMLDB_TYPE_INTEGER, '10', null, true, null, 0, 'lastnotificationsent');
// Conditionally launch add field inactivedate.
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}
// Monitor savepoint reached.
upgrade_plugin_savepoint(true, 2016052305, 'tool', 'monitor');
}
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2017021300) {
// Delete "orphaned" subscriptions.
-3
View File
@@ -35,9 +35,6 @@ use tool_usertours\manager;
function xmldb_tool_usertours_upgrade($oldversion) {
global $CFG, $DB;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -32,9 +32,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_auth_cas_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2017020700) {
// Convert info in config plugins from auth/cas to auth_cas.
upgrade_fix_config_auth_plugin_names('cas');
-3
View File
@@ -32,9 +32,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_auth_db_upgrade($oldversion) {
global $CFG, $DB;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2017032800) {
// Convert info in config plugins from auth/db to auth_db
upgrade_fix_config_auth_plugin_names('db');
-3
View File
@@ -32,9 +32,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_auth_email_upgrade($oldversion) {
global $CFG, $DB;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2017020700) {
// Convert info in config plugins from auth/email to auth_email.
upgrade_fix_config_auth_plugin_names('email');
-3
View File
@@ -32,9 +32,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_auth_ldap_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2017020700) {
// Convert info in config plugins from auth/ldap to auth_ldap.
upgrade_fix_config_auth_plugin_names('ldap');
-3
View File
@@ -32,9 +32,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_auth_manual_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2017020700) {
// Convert info in config plugins from auth/manual to auth_manual.
upgrade_fix_config_auth_plugin_names('manual');
-2
View File
@@ -32,8 +32,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_auth_mnet_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2017020700) {
// Convert info in config plugins from auth/mnet to auth_mnet.
upgrade_fix_config_auth_plugin_names('mnet');
-3
View File
@@ -32,9 +32,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_auth_none_upgrade($oldversion) {
global $CFG, $DB;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2017020700) {
// Convert info in config plugins from auth/none to auth_none.
upgrade_fix_config_auth_plugin_names('none');
-3
View File
@@ -35,9 +35,6 @@ function xmldb_auth_oauth2_upgrade($oldversion) {
$dbman = $DB->get_manager();
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -32,9 +32,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_auth_shibboleth_upgrade($oldversion) {
global $CFG, $DB;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2017020700) {
// Convert info in config plugins from auth/shibboleth to auth_shibboleth.
upgrade_fix_config_auth_plugin_names('shibboleth');
-3
View File
@@ -45,9 +45,6 @@
function xmldb_block_badges_upgrade($oldversion, $block) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -45,9 +45,6 @@
function xmldb_block_calendar_month_upgrade($oldversion, $block) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -45,9 +45,6 @@
function xmldb_block_calendar_upcoming_upgrade($oldversion, $block) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -46,9 +46,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_block_community_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -48,9 +48,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_block_completionstatus_upgrade($oldversion, $block) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -48,9 +48,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_block_course_summary_upgrade($oldversion, $block) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -33,9 +33,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_block_html_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -55,9 +55,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_block_navigation_upgrade($oldversion, $block) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -45,9 +45,6 @@
function xmldb_block_quiz_results_upgrade($oldversion, $block) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -47,9 +47,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_block_recent_activity_upgrade($oldversion, $block) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -33,9 +33,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_block_rss_client_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -49,9 +49,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_block_section_links_upgrade($oldversion, $block) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -48,9 +48,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_block_selfcompletion_upgrade($oldversion, $block) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -55,9 +55,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_block_settings_upgrade($oldversion, $block) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -27,9 +27,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_enrol_database_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -27,9 +27,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_enrol_flatfile_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -27,9 +27,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_enrol_guest_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -33,9 +33,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_enrol_imsenterprise_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-204
View File
@@ -41,210 +41,6 @@ function xmldb_enrol_lti_upgrade($oldversion) {
$dbman = $DB->get_manager();
if ($oldversion < 2016052303) {
// Define table enrol_lti_lti2_consumer to be created.
$table = new xmldb_table('enrol_lti_lti2_consumer');
// Adding fields to table enrol_lti_lti2_consumer.
$table->add_field('id', XMLDB_TYPE_INTEGER, '11', null, XMLDB_NOTNULL, XMLDB_SEQUENCE, null);
$table->add_field('name', XMLDB_TYPE_CHAR, '50', null, XMLDB_NOTNULL, null, null);
$table->add_field('consumerkey256', XMLDB_TYPE_CHAR, '255', null, XMLDB_NOTNULL, null, null);
$table->add_field('consumerkey', XMLDB_TYPE_TEXT, null, null, null, null, null);
$table->add_field('secret', XMLDB_TYPE_CHAR, '1024', null, XMLDB_NOTNULL, null, null);
$table->add_field('ltiversion', XMLDB_TYPE_CHAR, '10', null, null, null, null);
$table->add_field('consumername', XMLDB_TYPE_CHAR, '255', null, null, null, null);
$table->add_field('consumerversion', XMLDB_TYPE_CHAR, '255', null, null, null, null);
$table->add_field('consumerguid', XMLDB_TYPE_CHAR, '1024', null, null, null, null);
$table->add_field('profile', XMLDB_TYPE_TEXT, null, null, null, null, null);
$table->add_field('toolproxy', XMLDB_TYPE_TEXT, null, null, null, null, null);
$table->add_field('settings', XMLDB_TYPE_TEXT, null, null, null, null, null);
$table->add_field('protected', XMLDB_TYPE_INTEGER, '1', null, XMLDB_NOTNULL, null, null);
$table->add_field('enabled', XMLDB_TYPE_INTEGER, '1', null, XMLDB_NOTNULL, null, null);
$table->add_field('enablefrom', XMLDB_TYPE_INTEGER, '10', null, null, null, null);
$table->add_field('enableuntil', XMLDB_TYPE_INTEGER, '10', null, null, null, null);
$table->add_field('lastaccess', XMLDB_TYPE_INTEGER, '10', null, null, null, null);
$table->add_field('created', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, null);
$table->add_field('updated', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, null);
// Adding keys to table enrol_lti_lti2_consumer.
$table->add_key('primary', XMLDB_KEY_PRIMARY, array('id'));
// Adding indexes to table enrol_lti_lti2_consumer.
$table->add_index('consumerkey256_uniq', XMLDB_INDEX_UNIQUE, array('consumerkey256'));
// Conditionally launch create table for enrol_lti_lti2_consumer.
if (!$dbman->table_exists($table)) {
$dbman->create_table($table);
}
// Define table enrol_lti_lti2_tool_proxy to be created.
$table = new xmldb_table('enrol_lti_lti2_tool_proxy');
// Adding fields to table enrol_lti_lti2_tool_proxy.
$table->add_field('id', XMLDB_TYPE_INTEGER, '11', null, XMLDB_NOTNULL, XMLDB_SEQUENCE, null);
$table->add_field('toolproxykey', XMLDB_TYPE_CHAR, '32', null, XMLDB_NOTNULL, null, null);
$table->add_field('consumerid', XMLDB_TYPE_INTEGER, '11', null, XMLDB_NOTNULL, null, null);
$table->add_field('toolproxy', XMLDB_TYPE_TEXT, null, null, XMLDB_NOTNULL, null, null);
$table->add_field('created', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, null);
$table->add_field('updated', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, null);
// Adding keys to table enrol_lti_lti2_tool_proxy.
$table->add_key('primary', XMLDB_KEY_PRIMARY, array('id'));
$table->add_key('toolproxykey_uniq', XMLDB_KEY_UNIQUE, array('toolproxykey'));
$table->add_key('consumerid', XMLDB_KEY_FOREIGN, array('consumerid'), 'enrol_lti_lti2_consumer', array('id'));
// Conditionally launch create table for enrol_lti_lti2_tool_proxy.
if (!$dbman->table_exists($table)) {
$dbman->create_table($table);
}
// Define table enrol_lti_lti2_context to be created.
$table = new xmldb_table('enrol_lti_lti2_context');
// Adding fields to table enrol_lti_lti2_context.
$table->add_field('id', XMLDB_TYPE_INTEGER, '11', null, XMLDB_NOTNULL, XMLDB_SEQUENCE, null);
$table->add_field('consumerid', XMLDB_TYPE_INTEGER, '11', null, XMLDB_NOTNULL, null, null);
$table->add_field('lticontextkey', XMLDB_TYPE_CHAR, '255', null, XMLDB_NOTNULL, null, null);
$table->add_field('settings', XMLDB_TYPE_TEXT, null, null, null, null, null);
$table->add_field('created', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, null);
$table->add_field('updated', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, null);
// Adding keys to table enrol_lti_lti2_context.
$table->add_key('primary', XMLDB_KEY_PRIMARY, array('id'));
$table->add_key('consumerid', XMLDB_KEY_FOREIGN, array('consumerid'), 'enrol_lti_lti2_consumer', array('id'));
// Conditionally launch create table for enrol_lti_lti2_context.
if (!$dbman->table_exists($table)) {
$dbman->create_table($table);
}
// Define table enrol_lti_lti2_nonce to be created.
$table = new xmldb_table('enrol_lti_lti2_nonce');
// Adding fields to table enrol_lti_lti2_nonce.
$table->add_field('id', XMLDB_TYPE_INTEGER, '11', null, XMLDB_NOTNULL, XMLDB_SEQUENCE, null);
$table->add_field('consumerid', XMLDB_TYPE_INTEGER, '11', null, XMLDB_NOTNULL, null, null);
$table->add_field('value', XMLDB_TYPE_CHAR, '32', null, XMLDB_NOTNULL, null, null);
$table->add_field('expires', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, null);
// Adding keys to table enrol_lti_lti2_nonce.
$table->add_key('primary', XMLDB_KEY_PRIMARY, array('id'));
$table->add_key('consumerid', XMLDB_KEY_FOREIGN, array('consumerid'), 'enrol_lti_lti2_consumer', array('id'));
// Conditionally launch create table for enrol_lti_lti2_nonce.
if (!$dbman->table_exists($table)) {
$dbman->create_table($table);
}
// Define table enrol_lti_lti2_resource_link to be created.
$table = new xmldb_table('enrol_lti_lti2_resource_link');
// Adding fields to table enrol_lti_lti2_resource_link.
$table->add_field('id', XMLDB_TYPE_INTEGER, '11', null, XMLDB_NOTNULL, XMLDB_SEQUENCE, null);
$table->add_field('contextid', XMLDB_TYPE_INTEGER, '11', null, null, null, null);
$table->add_field('consumerid', XMLDB_TYPE_INTEGER, '11', null, null, null, null);
$table->add_field('ltiresourcelinkkey', XMLDB_TYPE_CHAR, '255', null, XMLDB_NOTNULL, null, null);
$table->add_field('settings', XMLDB_TYPE_TEXT, null, null, null, null, null);
$table->add_field('primaryresourcelinkid', XMLDB_TYPE_INTEGER, '11', null, null, null, null);
$table->add_field('shareapproved', XMLDB_TYPE_INTEGER, '1', null, null, null, null);
$table->add_field('created', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, null);
$table->add_field('updated', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, null);
// Adding keys to table enrol_lti_lti2_resource_link.
$table->add_key('primary', XMLDB_KEY_PRIMARY, array('id'));
$table->add_key('contextid', XMLDB_KEY_FOREIGN, array('contextid'), 'enrol_lti_lti2_context', array('id'));
$table->add_key('primaryresourcelinkid', XMLDB_KEY_FOREIGN, array('primaryresourcelinkid'),
'enrol_lti_lti2_resource_link', array('id'));
$table->add_key('consumerid', XMLDB_KEY_FOREIGN, array('consumerid'), 'enrol_lti_lti2_consumer', array('id'));
// Conditionally launch create table for enrol_lti_lti2_resource_link.
if (!$dbman->table_exists($table)) {
$dbman->create_table($table);
}
// Define table enrol_lti_lti2_share_key to be created.
$table = new xmldb_table('enrol_lti_lti2_share_key');
// Adding fields to table enrol_lti_lti2_share_key.
$table->add_field('id', XMLDB_TYPE_INTEGER, '11', null, XMLDB_NOTNULL, XMLDB_SEQUENCE, null);
$table->add_field('sharekey', XMLDB_TYPE_CHAR, '32', null, XMLDB_NOTNULL, null, null);
$table->add_field('resourcelinkid', XMLDB_TYPE_INTEGER, '11', null, XMLDB_NOTNULL, null, null);
$table->add_field('autoapprove', XMLDB_TYPE_INTEGER, '1', null, XMLDB_NOTNULL, null, null);
$table->add_field('expires', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, null);
// Adding keys to table enrol_lti_lti2_share_key.
$table->add_key('primary', XMLDB_KEY_PRIMARY, array('id'));
$table->add_key('sharekey', XMLDB_KEY_UNIQUE, array('sharekey'));
$table->add_key('resourcelinkid', XMLDB_KEY_FOREIGN_UNIQUE, array('resourcelinkid'),
'enrol_lti_lti2_resource_link', array('id'));
// Conditionally launch create table for enrol_lti_lti2_share_key.
if (!$dbman->table_exists($table)) {
$dbman->create_table($table);
}
// Define table enrol_lti_lti2_user_result to be created.
$table = new xmldb_table('enrol_lti_lti2_user_result');
// Adding fields to table enrol_lti_lti2_user_result.
$table->add_field('id', XMLDB_TYPE_INTEGER, '11', null, XMLDB_NOTNULL, XMLDB_SEQUENCE, null);
$table->add_field('resourcelinkid', XMLDB_TYPE_INTEGER, '11', null, XMLDB_NOTNULL, null, null);
$table->add_field('ltiuserkey', XMLDB_TYPE_CHAR, '255', null, XMLDB_NOTNULL, null, null);
$table->add_field('ltiresultsourcedid', XMLDB_TYPE_CHAR, '1024', null, XMLDB_NOTNULL, null, null);
$table->add_field('created', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, null);
$table->add_field('updated', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, null);
// Adding keys to table enrol_lti_lti2_user_result.
$table->add_key('primary', XMLDB_KEY_PRIMARY, array('id'));
$table->add_key('resourcelinkid', XMLDB_KEY_FOREIGN, array('resourcelinkid'),
'enrol_lti_lti2_resource_link', array('id'));
// Conditionally launch create table for enrol_lti_lti2_user_result.
if (!$dbman->table_exists($table)) {
$dbman->create_table($table);
}
// Define table enrol_lti_tool_consumer_map to be created.
$table = new xmldb_table('enrol_lti_tool_consumer_map');
// Adding fields to table enrol_lti_tool_consumer_map.
$table->add_field('id', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, XMLDB_SEQUENCE, null);
$table->add_field('toolid', XMLDB_TYPE_INTEGER, '11', null, XMLDB_NOTNULL, null, null);
$table->add_field('consumerid', XMLDB_TYPE_INTEGER, '11', null, XMLDB_NOTNULL, null, null);
// Adding keys to table enrol_lti_tool_consumer_map.
$table->add_key('primary', XMLDB_KEY_PRIMARY, array('id'));
$table->add_key('toolid', XMLDB_KEY_FOREIGN, array('toolid'), 'enrol_lti_tools', array('id'));
$table->add_key('consumerid', XMLDB_KEY_FOREIGN, array('consumerid'), 'enrol_lti_lti2_consumer', array('id'));
// Conditionally launch create table for enrol_lti_tool_consumer_map.
if (!$dbman->table_exists($table)) {
$dbman->create_table($table);
}
// Lti savepoint reached.
upgrade_plugin_savepoint(true, 2016052303, 'enrol', 'lti');
}
if ($oldversion < 2016052304) {
// Define field type to be added to enrol_lti_lti2_context.
$table = new xmldb_table('enrol_lti_lti2_context');
$field = new xmldb_field('type', XMLDB_TYPE_CHAR, '100', null, null, null, null, 'lticontextkey');
// Conditionally launch add field type.
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}
// Lti savepoint reached.
upgrade_plugin_savepoint(true, 2016052304, 'enrol', 'lti');
}
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2017011300) {
// Changing precision of field value on table enrol_lti_lti2_nonce to (64).
-3
View File
@@ -27,9 +27,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_enrol_manual_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -27,9 +27,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_enrol_mnet_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -47,9 +47,6 @@ function xmldb_enrol_paypal_upgrade($oldversion) {
$dbman = $DB->get_manager();
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
+1 -19
View File
@@ -25,25 +25,7 @@
defined('MOODLE_INTERNAL') || die();
function xmldb_enrol_self_upgrade($oldversion) {
global $CFG, $DB;
if ($oldversion < 2016052301) {
// Get roles with manager archetype.
$managerroles = get_archetype_roles('manager');
if (!empty($managerroles)) {
// Remove wrong CAP_PROHIBIT from self:holdkey.
foreach ($managerroles as $role) {
$DB->execute("DELETE
FROM {role_capabilities}
WHERE roleid = ? AND capability = ? AND permission = ?",
array($role->id, 'enrol/self:holdkey', CAP_PROHIBIT));
}
}
upgrade_plugin_savepoint(true, 2016052301, 'enrol', 'self');
}
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
global $CFG;
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-29
View File
@@ -33,35 +33,6 @@ function xmldb_filter_mathjaxloader_upgrade($oldversion) {
require_once($CFG->dirroot . '/filter/mathjaxloader/db/upgradelib.php');
if ($oldversion < 2016080200) {
// We are consolodating the two settings for http and https url into only the https
// setting. Since it is preferably to always load the secure resource.
$httpurl = get_config('filter_mathjaxloader', 'httpurl');
if ($httpurl !== 'http://cdn.mathjax.org/mathjax/2.6-latest/MathJax.js' &&
$httpurl !== 'http://cdn.mathjax.org/mathjax/2.6.1/MathJax.js') {
// If the http setting has been changed, we make the admin choose the https setting because
// it indicates some sort of custom setup. This will be supported by the release notes.
unset_config('httpsurl', 'filter_mathjaxloader');
}
// The seperate http setting has been removed. We always use the secure resource.
unset_config('httpurl', 'filter_mathjaxloader');
upgrade_plugin_savepoint(true, 2016080200, 'filter', 'mathjaxloader');
}
if ($oldversion < 2016102500) {
$httpsurl = get_config('filter_mathjaxloader', 'httpsurl');
if ($httpsurl === "https://cdn.mathjax.org/mathjax/2.6-latest/MathJax.js") {
set_config('httpsurl', 'https://cdn.mathjax.org/mathjax/2.7-latest/MathJax.js', 'filter_mathjaxloader');
}
upgrade_plugin_savepoint(true, 2016102500, 'filter', 'mathjaxloader');
}
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
//
if ($oldversion < 2017040300) {
$httpsurl = get_config('filter_mathjaxloader', 'httpsurl');
-3
View File
@@ -32,9 +32,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_filter_mediaplugin_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -32,9 +32,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_filter_tex_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -37,9 +37,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_gradingform_guide_upgrade($oldversion) {
global $DB;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -33,9 +33,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_gradingform_rubric_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -29,9 +29,6 @@
function xmldb_gradereport_user_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-19
View File
@@ -32,25 +32,6 @@ defined('MOODLE_INTERNAL') || die();
*/
function xmldb_antivirus_clamav_upgrade($oldversion) {
if ($oldversion < 2016101700) {
// Remove setting that has been deprecated long time ago at MDL-44260.
unset_config('quarantinedir', 'antivirus_clamav');
upgrade_plugin_savepoint(true, 2016101700, 'antivirus', 'clamav');
}
if ($oldversion < 2016102600) {
// Make command line a default running method for now. We depend on this
// config variable in antivirus scan running, it should be defined.
if (!get_config('antivirus_clamav', 'runningmethod')) {
set_config('runningmethod', 'commandline', 'antivirus_clamav');
}
upgrade_plugin_savepoint(true, 2016102600, 'antivirus', 'clamav');
}
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
+4 -377
View File
@@ -92,388 +92,15 @@ function xmldb_main_upgrade($oldversion) {
$dbman = $DB->get_manager(); // Loads ddl manager and xmldb classes.
// Always keep this upgrade step with version being the minimum
// allowed version to upgrade from (v3.1.0 right now).
if ($oldversion < 2016052300) {
// allowed version to upgrade from (v3.2.0 right now).
if ($oldversion < 2016120500) {
// Just in case somebody hacks upgrade scripts or env, we really can not continue.
echo("You need to upgrade to 3.1.x or higher first!\n");
echo("You need to upgrade to 3.2.x or higher first!\n");
exit(1);
// Note this savepoint is 100% unreachable, but needed to pass the upgrade checks.
upgrade_main_savepoint(true, 2016052300);
upgrade_main_savepoint(true, 2016120500);
}
if ($oldversion < 2016081700.00) {
// If someone is emotionally attached to it let's leave the config (basically the version) there.
if (!file_exists($CFG->dirroot . '/report/search/classes/output/form.php')) {
unset_all_config_for_plugin('report_search');
}
// Savepoint reached.
upgrade_main_savepoint(true, 2016081700.00);
}
if ($oldversion < 2016081700.02) {
// Default schedule values.
$hour = 0;
$minute = 0;
// Get the old settings.
if (isset($CFG->statsruntimestarthour)) {
$hour = $CFG->statsruntimestarthour;
}
if (isset($CFG->statsruntimestartminute)) {
$minute = $CFG->statsruntimestartminute;
}
// Retrieve the scheduled task record first.
$stattask = $DB->get_record('task_scheduled', array('component' => 'moodle', 'classname' => '\core\task\stats_cron_task'));
// Don't touch customised scheduling.
if ($stattask && !$stattask->customised) {
$nextruntime = mktime($hour, $minute, 0, date('m'), date('d'), date('Y'));
if ($nextruntime < $stattask->lastruntime) {
// Add 24 hours to the next run time.
$newtime = new DateTime();
$newtime->setTimestamp($nextruntime);
$newtime->add(new DateInterval('P1D'));
$nextruntime = $newtime->getTimestamp();
}
$stattask->nextruntime = $nextruntime;
$stattask->minute = $minute;
$stattask->hour = $hour;
$stattask->customised = 1;
$DB->update_record('task_scheduled', $stattask);
}
// These settings are no longer used.
unset_config('statsruntimestarthour');
unset_config('statsruntimestartminute');
unset_config('statslastexecution');
upgrade_main_savepoint(true, 2016081700.02);
}
if ($oldversion < 2016082200.00) {
// An upgrade step to remove any duplicate stamps, within the same context, in the question_categories table, and to
// add a unique index to (contextid, stamp) to avoid future stamp duplication. See MDL-54864.
// Extend the execution time limit of the script to 2 hours.
upgrade_set_timeout(7200);
// This SQL fetches the id of those records which have duplicate stamps within the same context.
// This doesn't return the original record within the context, from which the duplicate stamps were likely created.
$fromclause = "FROM (
SELECT min(id) AS minid, contextid, stamp
FROM {question_categories}
GROUP BY contextid, stamp
) minid
JOIN {question_categories} qc
ON qc.contextid = minid.contextid AND qc.stamp = minid.stamp AND qc.id > minid.minid";
// Get the total record count - used for the progress bar.
$countduplicatessql = "SELECT count(qc.id) $fromclause";
$total = $DB->count_records_sql($countduplicatessql);
// Get the records themselves.
$getduplicatessql = "SELECT qc.id $fromclause ORDER BY minid";
$rs = $DB->get_recordset_sql($getduplicatessql);
// For each duplicate, update the stamp to a new random value.
$i = 0;
$pbar = new progress_bar('updatequestioncategorystamp', 500, true);
foreach ($rs as $record) {
// Generate a new, unique stamp and update the record.
do {
$newstamp = make_unique_id_code();
} while (isset($usedstamps[$newstamp]));
$usedstamps[$newstamp] = 1;
$DB->set_field('question_categories', 'stamp', $newstamp, array('id' => $record->id));
// Update progress.
$i++;
$pbar->update($i, $total, "Updating duplicate question category stamp - $i/$total.");
}
$rs->close();
unset($usedstamps);
// The uniqueness of each (contextid, stamp) pair is now guaranteed, so add the unique index to stop future duplicates.
$table = new xmldb_table('question_categories');
$index = new xmldb_index('contextidstamp', XMLDB_INDEX_UNIQUE, array('contextid', 'stamp'));
if (!$dbman->index_exists($table, $index)) {
$dbman->add_index($table, $index);
}
// Savepoint reached.
upgrade_main_savepoint(true, 2016082200.00);
}
if ($oldversion < 2016091900.00) {
// Removing the themes from core.
$themes = array('base', 'canvas');
foreach ($themes as $key => $theme) {
if (check_dir_exists($CFG->dirroot . '/theme/' . $theme, false)) {
// Ignore the themes that have been re-downloaded.
unset($themes[$key]);
}
}
if (!empty($themes)) {
// Hacky emulation of plugin uninstallation.
foreach ($themes as $theme) {
unset_all_config_for_plugin('theme_' . $theme);
}
}
// Main savepoint reached.
upgrade_main_savepoint(true, 2016091900.00);
}
if ($oldversion < 2016091900.02) {
// Define index attemptstepid-name (unique) to be dropped from question_attempt_step_data.
$table = new xmldb_table('question_attempt_step_data');
$index = new xmldb_index('attemptstepid-name', XMLDB_INDEX_UNIQUE, array('attemptstepid', 'name'));
// Conditionally launch drop index attemptstepid-name.
if ($dbman->index_exists($table, $index)) {
$dbman->drop_index($table, $index);
}
// Main savepoint reached.
upgrade_main_savepoint(true, 2016091900.02);
}
if ($oldversion < 2016100300.00) {
unset_config('enablecssoptimiser');
upgrade_main_savepoint(true, 2016100300.00);
}
if ($oldversion < 2016100501.00) {
// Define field enddate to be added to course.
$table = new xmldb_table('course');
$field = new xmldb_field('enddate', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, '0', 'startdate');
// Conditionally launch add field enddate.
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}
// Main savepoint reached.
upgrade_main_savepoint(true, 2016100501.00);
}
if ($oldversion < 2016101100.00) {
// Define field component to be added to message.
$table = new xmldb_table('message');
$field = new xmldb_field('component', XMLDB_TYPE_CHAR, '100', null, null, null, null, 'timeusertodeleted');
// Conditionally launch add field component.
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}
// Define field eventtype to be added to message.
$field = new xmldb_field('eventtype', XMLDB_TYPE_CHAR, '100', null, null, null, null, 'component');
// Conditionally launch add field eventtype.
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}
// Main savepoint reached.
upgrade_main_savepoint(true, 2016101100.00);
}
if ($oldversion < 2016101101.00) {
// Define field component to be added to message_read.
$table = new xmldb_table('message_read');
$field = new xmldb_field('component', XMLDB_TYPE_CHAR, '100', null, null, null, null, 'timeusertodeleted');
// Conditionally launch add field component.
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}
// Define field eventtype to be added to message_read.
$field = new xmldb_field('eventtype', XMLDB_TYPE_CHAR, '100', null, null, null, null, 'component');
// Conditionally launch add field eventtype.
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}
// Main savepoint reached.
upgrade_main_savepoint(true, 2016101101.00);
}
if ($oldversion < 2016101401.00) {
// Clean up repository_alfresco config unless plugin has been manually installed.
if (!file_exists($CFG->dirroot . '/repository/alfresco/lib.php')) {
// Remove capabilities.
capabilities_cleanup('repository_alfresco');
// Clean config.
unset_all_config_for_plugin('repository_alfresco');
}
// Savepoint reached.
upgrade_main_savepoint(true, 2016101401.00);
}
if ($oldversion < 2016101401.02) {
$table = new xmldb_table('external_tokens');
$field = new xmldb_field('privatetoken', XMLDB_TYPE_CHAR, '64', null, null, null, null);
// Conditionally add privatetoken field to the external_tokens table.
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}
// Main savepoint reached.
upgrade_main_savepoint(true, 2016101401.02);
}
if ($oldversion < 2016110202.00) {
// Force uninstall of deleted authentication plugin.
if (!file_exists("$CFG->dirroot/auth/radius")) {
// Leave settings inplace if there are radius users.
if (!$DB->record_exists('user', array('auth' => 'radius', 'deleted' => 0))) {
// Remove all other associated config.
unset_all_config_for_plugin('auth/radius');
// The version number for radius is in this format.
unset_all_config_for_plugin('auth_radius');
}
}
upgrade_main_savepoint(true, 2016110202.00);
}
if ($oldversion < 2016110300.00) {
// Remove unused admin email setting.
unset_config('emailonlyfromreplyaddress');
// Main savepoint reached.
upgrade_main_savepoint(true, 2016110300.00);
}
if ($oldversion < 2016110500.00) {
$oldplayers = [
'vimeo' => null,
'mp3' => ['.mp3'],
'html5video' => ['.mov', '.mp4', '.m4v', '.mpeg', '.mpe', '.mpg', '.ogv', '.webm'],
'flv' => ['.flv', '.f4v'],
'html5audio' => ['.aac', '.flac', '.mp3', '.m4a', '.oga', '.ogg', '.wav'],
'youtube' => null,
'swf' => null,
];
// Convert hardcoded media players to the settings of the new media player plugin type.
if (get_config('core', 'media_plugins_sortorder') === false) {
$enabledplugins = [];
$videoextensions = [];
$audioextensions = [];
foreach ($oldplayers as $oldplayer => $extensions) {
$settingname = 'core_media_enable_'.$oldplayer;
if (!empty($CFG->$settingname)) {
if ($extensions) {
// VideoJS will be used for all media files players that were used previously.
$enabledplugins['videojs'] = 'videojs';
if ($oldplayer === 'mp3' || $oldplayer === 'html5audio') {
$audioextensions += array_combine($extensions, $extensions);
} else {
$videoextensions += array_combine($extensions, $extensions);
}
} else {
// Enable youtube, vimeo and swf.
$enabledplugins[$oldplayer] = $oldplayer;
}
}
}
set_config('media_plugins_sortorder', join(',', $enabledplugins));
// Configure VideoJS to match the existing players set up.
if ($enabledplugins['videojs']) {
$enabledplugins[] = 'videojs';
set_config('audioextensions', join(',', $audioextensions), 'media_videojs');
set_config('videoextensions', join(',', $videoextensions), 'media_videojs');
$useflash = !empty($CFG->core_media_enable_flv) || !empty($CFG->core_media_enable_mp3);
set_config('useflash', $useflash, 'media_videojs');
if (empty($CFG->core_media_enable_youtube)) {
// Normally YouTube is enabled in videojs, but if youtube converter was disabled before upgrade
// disable it in videojs as well.
set_config('youtube', false, 'media_videojs');
}
}
}
// Unset old settings.
foreach ($oldplayers as $oldplayer => $extensions) {
unset_config('core_media_enable_' . $oldplayer);
}
// Preset defaults if CORE_MEDIA_VIDEO_WIDTH and CORE_MEDIA_VIDEO_HEIGHT are specified in config.php .
// After this upgrade step these constants will not be used any more.
if (defined('CORE_MEDIA_VIDEO_WIDTH')) {
set_config('media_default_width', CORE_MEDIA_VIDEO_WIDTH);
}
if (defined('CORE_MEDIA_VIDEO_HEIGHT')) {
set_config('media_default_height', CORE_MEDIA_VIDEO_HEIGHT);
}
// Savepoint reached.
upgrade_main_savepoint(true, 2016110500.00);
}
if ($oldversion < 2016110600.00) {
// Define a field 'deletioninprogress' in the 'course_modules' table, to background deletion tasks.
$table = new xmldb_table('course_modules');
$field = new xmldb_field('deletioninprogress', XMLDB_TYPE_INTEGER, '1', null, XMLDB_NOTNULL, null, '0', 'availability');
// Conditionally launch add field 'deletioninprogress'.
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}
// Main savepoint reached.
upgrade_main_savepoint(true, 2016110600.00);
}
if ($oldversion < 2016112200.01) {
// Define field requiredbytheme to be added to block_instances.
$table = new xmldb_table('block_instances');
$field = new xmldb_field('requiredbytheme', XMLDB_TYPE_INTEGER, '4', null, XMLDB_NOTNULL, null, '0', 'showinsubcontexts');
// Conditionally launch add field requiredbytheme.
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}
// Main savepoint reached.
upgrade_main_savepoint(true, 2016112200.01);
}
if ($oldversion < 2016112200.02) {
// Change the existing site level admin and settings blocks to be requiredbytheme which means they won't show in boost.
$context = context_system::instance();
$params = array('blockname' => 'settings', 'parentcontextid' => $context->id);
$DB->set_field('block_instances', 'requiredbytheme', 1, $params);
$params = array('blockname' => 'navigation', 'parentcontextid' => $context->id);
$DB->set_field('block_instances', 'requiredbytheme', 1, $params);
// Main savepoint reached.
upgrade_main_savepoint(true, 2016112200.02);
}
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2016122800.00) {
// Find all roles with the coursecreator archetype.
$coursecreatorroleids = $DB->get_records('role', array('archetype' => 'coursecreator'), '', 'id');
-3
View File
@@ -32,9 +32,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_editor_atto_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
@@ -32,9 +32,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_atto_equation_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -27,9 +27,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_editor_tinymce_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
@@ -27,9 +27,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_tinymce_spellchecker_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -32,9 +32,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_message_email_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -32,9 +32,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_message_jabber_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-28
View File
@@ -34,34 +34,6 @@ function xmldb_message_popup_upgrade($oldversion) {
$dbman = $DB->get_manager();
if ($oldversion < 2016052309) {
// Define table message_popup to be created.
$table = new xmldb_table('message_popup');
// Adding fields to table message_popup.
$table->add_field('id', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, XMLDB_SEQUENCE, null);
$table->add_field('messageid', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, null);
$table->add_field('isread', XMLDB_TYPE_INTEGER, '1', null, XMLDB_NOTNULL, null, '0');
// Adding keys to table message_popup.
$table->add_key('primary', XMLDB_KEY_PRIMARY, array('id'));
// Adding indexes to table message_popup.
$table->add_index('messageid-isread', XMLDB_INDEX_UNIQUE, array('messageid', 'isread'));
// Conditionally launch create table for message_popup.
if (!$dbman->table_exists($table)) {
$dbman->create_table($table);
}
// Popup savepoint reached.
upgrade_plugin_savepoint(true, 2016052309, 'message', 'popup');
}
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2016122100) {
// Define index isread (not unique) to be added to message_popup.
+1 -33
View File
@@ -34,39 +34,6 @@ function xmldb_assign_upgrade($oldversion) {
$dbman = $DB->get_manager();
if ($oldversion < 2016100301) {
// Define table assign_overrides to be created.
$table = new xmldb_table('assign_overrides');
// Adding fields to table assign_overrides.
$table->add_field('id', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, XMLDB_SEQUENCE, null);
$table->add_field('assignid', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, '0');
$table->add_field('groupid', XMLDB_TYPE_INTEGER, '10', null, null, null, null);
$table->add_field('userid', XMLDB_TYPE_INTEGER, '10', null, null, null, null);
$table->add_field('sortorder', XMLDB_TYPE_INTEGER, '10', null, null, null, null);
$table->add_field('allowsubmissionsfromdate', XMLDB_TYPE_INTEGER, '10', null, null, null, null);
$table->add_field('duedate', XMLDB_TYPE_INTEGER, '10', null, null, null, null);
$table->add_field('cutoffdate', XMLDB_TYPE_INTEGER, '10', null, null, null, null);
// Adding keys to table assign_overrides.
$table->add_key('primary', XMLDB_KEY_PRIMARY, array('id'));
$table->add_key('assignid', XMLDB_KEY_FOREIGN, array('assignid'), 'assign', array('id'));
$table->add_key('groupid', XMLDB_KEY_FOREIGN, array('groupid'), 'groups', array('id'));
$table->add_key('userid', XMLDB_KEY_FOREIGN, array('userid'), 'user', array('id'));
// Conditionally launch create table for assign_overrides.
if (!$dbman->table_exists($table)) {
$dbman->create_table($table);
}
// Assign savepoint reached.
upgrade_mod_savepoint(true, 2016100301, 'assign');
}
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2017021500) {
// Fix event types of assign events.
$params = [
@@ -129,6 +96,7 @@ function xmldb_assign_upgrade($oldversion) {
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2017061200) {
// Data fix any assign group override event priorities which may have been accidentally nulled due to a bug on the group
// overrides edit form.
@@ -32,9 +32,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_assignfeedback_comments_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
@@ -34,9 +34,6 @@ function xmldb_assignfeedback_editpdf_upgrade($oldversion) {
$dbman = $DB->get_manager();
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2017022700) {
// Get orphaned, duplicate files and delete them.
-3
View File
@@ -32,9 +32,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_assignfeedback_file_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
@@ -32,9 +32,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_assignsubmission_comments_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
@@ -32,9 +32,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_assignsubmission_file_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
@@ -32,9 +32,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_assignsubmission_onlinetext_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -24,9 +24,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_assignment_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -32,9 +32,6 @@ defined('MOODLE_INTERNAL') || die;
function xmldb_book_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -29,9 +29,6 @@ function xmldb_chat_upgrade($oldversion) {
$dbman = $DB->get_manager();
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -24,9 +24,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_choice_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-18
View File
@@ -26,24 +26,6 @@ function xmldb_data_upgrade($oldversion) {
$dbman = $DB->get_manager();
if ($oldversion < 2016090600) {
// Define field config to be added to data.
$table = new xmldb_table('data');
$field = new xmldb_field('config', XMLDB_TYPE_TEXT, null, null, null, null, null, 'timemodified');
// Conditionally launch add field config.
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}
// Data savepoint reached.
upgrade_mod_savepoint(true, 2016090600, 'data');
}
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2017032800) {
// Define field completionentries to be added to data. Require a number of entries to be considered complete.
-3
View File
@@ -41,9 +41,6 @@ function xmldb_feedback_upgrade($oldversion) {
$dbman = $DB->get_manager(); // Loads ddl manager and xmldb classes.
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2017032800) {
// Delete duplicated records in feedback_completed. We just keep the last record of completion.
-3
View File
@@ -49,9 +49,6 @@ function xmldb_folder_upgrade($oldversion) {
$dbman = $DB->get_manager(); // Loads ddl manager and xmldb classes.
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-18
View File
@@ -47,24 +47,6 @@ function xmldb_forum_upgrade($oldversion) {
$dbman = $DB->get_manager(); // Loads ddl manager and xmldb classes.
if ($oldversion < 2016091200) {
// Define field lockdiscussionafter to be added to forum.
$table = new xmldb_table('forum');
$field = new xmldb_field('lockdiscussionafter', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, '0', 'displaywordcount');
// Conditionally launch add field lockdiscussionafter.
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}
// Forum savepoint reached.
upgrade_mod_savepoint(true, 2016091200, 'forum');
}
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -22,9 +22,6 @@
function xmldb_glossary_upgrade($oldversion) {
global $CFG, $DB;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -31,9 +31,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_imscp_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -47,9 +47,6 @@ defined('MOODLE_INTERNAL') || die;
function xmldb_label_upgrade($oldversion) {
global $CFG, $DB;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -54,9 +54,6 @@ function xmldb_lesson_upgrade($oldversion) {
$dbman = $DB->get_manager();
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2016120515) {
// Define new fields to be added to lesson.
$table = new xmldb_table('lesson');
-18
View File
@@ -61,24 +61,6 @@
function xmldb_lti_upgrade($oldversion) {
global $CFG, $DB;
$dbman = $DB->get_manager();
if ($oldversion < 2016052301) {
// Changing type of field value on table lti_types_config to text.
$table = new xmldb_table('lti_types_config');
$field = new xmldb_field('value', XMLDB_TYPE_TEXT, null, null, XMLDB_NOTNULL, null, null, 'name');
// Launch change of type for field value.
$dbman->change_field_type($table, $field);
// Lti savepoint reached.
upgrade_mod_savepoint(true, 2016052301, 'lti');
}
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -47,9 +47,6 @@ defined('MOODLE_INTERNAL') || die;
function xmldb_page_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-55
View File
@@ -33,61 +33,6 @@ function xmldb_quiz_upgrade($oldversion) {
$dbman = $DB->get_manager();
if ($oldversion < 2016092000) {
// Define new fields to be added to quiz.
$table = new xmldb_table('quiz');
$field = new xmldb_field('allowofflineattempts', XMLDB_TYPE_INTEGER, '1', null, null, null, 0, 'completionpass');
// Conditionally launch add field allowofflineattempts.
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}
// Quiz savepoint reached.
upgrade_mod_savepoint(true, 2016092000, 'quiz');
}
if ($oldversion < 2016092001) {
// New field for quiz_attemps.
$table = new xmldb_table('quiz_attempts');
$field = new xmldb_field('timemodifiedoffline', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, 0, 'timemodified');
// Conditionally launch add field timemodifiedoffline.
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}
// Quiz savepoint reached.
upgrade_mod_savepoint(true, 2016092001, 'quiz');
}
if ($oldversion < 2016100300) {
// Find quizzes with the combination of require passing grade and grade to pass 0.
$gradeitems = $DB->get_records_sql("
SELECT gi.id, gi.itemnumber, cm.id AS cmid
FROM {quiz} q
INNER JOIN {course_modules} cm ON q.id = cm.instance
INNER JOIN {grade_items} gi ON q.id = gi.iteminstance
INNER JOIN {modules} m ON m.id = cm.module
WHERE q.completionpass = 1
AND gi.gradepass = 0
AND cm.completiongradeitemnumber IS NULL
AND gi.itemmodule = m.name
AND gi.itemtype = ?
AND m.name = ?", array('mod', 'quiz'));
foreach ($gradeitems as $gradeitem) {
$DB->execute("UPDATE {course_modules}
SET completiongradeitemnumber = :itemnumber
WHERE id = :cmid",
array('itemnumber' => $gradeitem->itemnumber, 'cmid' => $gradeitem->cmid));
}
// Quiz savepoint reached.
upgrade_mod_savepoint(true, 2016100300, 'quiz');
}
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -33,9 +33,6 @@ function xmldb_quiz_overview_upgrade($oldversion) {
$dbman = $DB->get_manager();
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-10
View File
@@ -30,16 +30,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_quiz_statistics_upgrade($oldversion) {
global $DB;
if ($oldversion < 2016100500) {
// Clear the quiz_statistics table - it is only a cache table anyway.
// This will force re-calculation.
$DB->delete_records('quiz_statistics');
upgrade_plugin_savepoint(true, 2016100500, 'quiz', 'statistics');
}
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -47,9 +47,6 @@ defined('MOODLE_INTERNAL') || die;
function xmldb_resource_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-15
View File
@@ -34,21 +34,6 @@ function xmldb_scorm_upgrade($oldversion) {
$dbman = $DB->get_manager();
// MDL-44712 improve multi-sco activity completion.
if ($oldversion < 2016080900) {
$table = new xmldb_table('scorm');
$field = new xmldb_field('completionstatusallscos', XMLDB_TYPE_INTEGER, '1', null, null, null, null, 'completionscorerequired');
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}
upgrade_mod_savepoint(true, 2016080900, 'scorm');
}
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
+1 -21
View File
@@ -22,27 +22,7 @@
defined('MOODLE_INTERNAL') || die();
function xmldb_survey_upgrade($oldversion) {
global $DB;
$dbman = $DB->get_manager(); // Loads ddl manager and xmldb classes.
if ($oldversion < 2016061400) {
// Define field completionsubmit to be added to survey.
$table = new xmldb_table('survey');
$field = new xmldb_field('completionsubmit', XMLDB_TYPE_INTEGER, '1', null, XMLDB_NOTNULL, null, '0', 'questions');
// Conditionally launch add field completionsubmit.
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}
// Survey savepoint reached.
upgrade_mod_savepoint(true, 2016061400, 'survey');
}
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
global $CFG;
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -47,9 +47,6 @@ defined('MOODLE_INTERNAL') || die;
function xmldb_url_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -40,9 +40,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_wiki_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -39,9 +39,6 @@ function xmldb_workshop_upgrade($oldversion) {
$dbman = $DB->get_manager();
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
@@ -33,9 +33,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_workshopform_accumulative_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
@@ -33,9 +33,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_workshopform_comments_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
@@ -33,9 +33,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_workshopform_numerrors_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -33,9 +33,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_workshopform_rubric_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -33,9 +33,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_portfolio_boxnet_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -23,9 +23,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_portfolio_googledocs_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -23,9 +23,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_portfolio_picasa_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
@@ -30,9 +30,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_qbehaviour_manualgraded_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -32,9 +32,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_qtype_calculated_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -33,9 +33,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_qtype_ddmarker_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -34,9 +34,6 @@ function xmldb_qtype_essay_upgrade($oldversion) {
$dbman = $DB->get_manager();
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -31,9 +31,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_qtype_match_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -32,9 +32,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_qtype_multianswer_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -32,9 +32,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_qtype_multichoice_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
+6 -9
View File
@@ -33,6 +33,12 @@ function xmldb_qtype_numerical_upgrade($oldversion) {
global $CFG, $DB;
$dbman = $DB->get_manager();
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.4.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2017121000) {
// Changing length of field multiplier on table question_numerical_units to 38.
@@ -46,15 +52,6 @@ function xmldb_qtype_numerical_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2017121000, 'qtype', 'numerical');
}
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.4.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
-3
View File
@@ -31,9 +31,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_qtype_random_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
@@ -31,9 +31,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_qtype_randomsamatch_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.

Some files were not shown because too many files have changed in this diff Show More