Moodle plugins directory: Event Reminders | Moodle.org
Event Reminders
General plugins (Local) ::: local_reminders
Maintained by Isuru Madushanka Weerarathna
This plugin will automate sending reminders for calendar events.
Latest release:
2703 sites
1k downloads
152 fans
Current versions available: 10
This plugin will automatically send email reminders for Moodle calendar events in a timely manner.
Reminders are very useful for both students as well as teachers to recall their scheduled events and activities before the actual moment.
Latest Feature (with plugin v2.5)
- The plugin provides a way to customize the email header/footer with desired HTML content! This means now you can add your site branding to those email reminders too. (See updated screenshots)
New Features: (in v2+ which works in Moodle 3.5 or above)
- Ability to send reminders after event completed for overdue students
- Ability to enable/disable and schedule reminders per activity
- Explicitly reminder enables: By default no reminders will be sent unless teachers enable them in course level.
- Reminder email messages when calendar event created/changed/removed
- Prevent sending more email reminders once a student has completed the activity
- Added timezone/location to the email due dates
- Support for course category events
- Ability to customize email header/footer with the branding of the site
- Additional cron task to clean old reminder data
- Send reminders only to students who can submit the assignment
- Supports site, course, activity, user, and group calendar events
- Ability to customize the reminder schedule globally
- Ability to customize enable/disable reminders per course
- Ability to select reminders eligible user roles per calendar event type
Prerequisite for plugin v1.5.1 or prior:
- Your moodle site must enable logging to make the plugin work properly.
- The Cron job should be enabled
- Cron job should not be lagged to send reminders for custom schedules which has tight schedules.
Note: Please report any issue or feature request at https://github.com/isuru89/moodle-reminders-for-calendar-events by specifying reproducible steps, cron logs (scheduled task logs), and affected moodle + plugin versions.
Contributors
Isuru Madushanka Weerarathna (Lead maintainer)
Rossiani Wijaya: Mentor
Please login to view contributors details and/or to contact them
Could you verify whether there is a calendar event created for a opening of an assignment, or not. Because, the plugin sends reminders only for the calendar events.
Moodle by-default may not be adding assignment open date to the calendar as an event.
May be you have to look in the forum on how to add an event for the open date or is there any upgrade in the assignment module to support that.
However, if you add an event manually, then the plugin should send reminders as long as still in the reminding date range.
Kind regards
Yes, that's the current default behavior of reminder plugin. As a plugin, it sends reminders as long as the calendar event is in future and active.
Plugin gets all associated users for a calendar event, but it does not consider whether individual has completed the event or not. That's why it sends reminder mails for a user even he/she has already completed the assignment.
This has been reported by several moodle users to me and I am still figuring out whether plugin can filter out completed users out so they don't receive reminder mails. Let's see how it goes.
Event reminders will work if you can create a calendar event (manually or automatically) for each interested type of offering.
The first is for a Course or Close Events:
[Local Reminder - ERROR] Error occured when initializing for event#[581] (type: course) Error reading from database
[Local Reminder - ERROR] #0 /u01/apolloglobal/moodle/ies/noah/lib/dml/oci_native_moodle_database.php(277): moodle_database->query_end(false)
#1 /u01/apolloglobal/moodle/ies/noah/lib/dml/oci_native_moodle_database.php(1179): oci_native_moodle_database->query_end(false, Resource id #2429)
#2 /u01/apolloglobal/moodle/ies/noah/lib/accesslib.php(3937): oci_native_moodle_database->get_records_sql('SELECT DISTINCT...', Array, '', '')
#3 /u01/apolloglobal/moodle/ies/noah/local/reminders/lib.php(280): get_role_users(Array, Object(context_course), true, 'ra.id as ra_id,...')
#4 /u01/apolloglobal/moodle/ies/noah/lib/cronlib.php(223): local_reminders_cron()
The second is for Site events:
[Local Reminder - ERROR] Error occured when initializing for event#[602] (type: site) Error reading from database
[Local Reminder - ERROR] #0 /u01/apolloglobal/moodle/ies/noah/lib/dml/oci_native_moodle_database.php(277): moodle_database->query_end(false)
#1 /u01/apolloglobal/moodle/ies/noah/lib/dml/oci_native_moodle_database.php(1179): oci_native_moodle_database->query_end(false, Resource id #1786)
#2 /u01/apolloglobal/moodle/ies/noah/local/reminders/lib.php(254): oci_native_moodle_database->get_records_sql('SELECT * \r\n ...')
#3 /u01/apolloglobal/moodle/ies/noah/lib/cronlib.php(223): local_reminders_cron()
#4 /u01/apolloglobal/moodle/ies/noah/lib/classes/task/legacy_plugin_cron_task.php(163): cron_execute_plugin_type('local', 'local plugins')
I'm trying to get more details regarding the DB errors that are thrown, but was hoping folks here may have some insight into the issue.
Basically i did the following
1. i noticed that version 1.3.1 will work but it sent reminders out more than once due to a bug. After an upgrade to versions 1.4, 1.4.1 and 1.5 i noticed that event reminders didn't send
2. I downloaded 1.4 to find out how the repeated reminders were no longer sent and i noticed that a database table was not created for this plugin
3. I went into the lib.php file and modified the following lines of text to be as follows:
The logrows line to now become:
$logrows = $DB->get_records("local_reminders", array(), 'time DESC', '*', 0, 1);
timewindowstart variable line:
$timewindowstart = $firstrecord->time + 1;
Changed the following if function in local_reminders_cron to the following:
if ($upcomingevents == false) { // no upcoming events, so let's stop.
mtrace(" [Local Reminder] No upcming events. Aborting...");
add_to_log(0, 'local_reminders', 'cron', '', $timewindowend, 0, 0);
add_flag_record_db($timewindowend, 'no_events');
return;
}
Added the following to the bottom of local_cron_reminders (before the add_to_log line)
add_flag_record_db($timewindowend, 'sent');
Added into lib.php:
function add_flag_record_db($timewindowend, $crontype = '') {
global $DB;
$newRecord = new stdClass();
$newRecord->time = $timewindowend;
$newRecord->type = $crontype;
$DB->insert_record("local_reminders", $newRecord);
}
Please note that add_to_log doesn't appear to work in moodle 3.0+ from what i have noticed and so that is obsolete
Finally go into your phpmyadmin or whatever database software you use and set up the following:
table name: yourmoodleprefix_local_reminders (in my case it is modl_local_reminders)
column name: id; type: bigint(10); auto increment
column name: time; type: varchar(16); null: no
column name: type; type: varchar(32); null: yes; default: null
If you don't want to do the last part i simply copied the structure of the database from version 1.4 onwards. If anybody would like a copy of my lib.php then i can send this over but as i say, the database table is just the same as version 1.4 onwards
[Local Reminder - ERROR] Error occured when initializing for event#[101] (type: group) Coding error detected, it must be fixed by a programmer: Invalid modulename parameter
[Local Reminder - ERROR] #0 /data/www_root/html/xxx/local/reminders/contents/group_reminder.class.php(60): get_coursemodule_from_instance('0', '0', '4')
Any ideas about how to remedy this? Thanks.
Which moodle version and plugin version you use? I believe it is somewhat older and we fixed it in the latest version.
(See this diff: https://github.com/isuru89/moodle-reminders-for-calendar-events/commit/9116a412a9c1e2cd9a8d8fc34fd4c75f381563d1#diff-91d5700bd6a6490b6f68e88225034bde)
Check whether the below shown condition is there with your plugin code. If not, you can add the line and verify it again.
https://github.com/isuru89/moodle-reminders-for-calendar-events/blob/master/contents/group_reminder.class.php#L58