From 4b5d18e164523c39a5ac6f50601dc4621fec323d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luca=20B=C3=B6sch?= Date: Tue, 24 Dec 2019 09:03:20 +0100 Subject: [PATCH] Amending uno, apreciar and apprezziare. --- CHANGES.md | 4 ++++ db/install.php | 20 ++++++++-------- db/upgrade.php | 65 +++++++++++++++++++++++++++++++++++++++++++------- version.php | 4 ++-- 4 files changed, 72 insertions(+), 21 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index f5a154e1..9b98dccb 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,6 +4,10 @@ moodle-local_differentiator Changes ------- +### Release 1.1.1 + +* 2019-12-24 - Amended strings, also fixed strings for thinking skills appearing twice in es, es_mx and it. + ### Release 1.1.0 * 2019-12-22 - Added strings for es as well as es_mx, including the user tour with typo fixes. Thanks to Germán Valero! diff --git a/db/install.php b/db/install.php index 40e845b3..beac9316 100644 --- a/db/install.php +++ b/db/install.php @@ -1495,8 +1495,8 @@ function xmldb_local_differentiator_install() { 'gwid' => 1, 'lang' => 'fr', 'timecreated' => $time, - 'gwetitle' => 'Un', - 'gwetext' => 'un', + 'gwetitle' => 'Uno', + 'gwetext' => 'uno', ]); $DB->insert_record('local_differentiator_gwe', [ 'gwid' => 2, @@ -4591,8 +4591,8 @@ function xmldb_local_differentiator_install() { 'tswid' => 43, 'lang' => 'it', 'timecreated' => $time, - 'tswetitle' => 'Interpretare', - 'tswetext' => 'interpretare', + 'tswetitle' => 'Apprezziare', + 'tswetext' => 'apprezziare', ]); $DB->insert_record('local_differentiator_tswe', [ 'tswid' => 44, @@ -4832,8 +4832,8 @@ function xmldb_local_differentiator_install() { 'gwid' => 1, 'lang' => 'es', 'timecreated' => $time, - 'gwetitle' => 'Un', - 'gwetext' => 'un', + 'gwetitle' => 'Uno', + 'gwetext' => 'uno', ]); $DB->insert_record('local_differentiator_gwe', [ 'gwid' => 2, @@ -5691,8 +5691,8 @@ function xmldb_local_differentiator_install() { 'tswid' => 43, 'lang' => 'es', 'timecreated' => $time, - 'tswetitle' => 'Interpretar', - 'tswetext' => 'interpretar', + 'tswetitle' => 'Apreciar', + 'tswetext' => 'apreciar', ]); $DB->insert_record('local_differentiator_tswe', [ 'tswid' => 44, @@ -6791,8 +6791,8 @@ function xmldb_local_differentiator_install() { 'tswid' => 43, 'lang' => 'es_mx', 'timecreated' => $time, - 'tswetitle' => 'Interpretar', - 'tswetext' => 'interpretar', + 'tswetitle' => 'Apreciar', + 'tswetext' => 'apreciar', ]); $DB->insert_record('local_differentiator_tswe', [ 'tswid' => 44, diff --git a/db/upgrade.php b/db/upgrade.php index cee70cf0..c1c6ba46 100644 --- a/db/upgrade.php +++ b/db/upgrade.php @@ -228,8 +228,8 @@ function xmldb_local_differentiator_upgrade($oldversion = 0) { 'gwid' => 1, 'lang' => 'es', 'timecreated' => $time, - 'gwetitle' => 'Un', - 'gwetext' => 'un', + 'gwetitle' => 'Uno', + 'gwetext' => 'uno', ]); $DB->insert_record('local_differentiator_gwe', [ 'gwid' => 2, @@ -1087,8 +1087,8 @@ function xmldb_local_differentiator_upgrade($oldversion = 0) { 'tswid' => 43, 'lang' => 'es', 'timecreated' => $time, - 'tswetitle' => 'Interpretar', - 'tswetext' => 'interpretar', + 'tswetitle' => 'Apreciar', + 'tswetext' => 'apreciar', ]); $DB->insert_record('local_differentiator_tswe', [ 'tswid' => 44, @@ -1328,8 +1328,8 @@ function xmldb_local_differentiator_upgrade($oldversion = 0) { 'gwid' => 1, 'lang' => 'es_mx', 'timecreated' => $time, - 'gwetitle' => 'Un', - 'gwetext' => 'un', + 'gwetitle' => 'Uno', + 'gwetext' => 'uno', ]); $DB->insert_record('local_differentiator_gwe', [ 'gwid' => 2, @@ -2187,8 +2187,8 @@ function xmldb_local_differentiator_upgrade($oldversion = 0) { 'tswid' => 43, 'lang' => 'es_mx', 'timecreated' => $time, - 'tswetitle' => 'Interpretar', - 'tswetext' => 'interpretar', + 'tswetitle' => 'Apreciar', + 'tswetext' => 'apreciar', ]); $DB->insert_record('local_differentiator_tswe', [ 'tswid' => 44, @@ -2243,5 +2243,52 @@ function xmldb_local_differentiator_upgrade($oldversion = 0) { // Plugin savepoint reached. upgrade_plugin_savepoint(true, 2019122300, 'local', 'differentiator'); } - return true; + + if ($oldversion < 2019122400) { + + $time = time(); + $gwe = $DB->get_record('local_differentiator_gwe', ['gwid' => 1, 'lang' => 'es']); + if (!empty($gwe)) { + $gwe->gwetitle = 'Uno'; + $gwe->gwetext = 'uno'; + $gwe->timemodified = $time; + $DB->update_record('local_differentiator_gwe', $gwe); + } + + $gwe = $DB->get_record('local_differentiator_gwe', ['gwid' => 1, 'lang' => 'es_mx']); + if (!empty($gwe)) { + $gwe->gwetitle = 'Uno'; + $gwe->gwetext = 'uno'; + $gwe->timemodified = $time; + $DB->update_record('local_differentiator_gwe', $gwe); + } + + $tswe = $DB->get_record('local_differentiator_tswe', ['tswid' => 43, 'lang' => 'es']); + if (!empty($tswe)) { + $tswe->tswetitle = 'Apreciar'; + $tswe->tswetext = 'apreciar'; + $tswe->timemodified = $time; + $DB->update_record('local_differentiator_tswe', $tswe); + } + + $tswe = $DB->get_record('local_differentiator_tswe', ['tswid' => 43, 'lang' => 'es_mx']); + if (!empty($tswe)) { + $tswe->tswetitle = 'Apreciar'; + $tswe->tswetext = 'apreciar'; + $tswe->timemodified = $time; + $DB->update_record('local_differentiator_tswe', $tswe); + } + + $tswe = $DB->get_record('local_differentiator_tswe', ['tswid' => 43, 'lang' => 'it']); + if (!empty($tswe)) { + $tswe->tswetitle = 'Apprezziare'; + $tswe->tswetext = 'apprezziare'; + $tswe->timemodified = $time; + $DB->update_record('local_differentiator_tswe', $tswe); + } + + // Plugin savepoint reached. + upgrade_plugin_savepoint(true, 2019122400, 'local', 'differentiator'); + } + return true; } diff --git a/version.php b/version.php index 8079ab90..c876481e 100644 --- a/version.php +++ b/version.php @@ -25,7 +25,7 @@ defined('MOODLE_INTERNAL') || die(); $plugin->component = 'local_differentiator'; -$plugin->release = '1.1.0'; -$plugin->version = 2019122300; +$plugin->release = '1.1.1'; +$plugin->version = 2019122400; $plugin->requires = 2018051700; $plugin->maturity = MATURITY_STABLE;