diff --git a/.travis.yml b/.travis.yml index 99f30f8..59be15a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,7 +28,7 @@ before_install: - nvm install 14.2 - nvm use 14.2 - cd ../.. - - composer create-project -n --no-dev --prefer-dist blackboard-open-source/moodle-plugin-ci ci ^2 + - composer create-project -n --no-dev --prefer-dist moodlehq/moodle-plugin-ci ci ^3 - export PATH="$(cd ci/bin; pwd):$(cd ci/vendor/bin; pwd):$PATH" install: diff --git a/README.md b/README.md index 7926ea3..f2d032c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Moodle - Local Reminders --- -![Version](https://img.shields.io/badge/version-v2.2.3-blue) +![Version](https://img.shields.io/badge/version-v2.2.4-blue) ![Moodle Version](https://img.shields.io/badge/moodle-%3E%3D%203.5-orange) ![License](https://img.shields.io/badge/license-GPL%20v3-green) [![Build Status](https://travis-ci.org/isuru89/moodle-reminders-for-calendar-events.svg?branch=master)](https://travis-ci.org/isuru89/moodle-reminders-for-calendar-events) @@ -94,6 +94,9 @@ In addition to above, user can control reminders for calendar event changes per ## Changelog +### v2.2.4 + * Removed hardcoded strings (overdue text and moodle calendar name) #105 + ### v2.2.3 * Added privacy provider for the plugin (#99) diff --git a/README.txt b/README.txt index bdd9310..03c3579 100644 --- a/README.txt +++ b/README.txt @@ -4,7 +4,7 @@ Author: Isuru Madushanka Weerarathna (uisurumadushanka89@gmail.com) Blog: https://medium.com/@isuru89 Copyright: 2020 Isuru Madushanka Weerarathna License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later -Version: 2.2.3 +Version: 2.2.4 == Introduction == This plugin will create a set of reminders for Moodle calendar events and will send them automatically @@ -30,6 +30,8 @@ to recall their scheduled event before the actual moment. 6. Now you can change the plug-in specific settings via Site Administration -> Plugins -> Local Plugins -> Reminders. == Change Log == +v2.2.4 + + Removed hardcoded strings (overdue text and moodle calendar name) #105 v2.2.3 + Added privacy provider (#99) v2.2.2 diff --git a/contents/category_reminder.class.php b/contents/category_reminder.class.php index a7325ab..a129a93 100644 --- a/contents/category_reminder.class.php +++ b/contents/category_reminder.class.php @@ -72,7 +72,8 @@ public function get_message_html($user=null, $changetype=null) { $contenttitle = $this->get_message_title(); if (!isemptystring($changetype)) { - $contenttitle = "[$changetype]: $contenttitle"; + $titleprefixlangstr = get_string('calendarevent'.strtolower($changetype).'prefix', 'local_reminders'); + $contenttitle = "[$titleprefixlangstr]: $contenttitle"; } $htmlmail .= html_writer::start_tag('tr'); $htmlmail .= html_writer::start_tag('td', array('colspan' => 2)); diff --git a/contents/course_reminder.class.php b/contents/course_reminder.class.php index 3bbb1ce..1967554 100644 --- a/contents/course_reminder.class.php +++ b/contents/course_reminder.class.php @@ -72,7 +72,8 @@ public function get_message_html($user=null, $changetype=null) { $contenttitle = $this->get_message_title(); if (!isemptystring($changetype)) { - $contenttitle = "[$changetype]: $contenttitle"; + $titleprefixlangstr = get_string('calendarevent'.strtolower($changetype).'prefix', 'local_reminders'); + $contenttitle = "[$titleprefixlangstr]: $contenttitle"; } $htmlmail .= html_writer::start_tag('tr'); $htmlmail .= html_writer::start_tag('td', array('colspan' => 2)); diff --git a/contents/due_reminder.class.php b/contents/due_reminder.class.php index 7dcf209..962f715 100644 --- a/contents/due_reminder.class.php +++ b/contents/due_reminder.class.php @@ -137,7 +137,8 @@ public function get_message_html($user=null, $changetype=null) { $contenttitle = $this->get_message_title(); if (!isemptystring($changetype)) { - $contenttitle = "[$changetype]: $contenttitle"; + $titleprefixlangstr = get_string('calendarevent'.strtolower($changetype).'prefix', 'local_reminders'); + $contenttitle = "[$titleprefixlangstr]: $contenttitle"; } $htmlmail .= html_writer::start_tag('tr'); $htmlmail .= html_writer::start_tag('td', array('colspan' => 2)); diff --git a/contents/group_reminder.class.php b/contents/group_reminder.class.php index c971f69..a390b21 100644 --- a/contents/group_reminder.class.php +++ b/contents/group_reminder.class.php @@ -140,7 +140,8 @@ public function get_message_html($user=null, $changetype=null) { $contenttitle = $this->get_message_title(); if (!isemptystring($changetype)) { - $contenttitle = "[$changetype]: $contenttitle"; + $titleprefixlangstr = get_string('calendarevent'.strtolower($changetype).'prefix', 'local_reminders'); + $contenttitle = "[$titleprefixlangstr]: $contenttitle"; } $htmlmail .= html_writer::start_tag('tr'); $htmlmail .= html_writer::start_tag('td', array('colspan' => 2)); diff --git a/contents/site_reminder.class.php b/contents/site_reminder.class.php index adb3d00..174cfcd 100644 --- a/contents/site_reminder.class.php +++ b/contents/site_reminder.class.php @@ -53,7 +53,8 @@ public function get_message_html($user=null, $changetype=null) { $contenttitle = $this->get_message_title(); if (!isemptystring($changetype)) { - $contenttitle = "[$changetype]: $contenttitle"; + $titleprefixlangstr = get_string('calendarevent'.strtolower($changetype).'prefix', 'local_reminders'); + $contenttitle = "[$titleprefixlangstr]: $contenttitle"; } $htmlmail .= html_writer::start_tag('tr'); $htmlmail .= html_writer::start_tag('td', array('colspan' => 2)); diff --git a/contents/user_reminder.class.php b/contents/user_reminder.class.php index 5e03dca..d723644 100644 --- a/contents/user_reminder.class.php +++ b/contents/user_reminder.class.php @@ -83,7 +83,8 @@ public function get_message_html($user=null, $changetype=null) { $contenttitle = $this->get_message_title(); if (!isemptystring($changetype)) { - $contenttitle = "[$changetype]: $contenttitle"; + $titleprefixlangstr = get_string('calendarevent'.strtolower($changetype).'prefix', 'local_reminders'); + $contenttitle = "[$titleprefixlangstr]: $contenttitle"; } $htmlmail .= html_writer::start_tag('tr'); $htmlmail .= html_writer::start_tag('td', array('colspan' => 2)); diff --git a/lang/en/local_reminders.php b/lang/en/local_reminders.php index 5a7a1d8..48d9519 100644 --- a/lang/en/local_reminders.php +++ b/lang/en/local_reminders.php @@ -88,6 +88,7 @@ $string['messageprovider:reminders_user'] = 'Reminder notifications for User events'; $string['messagetitleprefix'] = 'Message Title Prefix:'; $string['messagetitleprefixdescription'] = 'This text will be inserted as a prefix (within square brackets) to the title of every reminder message is being sent.'; +$string['moodlecalendarname'] = 'Moodle Calendar'; $string['overduemessage'] = 'This activity is overdue!'; $string['pluginname'] = 'Event Reminders'; $string['privacy:metadata'] = 'The Event Reminders plugin does not store any personal data.'; diff --git a/reminder.class.php b/reminder.class.php index b228e3a..dcec96e 100644 --- a/reminder.class.php +++ b/reminder.class.php @@ -251,7 +251,8 @@ protected function pluralize($number, $text) { protected function get_html_footer() { global $CFG; - $calendarlink = html_writer::link($CFG->wwwroot.'/calendar/index.php', 'Moodle Calendar', array('target' => '_blank')); + $moodlecalendarname = get_string('moodlecalendarname', 'local_reminders'); + $calendarlink = html_writer::link($CFG->wwwroot.'/calendar/index.php', $moodlecalendarname, array('target' => '_blank')); $footer = html_writer::start_tag('tr'); $footer .= html_writer::start_tag('td', array('style' => $this->footerstyle, 'colspan' => 2)); $footer .= get_string('reminderfrom', 'local_reminders').' '; diff --git a/version.php b/version.php index 2427881..40ff81e 100644 --- a/version.php +++ b/version.php @@ -25,8 +25,8 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2021010800; +$plugin->version = 2021030800; $plugin->requires = 2018051700; // Require moodle 3.5 or higher. -$plugin->release = '2.2.3'; +$plugin->release = '2.2.4'; $plugin->maturity = MATURITY_RC; $plugin->component = 'local_reminders';