Commit 7d24686e authored by Sara Arjona's avatar Sara Arjona

Merge branch 'MDL-69308' of https://github.com/stronk7/moodle

parents f89a0a87 77342b96
......@@ -48,7 +48,7 @@ jobs:
matrix:
include:
- os: ubuntu-18.04
php: 7.2
php: 7.3
db: mysqli
- os: ubuntu-18.04
php: 7.4
......
......@@ -26,18 +26,18 @@ jobs:
fast_finish: true
include:
# First all the lowest php ones (7.2)
- php: 7.2
# First all the lowest php ones (7.3)
- php: 7.3
env: DB=none TASK=CITEST
- php: 7.2
- php: 7.3
env: DB=none TASK=GRUNT NVM_VERSION='lts/carbon'
- if: env(MOODLE_DATABASE) = "pgsql" OR env(MOODLE_DATABASE) = "all" OR env(MOODLE_DATABASE) IS NOT present
php: 7.2
php: 7.3
env: DB=pgsql TASK=PHPUNIT
- if: env(MOODLE_DATABASE) = "mysqli" OR env(MOODLE_DATABASE) = "all"
php: 7.2
php: 7.3
env: DB=mysqli TASK=PHPUNIT
# Then, conditionally, all the highest php ones (7.4)
......
......@@ -3344,4 +3344,186 @@
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="3.11" requires="3.6">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mariadb" version="10.2.29" />
<VENDOR name="mysql" version="5.7" />
<VENDOR name="postgres" version="9.6" />
<VENDOR name="mssql" version="14.0" />
<VENDOR name="oracle" version="11.2" />
</DATABASE>
<PHP version="7.3.0" level="required">
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
<ON_CHECK message="pcreunicodewarning" />
</FEEDBACK>
</PCREUNICODE>
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="required">
<FEEDBACK>
<ON_ERROR message="iconvrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="required">
<FEEDBACK>
<ON_ERROR message="mbstringrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="required">
<FEEDBACK>
<ON_ERROR message="curlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="required">
<FEEDBACK>
<ON_ERROR message="opensslrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="tokenizer" level="optional">
<FEEDBACK>
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlrpc" level="optional">
<FEEDBACK>
<ON_CHECK message="xmlrpcrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="soap" level="optional">
<FEEDBACK>
<ON_CHECK message="soaprecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="ctype" level="required">
<FEEDBACK>
<ON_ERROR message="ctyperequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zip" level="required">
<FEEDBACK>
<ON_ERROR message="ziprequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zlib" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="gd" level="required">
<FEEDBACK>
<ON_ERROR message="gdrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="simplexml" level="required">
<FEEDBACK>
<ON_ERROR message="simplexmlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="spl" level="required">
<FEEDBACK>
<ON_ERROR message="splrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="pcre" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="dom" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xml" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlreader" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="intl" level="required">
<FEEDBACK>
<ON_ERROR message="intlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="json" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="hash" level="required"/>
<PHP_EXTENSION name="fileinfo" level="required"/>
<PHP_EXTENSION name="sodium" level="required"/>
</PHP_EXTENSIONS>
<PHP_SETTINGS>
<PHP_SETTING name="memory_limit" value="96M" level="required">
<FEEDBACK>
<ON_ERROR message="settingmemorylimit" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="file_uploads" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="settingfileuploads" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="opcache.enable" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="opcacherecommended" />
</FEEDBACK>
</PHP_SETTING>
</PHP_SETTINGS>
<CUSTOM_CHECKS>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_storage_engine" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbstorageengine" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="question/engine/upgrade/upgradelib.php" function="quiz_attempts_upgraded" level="required">
<FEEDBACK>
<ON_ERROR message="quizattemptsupgradedmessage" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_slasharguments" level="optional">
<FEEDBACK>
<ON_CHECK message="slashargumentswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_tables_row_format" level="optional">
<FEEDBACK>
<ON_CHECK message="unsupporteddbtablerowformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_unoconv_version" level="optional">
<FEEDBACK>
<ON_CHECK message="unoconvwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_libcurl_version" level="optional">
<FEEDBACK>
<ON_CHECK message="libcurlwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_format" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbfileformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_per_table" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbfilepertable" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_large_prefix" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddblargeprefix" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_is_https" level="optional">
<FEEDBACK>
<ON_CHECK message="ishttpswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_incomplete_unicode_support" level="optional">
<FEEDBACK>
<ON_CHECK message="incompleteunicodesupport" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_sixtyfour_bits" level="optional">
<FEEDBACK>
<ON_CHECK message="sixtyfourbitswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
</COMPATIBILITY_MATRIX>
......@@ -29,9 +29,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_tool_customlang_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
......
This diff is collapsed.
......@@ -33,9 +33,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_tool_log_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.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.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.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.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
......
......@@ -33,9 +33,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_tool_monitor_upgrade($oldversion) {
global $CFG, $DB;
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
......
......@@ -34,32 +34,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_tool_policy_upgrade($oldversion) {
global $DB;
$dbman = $DB->get_manager();
if ($oldversion < 2018082900) {
// Add field agreementstyle to the table tool_policy_versions.
$table = new xmldb_table('tool_policy_versions');
$field = new xmldb_field('agreementstyle', XMLDB_TYPE_INTEGER, '3', null, XMLDB_NOTNULL, null, '0', 'policyid');
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}
upgrade_plugin_savepoint(true, 2018082900, 'tool', 'policy');
}
if ($oldversion < 2018091800) {
// Add field "optional" to the table "tool_policy_versions".
$table = new xmldb_table('tool_policy_versions');
$field = new xmldb_field('optional', XMLDB_TYPE_INTEGER, '3', null, XMLDB_NOTNULL, null, '0', 'agreementstyle');
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}
upgrade_plugin_savepoint(true, 2018091800, 'tool', 'policy');
}
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
......
......@@ -36,9 +36,6 @@ use tool_usertours\tour;
function xmldb_tool_usertours_upgrade($oldversion) {
global $CFG, $DB;
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
......
......@@ -32,9 +32,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_auth_cas_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
......
......@@ -32,9 +32,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_auth_db_upgrade($oldversion) {
global $CFG, $DB;
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
......
......@@ -32,9 +32,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_auth_email_upgrade($oldversion) {
global $CFG, $DB;
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
......
......@@ -32,9 +32,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_auth_ldap_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
......
......@@ -32,9 +32,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_auth_manual_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
......
......@@ -32,9 +32,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_auth_mnet_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
......
......@@ -32,9 +32,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_auth_none_upgrade($oldversion) {
global $CFG, $DB;
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
......
......@@ -35,9 +35,6 @@ function xmldb_auth_oauth2_upgrade($oldversion) {
$dbman = $DB->get_manager();
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
......
......@@ -32,9 +32,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_auth_shibboleth_upgrade($oldversion) {
global $CFG, $DB, $OUTPUT;
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
......
......@@ -45,9 +45,6 @@
function xmldb_block_badges_upgrade($oldversion, $block) {
global $CFG;
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
......
......@@ -45,9 +45,6 @@
function xmldb_block_calendar_month_upgrade($oldversion, $block) {
global $CFG;
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
......
......@@ -45,9 +45,6 @@
function xmldb_block_calendar_upcoming_upgrade($oldversion, $block) {
global $CFG;
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
......
......@@ -48,9 +48,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_block_completionstatus_upgrade($oldversion, $block) {
global $CFG;
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
......
......@@ -48,9 +48,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_block_course_summary_upgrade($oldversion, $block) {
global $CFG;
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
......
......@@ -33,9 +33,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_block_html_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
......
......@@ -55,9 +55,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_block_navigation_upgrade($oldversion, $block) {
global $CFG;
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
......
......@@ -45,9 +45,6 @@
function xmldb_block_quiz_results_upgrade($oldversion, $block) {
global $CFG;
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
......
......@@ -47,9 +47,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_block_recent_activity_upgrade($oldversion, $block) {
global $CFG;
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
......
......@@ -33,9 +33,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_block_rss_client_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
......
......@@ -49,9 +49,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_block_section_links_upgrade($oldversion, $block) {
global $CFG;
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
......
......@@ -48,9 +48,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_block_selfcompletion_upgrade($oldversion, $block) {
global $CFG;
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
......
......@@ -55,9 +55,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_block_settings_upgrade($oldversion, $block) {
global $CFG;
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
......
......@@ -33,9 +33,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_format_topics_upgrade($oldversion) {
global $CFG, $DB;
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
......
......@@ -33,9 +33,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_format_weeks_upgrade($oldversion) {
global $CFG, $DB;
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
......
......@@ -27,9 +27,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_enrol_database_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
......
......@@ -27,9 +27,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_enrol_flatfile_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
......
......@@ -27,9 +27,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_enrol_guest_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
......
......@@ -33,9 +33,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_enrol_imsenterprise_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
......
......@@ -39,9 +39,6 @@
function xmldb_enrol_lti_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
......
......@@ -27,9 +27,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_enrol_manual_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
......
......@@ -27,9 +27,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_enrol_mnet_upgrade($oldversion) {
global $CFG;
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
......
......@@ -45,90 +45,6 @@ defined('MOODLE_INTERNAL') || die();
function xmldb_enrol_paypal_upgrade($oldversion) {
global $DB;
$dbman = $DB->get_manager();
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2018053000) {
// Define field instanceid to be added to enrol_paypal.
// For some reason, some Moodle instances that are upgraded from old versions do not have this field.
$table = new xmldb_table('enrol_paypal');
$field = new xmldb_field('instanceid', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, '0', 'userid');
// Conditionally launch add field instanceid.
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}
// Paypal savepoint reached.
upgrade_plugin_savepoint(true, 2018053000, 'enrol', 'paypal');
}
if ($oldversion < 2018062500) {
// Define key courseid (foreign) to be added to enrol_paypal.
$table = new xmldb_table('enrol_paypal');
$key = new xmldb_key('courseid', XMLDB_KEY_FOREIGN, array('courseid'), 'course', array('id'));
// Launch add key courseid.
$dbman->add_key($table, $key);
// Paypal savepoint reached.