Skip to content

Commit

Permalink
add plugin disabled message to course page #181
Browse files Browse the repository at this point in the history
  • Loading branch information
isuru89 committed May 25, 2024
1 parent 058a7b9 commit bbabb7d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
11 changes: 9 additions & 2 deletions coursesettings_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,15 @@ class local_reminders_coursesettings_edit_form extends moodleform {
* @return void.
*/
public function definition() {
global $USER;
global $USER, $CFG;

$mform = $this->_form;

if (!$CFG->local_reminders_enable) {
$mform->addElement('static', 'descriptionex2sub', '',
get_string('plugindisabled', 'local_reminders'));
return;
}

$daysarray = [
'days7' => ' '.get_string('days7', 'local_reminders'),
Expand All @@ -51,7 +59,6 @@ public function definition() {
'custom' => ' '.get_string('custom', 'local_reminders'),
];

$mform = $this->_form;
list($coursesettings) = $this->_customdata;
$explicitlyenable = $coursesettings->explicitenable;

Expand Down
1 change: 1 addition & 0 deletions lang/en/local_reminders.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@
$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['plugindisabled'] = 'The plugin is disabled by admin.';
$string['pluginname'] = 'Event Reminders';
$string['privacy:metadata'] = 'The Event Reminders plugin does not store any personal data.';
$string['overdueactivityreminders'] = 'Activity Overdue Reminders:';
Expand Down

0 comments on commit bbabb7d

Please sign in to comment.