Event Reminders
Maintained by
Isuru Madushanka Weerarathna
This plugin will automate sending reminders for calendar events.
Comments
Comments are no longer open for new posts. Existing comments remain available to read.
Is this plugin working with Moodle 3.2+
Warning - The cron.php maintenance script has not been run for at least 24 hours.
The cron.php maintenance script assists some of Moodle's modules to perform tasks on a scheduled basis, such as mailing out copies of new forum posts. A mechanism is required to run the script regularly e.g. every 5 minutes.
In "local\reminders\contents\group_reminder.class.php" change load_course_object() to
private function load_course_object() {
global $DB;
$this->course = $DB->get_record('course', array('id' => $this->group->courseid));
if (!empty($this->course) && !empty($this->event->instance)) {
$cmx = get_coursemodule_from_instance($this->event->modulename, $this->event->instance, $this->group->courseid);
if (!empty($cmx)) {
$this->cm = get_context_instance(CONTEXT_MODULE, $cmx->id);
}
}
}
For some reason the event instance is null on group events so I added a check for ... && !empty($this->event->instance).
regards
Mario
Here is the cron output
[Local Reminder] Processing event#76 [Type: group, inaheadof=1 days]...
[Local Reminder] 0 0
[Local Reminder] Finding out users for event#76...
[Local Reminder - ERROR] Error occured when initializing for event#[76] (type: group) Coding error detected, it must be fixed by a programmer: Invalid modulename parameter
[Local Reminder - ERROR] #0 C:\wamp\www\moodle\local\reminders\contents\group_reminder.class.php(60): get_coursemodule_from_instance('0', '0', '9')
#1 C:\wamp\www\moodle\local\reminders\contents\group_reminder.class.php(43): group_reminder->load_course_object()
#2 C:\wamp\www\moodle\local\reminders\lib.php(366): group_reminder->__construct(Object(calendar_event), Object(stdClass), 1)
#3 C:\wamp\www\moodle\lib\cronlib.php(223): local_reminders_cron()
#4 C:\wamp\www\moodle\lib\classes\task\legacy_plugin_cron_task.php(163): cron_execute_plugin_type('local', 'local plugins')
#5 C:\wamp\www\moodle\lib\cronlib.php(75): core\task\legacy_plugin_cron_task->execute()
#6 C:\wamp\www\moodle\admin\cli\cron.php(61): cron_run()
#7 {main}
done. (20 dbqueries, 2.22 seconds)
Can you please help me out with as well.
Once I wrote how reminder time windows works with moodle cron jobs in here. See https://docs.moodle.org/dev/Email_reminders_for_calendar_events#Explanation.
Reminder is sent if only there is an event falls exactly within 1,3,7 ahead of days for the current cron time window. But as Zeid suggested, you have the option to select whether it is 1 or 3 or 7 days of ahead from the settings.
try setting up an event for longer hourrs... say set the event for 2 hours later and wait for it ... check if email settings are correct, if event reminder settings are correct... r you setting up a site event reminder, individual, or ggroup ?
After installing this plugin. Every time i run cron i get following response.
Processing cron function for local_reminders...
... started 18:13:05. Current memory use 57.2MB.
[Local Reminder] Time window: Wednesday, 4 January 2017, 5:45 PM to Wednesday, 4 January 2017, 6:13 PM
[Local Reminder] No upcoming events. Aborting...
done. (4 dbqueries, 0.06 seconds)
Though there are event scheduled. Please help me out with this.
Sorry for the late reply, but I was just busy in ahead of holiday season.
However I want to know some clarifications like how your students receive messages/reminders in your institute? (Email, SMS, Twitter, etc?)
I am asking this because, the plugin has tested for emails successfully and is working fine, but I haven't tested for sms or twitter.
Primary intention of this plugin was to enable reminder emails, but I would like to fix it if it is not working for other messaging outputs.
Also can you send me a sample message content one of your student received, because I can't see your uploaded screenshot.