diff --git a/admin/settings/users.php b/admin/settings/users.php index bb96e7bcfcd..7ed9cdc9b1b 100644 --- a/admin/settings/users.php +++ b/admin/settings/users.php @@ -227,27 +227,18 @@ if ($hassiteconfig) { $setting->set_force_ltr(true); $temp->add($setting); + // See {@link https://gdpr-info.eu/art-8-gdpr/}. + $ageofdigitalconsentmap = implode(PHP_EOL, [ + '*, 16', + 'AT, 14', + 'ES, 14', + 'SI, 14', + 'US, 13' + ]); $setting = new admin_setting_agedigitalconsentmap('agedigitalconsentmap', new lang_string('ageofdigitalconsentmap', 'admin'), new lang_string('ageofdigitalconsentmap_desc', 'admin'), - // See {@link https://gdpr-info.eu/art-8-gdpr/}. - implode(PHP_EOL, [ - '*, 16', - 'AT, 14', - 'CZ, 13', - 'DE, 14', - 'DK, 13', - 'ES, 13', - 'FI, 15', - 'GB, 13', - 'HU, 14', - 'IE, 13', - 'LT, 16', - 'LU, 16', - 'NL, 16', - 'PL, 13', - 'SE, 13', - ]), + $ageofdigitalconsentmap, PARAM_RAW ); $temp->add($setting); diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index e170ca53ab9..447d10023c2 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -2835,5 +2835,20 @@ function xmldb_main_upgrade($oldversion) { upgrade_main_savepoint(true, 2017111301.08); } + if ($oldversion < 2017111302.12) { + // Update default digital age consent map according to the current legislation on each country. + $ageofdigitalconsentmap = implode(PHP_EOL, [ + '*, 16', + 'AT, 14', + 'ES, 14', + 'SI, 14', + 'US, 13' + ]); + set_config('agedigitalconsentmap', $ageofdigitalconsentmap); + + // Main savepoint reached. + upgrade_main_savepoint(true, 2017111302.12); + } + return true; } diff --git a/version.php b/version.php index e7f91434c25..692394b5df6 100644 --- a/version.php +++ b/version.php @@ -29,7 +29,7 @@ defined('MOODLE_INTERNAL') || die(); -$version = 2017111302.11; // 20171113 = branching date YYYYMMDD - do not modify! +$version = 2017111302.12; // 20171113 = branching date YYYYMMDD - do not modify! // RR = release increments - 00 in DEV branches. // .XX = incremental changes.