Skip to content

Commit

Permalink
Amending uno, apreciar and apprezziare.
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaboesch committed Dec 24, 2019
1 parent 99c8ccb commit 4b5d18e
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 21 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down
20 changes: 10 additions & 10 deletions db/install.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
65 changes: 56 additions & 9 deletions db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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;
}
4 changes: 2 additions & 2 deletions version.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

0 comments on commit 4b5d18e

Please sign in to comment.