isuru89 / moodle-local_reminders Goto Github PK
View Code? Open in Web Editor NEWA Moodle local plugin for automating email reminders for calendar events
Home Page: https://moodle.org/plugins/local_reminders
A Moodle local plugin for automating email reminders for calendar events
Home Page: https://moodle.org/plugins/local_reminders
I use attendance plugin (mod_attendance) and I want to remind about the next session 1 day before, but for assign & quiz I want to remind students 3 days and 1 day before. If I set reminders for activities 3 days & 1 day before, I also receive reminder about session 3 days before (for attendance). Can I set intervals for different activities separately or remove some activities from reminders (for example, attendance)?
Currently local_reminders table is populating for each and every 15 mins (default) with a record. And this could actually clean after sometime.
Create a scheduled task to clean older table records.
Currently all reminder messages are sent in the name of 'admin' user.
But, this better be sending as 'no_reply' user in moodle, because it is right way to do.
User may choose from which user the messages should be sent in plugin settings page.
Reproducible steps:
Expected Result:
When plugin option 'Filter calendar events' has been set as to send only for visible events, still reminders are sent when event belongs to a hidden course.
This needs fixing to not to send reminders for hidden courses.
It seems 'visible' flag in event does not use anymore.
The option to set a custom scheduller is not working for me. Only works works with 1,3 and 7 days.
Plugin version 1.5 with moodle 3.3.2
In our Moodle installation, we have multiple events that show up on the same day - since each course has about 5 assignments per week.
We would like to be able to send out a digest email to students notifying them of these events, rather than to have 5 separate emails (which would get overwhelming quickly, especially if we sent reminders for both 3 days ahead of closing & 1 day ahead).
Is this a feature that already exists in your plugin? I would assume not, given its newness, but wanted to check.
If it doesn't currently exist, how difficult would it be to implement?
Can this plugin be released for 3.9 or are there any important changes to the new Moodle version that prevents this?
According to Dave Foord in this issue has been reported that reminders are still sending when assignment creator has set a custom completion criteria.
`Due date is enabled.
Grade is set to 'scale' with the scale being a 2 option scale of 'Not yet competence, Competent'
Grade to pass is set to 2 (e.g. if Competent is selected as the grade item'
Activity completion is set to 'Student must receive a grade to complete this activity'
The item shows up in the student's calendar as a 'course item'.
Within the general settings for the Activity Events Reminders.
'No reminders once completed' is ticked
'Activity Overdue Reminders' is ticked
'Activity Reminders' is set to 'Only for activity closing'
Send before is set to '3 days'
'Allowed roles' is set to 'Student'
'Enable for Calendar Change Events' is unticked.`
RCA:
We need to consider a different moodle completion_status
object to filter out in such case.
Reminders should be sent only to available courses.
See #26. Looks like this has come back in v2.2. Line https://github.com/isuru89/moodle-reminders-for-calendar-events/blob/master/lib.php#L87.
Since this is the old cron naming convention, this cron will be triggered both by the admin cron as well as the new scheduled task, causing duplicate mailings if they run close enough together.
We ran into an issue that crashed out the legacy cron task - it turned out a student in 2012 created a large number of calendar events which had dates in the future, the user has since left and been disabled but the calendar events are still present in the event table
The local_reminders cron task tried to retrieve the event information when iterating all the upcoming events, but crashed out on line 179 of /local/reminders/lib.php
$event = new calendar_event($event);
as the query for user context in calendar_event returned nothing when trying to find this users user_id and disabled=0
not sure if some error checking for a valid enabled user is supposed to be done before calling for a new calendar_event, or if this is a uncaught exception in the calendar_event routine.
It should be reproducible by creating an event as a user and then disabling them.
Missing translation causes error when opening yourmoodle.site/message/notificationpreferences.php page. I suggest to add the following to lang/en translation file.
$string['messageprovider:reminders_coursecategory'] = 'Reminder notifications for Course Category events';
Hello,
The following error apperaed in my postgres 9.6 DB when executing
Clean Local Reminders Logs scheduled task
ERROR: operator does not exist: character varying >= integer at character 55
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
STATEMENT: SELECT COUNT('x') FROM mdl_local_reminders WHERE time >= 1611850862
The function clean_local_reminders_logs function around line 520
$recordcount = $DB->count_records_select(REMINDERS_CLEAN_TABLE, "time >= $cutofftime");
as well as
$deletestatus = $DB->delete_records_select(REMINDERS_CLEAN_TABLE, "time < $cutofftime");
are affected.
I wonder why you have chosen character type for the time column of th elocal_reminders db. It is a unix timestamp. Why not assign it INT or BIGINT.
Short of that, i believe the following will fix the error without modifying the db structure of the local_reminders table:
$recordcount = $DB->count_records_select(REMINDERS_CLEAN_TABLE, "time >= '$cutofftime'");
as well as
$deletestatus = $DB->delete_records_select(REMINDERS_CLEAN_TABLE, "time < '$cutofftime'");
I am not sure how this will affect other databases - mysql etc.
php admin/tool/phpunit/cli/init.php
vendor/bin/phpunit
Fatal error: Cannot declare class reminder, because the name is already in use in /var/www/site/lib/reminderlib.php on line 291
The problem is that unlike moodle, totara has a class called reminder as well, in lib/reminderlib.php.
Looks like this is a problem across all totara and plugin versions, since the plugin and totara both declare this class in most versions.
Will need to change this class name.
The following error appears on execution of the /admin/cli/cron.php script with local_reminders installed under Moodle version 2.8:
Undefined property: stdClass::$groupmembersonly in /var/www/html/moodle/local/reminders/lib.php on line 280
The groupmembersonly
setting was just experimental and was removed in 2.8:
Great plugin, it really has helped us manage and automate email notifications for course events from Moodle itself. We're facing one little detail though: our courses are often bilingual, which is why we use the Multi-language Content (v2) plugin. However, in the 'Course' field of the notification messages, the course name appears with the language tags, like this:
{mlang other}Strengthening Project Planning and Implementation{mlang}{mlang fr,fr_ca}Renforcer la planification et la mise en œuvre de projets{mlang}
Is there any way we can avoid this, e.g. by customizing the fields that appear in the email notification? Or could you work on compatibility with the multi-lang filter plugin for future releases?
Thanks in advance!
Getting a warning for 'coursecat' being deprecated but it is still used in locallib.php
We have a strong need at my college (City Vision College) to be able to send out reminders to students who have not yet submitted assignments after the assignments' due date, so that they will not lose points for late submission.
How difficult do you think it would be to implement this as a feature? I imagine it could just check for the assignments on the calendar, but then send out the notification only if there wasn't yet a record in the assignment_submissions table.
I may be implementing this soon, although I would need more familiarity with the code, but was curious if this was something you would consider.
Hi isuru89,
Just accidentally stumbled across this plugin. This is going to be a great addtion to moodle.
I tried running it on Moodle 2.2.2 and received this message:
Processing customized cron scripts ...Processing cron function for local_reminders...
Notice: Undefined property: stdClass::$smallmessage in /var/www/moodle222/lib/messagelib.php on line 93
!!! Coding error detected, it must be fixed by a programmer: Could not load preference popup_provider_local_reminders_reminders_permitted. Does the component and name you supplied to message_send() match a row in message_providers? Message providers must appear in the database so users can configure how they will be notified when they receive messages. !!!
!! blah !!
!! Stack trace: * line 133 of /lib/messagelib.php: coding_exception thrown
Any ideas?
If a location has been specified for an event, it should include in the reminder email
The plugin should support enabling/disabling reminders, temporarily, using settings under the course.
The objective is to use course reminder settings to enable/disable the upcoming event's reminders individually.
Hello.
I am facing a problem with reminders settings.
The plugin settings are (in the section "Event reminders"):
So. When I create 2 quizes in a course and then setup reminders in this course I want to get reminders about quiz1 and do not want to get reminders about quiz2.
So for the reminders in the course I disable all the checks for quiz2 ("enabled", "1 day" and "overdue" are unchecked).
And for quiz1 I keep all the checks as is.
The rest settings for the course reminders are:
So, whe cron starts local reminders task I get reminders for both quizes (quiz1 and quiz2).
And the log says:
Execute scheduled task: Local Reminders (local_reminders\task\send_reminders)
... started 11:20:06. Current memory use 40.3Мбайт.
[Local Reminder] Time window: Четверг, 21 Май 2020, 11:20 to Четверг, 21 Май 2020, 11:20
[Local Reminder] No upcoming events. Aborting...
[LOCAL REMINDERS] Overdue Activity Reminder Cron Started @ 1590049206
[LOCAL REMINDERS] No expired events found for this cron cycle! Skipped.
... used 6 dbqueries
... used 0.024744033813477 seconds
Scheduled task complete: Local Reminders (local_reminders\task\send_reminders)
It seems to me, that only global module setting is considered. Because if I uncheck "1 day" in the plugin settings (/admin/settings.php?section=local_reminders), reminders are not sent.
Is the setting for particular course activity being ignored?
The reminder email needs some styling to accommodate to modern web clients and styles.
Hello.
Thanks for this useful module.
Are the access restrictions of a particular activity considered while sending reminders?
F.e. I create a quiz which will be visible (accessible) to students only when certain conditions are satisfied (F.e. completion of a previous level quiz).
It seems to me, that none of the completion criteria are checked before sending a reminder message.
Student gets a reminder message with a link. Clicking on the link leads him to a course module which is hidden by access restrictions.
I did not find any functions which check availability for the user in local_reminders:
Am I wrong or missing something out?
Is this feature planned?
Hi there!
It looks like when the new scheduled task code was added, the name of the function was not changed from local_reminders_cron (https://github.com/isuru89/moodle-reminders-for-calendar-events/blob/master/lib.php#L70). That is causing it to be called by the admin cron, as well as the new scheduled task and can lead to duplicate notifications since the cron locks would not work when being called in two different ways.
I see someone else has reported a similar issue here https://tracker.moodle.org/browse/CONTRIB-3647.
When a user recieved an email, the time is in his/her timezone without any indication of it.
It is better to add timezone name (Asia/Japan
, America/Los_Angeles
etc) to indicate the time has already converted to proper timezone in-front-of each time row.
Also better to have human readable timezone names than system timezone names
Is it possible to implement a per course enable/disable setting? Where is the right place to start with this?
I would be happy about any hint and look forward to contribute.
Currently, readme file is just a text file.
It should change to a markdown file so that formatting can be done easily.
Currently, reminders are allowed to customize only for activities (the type of due
).
However, we can extend this same customizability to course events as well.
Reproducible Steps:
Expected: Should not send reminders for disabled course event
Actual: reminder mails are still sending for disabled course event
Currently, when sending a reminder for an assignment, we don't consider whether the receiving user actually has the capability to submit the assignment.
This should be fixed with v2.0 after the refactoring.
I have the requirement that permitted roles are informed, if calendar entries are changed by the responsible users in Moodle.
So I ask for this change-request. Maybe, we can pay for it, if you integrate it in your plugin. So let me know, what you think :-)
Andreas
Currently, we append plugin name to the reminder message title which could be ugly with the increasing support for third party modules.
Hence there should be a global option to control whether to show or hide module name in the title.
Hi,
when opening the admin settings page of your plugin I get the follwing notices:
Notice: Undefined index: v in /var/www/html/moodle/lib/adminlib.php on line 3443
Notice: Undefined index: u in /var/www/html/moodle/lib/adminlib.php on line 3443
Kind Regards,
Kathrin
I've encountered the same exception another user documented here:
\www\moodle\local\reminders\contents\group_reminder.class.php(59): get_coursemodule_from_instance('0', '0', '9')
#1 \www\moodle\local\reminders\contents\group_reminder.class.php(42): group_reminder->load_course_object()
#2 \www\moodle\local\reminders\lib.php(365): group_reminder->__construct(Object(calendar_event), Object(stdClass), 1)
...
After debugging the issue, I only saw now that you already fixed this in this commit. Would be great if this could be released.
On Moodle 2.8.6, event reminders work as expected, except that a reminder is being sent to all course participants when a single student receives an override extension for a quiz. The expected behaviour is that only the student who has received the extension override gets the reminder (Or none at all).
Steps to reproduce:
There is a new event type of course category targetted.
We should send reminders for those event types as well.
Currently, activity-specific settings support below options for each activity.
Enabled
Overdue enabled
This can be extended to support a customizable schedule as well. Such as new options will look like,
Schedule
: [x] 7 days [x] 3 days [x] 1 dayNote: Schedule
option will enable only if Enabled
is checked. Also when an option is disabled at plugin global settings, that option will disable here too.
At the moment, if a user is manually enrolled on the course, but their enrolment is suspended, it still sends an email notification to them, even though they are suspended. It would better not to send the email to suspended users.
Steps to test.
Create a course, enrol 5 users A,B,C,D and E
Create a course event and check that all get email.
Create an event in the future.
Suspend A at course level.
Check that the other 4 get emails, but A doesn't.
Create an event in the future.
Suspend B at course level.
Check that C,D and E get emails, but A & B don't.
Create an event in the future.
Unsuspend A and B, check that they do now get the emails.
Hello I receive a cron error, I correctly configured the re-hook, because previously it worked as I configured it, what I did was create a course again, and did the same process, I managed to send the emails that were stuck, what is the reason for that cron error: Could not find completion record to update to full status - User ID: 34, cmid: 70 - Recreating record.
There is currently an issue where the Big Blue Button plugin doesn't record its events in the standard format, which resulted in incorrect reminders going out to the wrong people. Update 2.2. to this plugin gives the option to turn off the big blue button event reminders on an event by event basis, but what would be ideal is the ability to either turn off all big blue button reminders at ideally course level or if this isn't possible, turn them off at site level.
Currently, BigBlue Button activities are added to the event table as meeting_start
event type.
This should be addressed so that users can customize reminders for those events as well.
The reminder message sent for push notification is still going as an HTML. But it should be a plain text.
Root Cause:
Fix:
There is a well established pattern for the naming of repos for moodle plugins which is 'moodle-frankenstyle'. There is no downside to renaming a git repo, github gracefully manages redirects and still honors the old git urls for pulls so everything keeps working.
It should be located here:
When no-reply address is set, still mails are sending using site admin's user name.
Currently there are many warnings in the codebase regarding best practices of php (styling + documentation)
Need to fix those
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.