## General plugins (Local): Event Reminders

local_reminders
Automate sending reminders for calendar events.
Moodle 2.3

This plugin will automatically send reminders for Moodle calendar events in a timely manner via Moodle message interface. This plugin allows users to control how they receive messages for each event types in Moodle calendar.

### Contributors

Rossiani Wijaya: Mentor

• Mon, Jul 1, 2013, 12:11 PM
i guess the next question is When will the update be available for 2.5? in anticipation and thanks
• Mon, Aug 12, 2013, 1:50 PM
Hello!

This great plugin doesn't work at moodle 2.5.

I have created an issue here https://tracker.moodle.org/browse/MDL-41139.

Thanks
• Mon, Sep 23, 2013, 3:09 AM
Hi Isuru,
We are using 'reminders' wihtout problems.
However my 'customers' are asking me if there is any way to send remeinders only to selected roles. I.e. send to students but not to teachers?

Regards,

José Miguel
• Tue, Sep 24, 2013, 12:29 AM
Hi. Many thanks for sharing this very useful plugin with the community. We've been using it without issue up until late last week, when the following error started showing up in our cron output (the error effectively prevents the cron from completing):

Warning: Missing argument 6 for get_logs(), called in /var/www/moodle/local/reminders/lib.php on line 70 and defined in /var/www/moodle/lib/datalib.php on line 1945
[Local Reminder] This is the first cron cycle
[Local Reminder] Time window: Saturday, 21 September 2013, 5:19 PM to Monday, 23 September 2013, 5:19 PM
[Local Reminder] Found 17 upcoming events. Continuing...
[Local Reminder] Processing event#2405 [Type: due, inaheadof=1 days]...
[Local Reminder] Finding out users for event#2405...
[Local Reminders] host [ moodle.solihull.ac.uk ]
[Local Reminder] Starting sending reminders for 2405 [type: due]
[Local Reminder] All reminders was sent successfully for event#2405 !
[Local Reminder] Processing event#2436 [Type: due, inaheadof=7 days]...
[Local Reminder] No reminder is due in ahead of 7 for eventtype due [event#2436 is ignored!]...
[Local Reminder] Processing event#2461 [Type: due, inaheadof=1 days]...
[Local Reminder] Finding out users for event#2461...
[Local Reminders] host [ moodle.solihull.ac.uk ]
[Local Reminder] Starting sending reminders for 2461 [type: due]
[Local Reminder] All reminders was sent successfully for event#2461 !
!!! Error reading from database !!!
!! You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '{} m ON m.id = cm.instance

WHERE m.id = '105' A' at line 4
SELECT cm.*, m.name, md.name AS modname
FROM mdl_course_modules cm
JOIN mdl_modules md ON md.id = cm.module
JOIN {} m ON m.id = cm.instance

WHERE m.id = ? AND md.name = ?

[array (
0 => '105',
1 => '',
)]
!! Stack trace: * line 426 of /lib/dml/moodle_database.php: dml_read_exception thrown
* line 1023 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
* line 1382 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
* line 1551 of /lib/datalib.php: call to moodle_database->get_record_sql()
* line 2016 of /calendar/lib.php: call to get_coursemodule_from_instance()
* line 1940 of /calendar/lib.php: call to calendar_event->calculate_context()
* line 123 of /local/reminders/lib.php: call to calendar_event->__construct()
* line 532 of /lib/cronlib.php: call to local_reminders_cron()
* line 428 of /lib/cronlib.php: call to cron_execute_plugin_type()
* line 88 of /admin/cron.php: call to cron_run()
!!

For now, I've had to disable Reminders to ensure the cron completes successfully; however, I'd really like to restore its functionality if possible. If you have any ideas how I can resolve the above I'd be very grateful for your help.

Thanks.
• Fri, Nov 15, 2013, 5:44 PM
Reminer Plugin does not work with Moodle 2.5
• Wed, Dec 4, 2013, 1:04 AM
Our experience on a Moodle v2.5.1 site is that the cron is not able to process reminders for group events. Any suggestions? Here is what we get in cron:
Processing customized cron scripts ...Processing cron function for local_reminders...
... started 16:41:08. Current memory use 30.5MB.
[Local Reminder] Time window: Thursday, 28 November 2013, 12:44 AM to Wednesday, 4 December 2013, 2:41 AM
[Local Reminder] Found 1 upcoming events. Continuing...
[Local Reminder] Processing event#24 [Type: group, inaheadof=1 days]...
[Local Reminder] Finding out users for event#24...
!!! Error reading from database !!!
• Wed, Dec 4, 2013, 10:26 PM
Hi,

In group_reminder.class.php go to line 58.

change:
if (!empty($this->course)) { to if (!empty($this->course) && !empty(\$this->event->instance)) {

This should fix a bug when for some reason the event instance is empty.

hope it helps

regards

Mario

• Thu, Dec 5, 2013, 10:45 AM
Hi Mario/Mert,

Thanks for noticing this. I think there is an issue with database quering in Moodle v2.5 which some users have complained plugin is not working properly. I will look into this and soon I will be able to solve the problem.

Thanks again.
• Sat, Dec 7, 2013, 12:19 AM
Hi Mario, thank you for the suggestion - I will test it.
Hi Isuru, thank you for your response and for your work on the plugin.
• Sun, Dec 15, 2013, 2:27 AM
Hi Isuru -- Looking forward to a 2.6 release
• Thu, Jan 16, 2014, 3:05 PM
Hi Isuru,
Thanks for the plugin, it works great on Moodle 2.6 for me!

Is it, or would it be possible to have an option to send reminder to only those who not completed a task? My problem is that the email is sent out to everyone who has the task in the course, and if someone has completed a task and gets a reminder of it, that can be quite confusing for him/her.
• Wed, Feb 19, 2014, 7:14 PM
Hi Isuru,
Thank you for the pluging. it works perfectly but now when I execute the cron.php it gives mistake that it cannot write in the database. Without the pluging it works. I use moodle 2.4
I have activated the debuging and he says

Warning: Missing argument 6 for get_logs(), called in /var/www/moodle/local/reminders/lib.php on line 70 and defined in /var/www/moodle/lib/datalib.php on line 1945
[Local Reminder] This is the first cron cycle
[Local Reminder] Time window: dilluns, 17 febrer 2014, 11:58 to dimecres, 19 febrer 2014, 11:58
[Local Reminder] Found 3 upcoming events. Continuing...
[Local Reminder] Processing event#1989 [Type: due, inaheadof=3 days]...
[Local Reminder] Finding out users for event#1989...
[Local Reminders] host [ intranet.eina.cat ]
[Local Reminder] Starting sending reminders for 1989 [type: due]
[Local Reminder] All reminders was sent successfully for event#1989 !
[Local Reminder] Processing event#1997 [Type: due, inaheadof=3 days]...
[Local Reminder] Finding out users for event#1997...
[Local Reminders] host [ intranet.eina.cat ]
[Local Reminder] Starting sending reminders for 1997 [type: due]

Deleting and returning to install it returns to work but it can return to fail. Thank you very much,
• Mon, Apr 14, 2014, 6:42 AM
Hello and Thanks
maybe you can developed for modlee 2.6
Thanks
• Tue, Jun 24, 2014, 4:48 PM
I have installed it successfully, but how to test it. currently it is not sending any automatic mails....
• Fri, Jun 27, 2014, 10:49 AM
Great plugin, thank you. Is working in 2.6(.3), but we are looking to upgrade to 2.7 at the end of the year. What are the possibilities of this being ready for 2.7 by then? I am yet to test it in 2.7 but know our ICT guys will be hesitant to use it if it isn't 2.7 ready.
Thanks again. Great work.