Giter Club home page Giter Club logo

moodle-local_reminders's People

Contributors

abautu avatar cdsmith-umn avatar colin-umn avatar doiphode avatar isuru89 avatar jojoob avatar paulandm avatar rhea-astons avatar scottverbeek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

moodle-local_reminders's Issues

Different intervals for different activities

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)?

Add a task to clean reminder history

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.

Ability to change mail sent user through configurations

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.

Prevent status update if none of emails could sent at a run

Reproducible steps:

  • Go offline or block SMTP calls
  • Run the reminder cron
  • Verify the failure to send emails logs
  • Run the reminder cron again
  • No event reminders picked. No errors

Expected Result:

  • In a mail sending failure for all users, the state should not update as a successful run

Custom schedul not working

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

Digest emails for multiple events on same day?

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?

Release for 3.9?

Can this plugin be released for 3.9 or are there any important changes to the new Moodle version that prevents this?

Reminders are still sending when custom completion criteria has been assigned to an activity,

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.

calendar event reminders and disabled users

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 for Course Category events

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';

Postgres Count('x') Error - Invalid comparison operator

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.

Totara 11 fatal php error during unit test: Fatal error: Cannot declare class reminder, because the name is already in use in /var/www/site/lib/reminderlib.php on line 291

  1. Install a clean totara 11, and install this plugin. Check out the REMINDERS_34 branch.
  2. Run php admin/tool/phpunit/cli/init.php
  3. Run vendor/bin/phpunit
  4. After a few seconds you will see the error:

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.

Compatibility with Multi-language Content (v2) plugin

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!

Add ability to send out notifications after assignments' due date

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.

Cron Error

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

  • line 43 of /local/reminders/lib.php: call to message_send()
  • line 514 of /lib/cronlib.php: call to local_reminders_cron()
  • line 412 of /lib/cronlib.php: call to cron_execute_plugin_type()
  • line 85 of /admin/cron.php: call to cron_run()
    !!

Any ideas?

Disabling reminders for selected activities

Hello.

I am facing a problem with reminders settings.
The plugin settings are (in the section "Event reminders"):

  • local_reminders_noremindersforcompleted - checked
  • local_reminders_enableoverdueactivityreminders - checked
  • local_reminders_duesend - for closing and opening events
  • local_reminders_duerdays - 1 day checked
  • local_reminders_duecustom - not specified

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:

  • course events - checked
  • events - checked
  • group events - unchecked

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?

Improve reminder email style

The reminder email needs some styling to accommodate to modern web clients and styles.

  • Need to increase some paddings
  • Differentiate email header rows and contents

Access restrictions

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:

  • get_fast_modinfo($this->course, $userid);
  • get_availability_tree();
  • $tree->check_available(false, $this, $grabthelot, $userid);

Am I wrong or missing something out?
Is this feature planned?

Possible duplicate notifications caused by duplicate cron config

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.

Add timezone information to email

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

enable/disable per course

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.

Reminders/Information if Calendar entries are changed

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

Option to show/hide plugin name in reminder titles

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.

No reminders sent for group events

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.

Error on new M3.6 installation

Hi,

I'm installing the newest version 2020041200 on Moodle 3.6 with php 7.0 , and I'm getting this error when installing:

image

Thanks

Event reminders sent for individual quiz overrides

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:

  1. Enable reminders for Course Events
  2. Set up a quiz with a specified due date
  3. add an extension to a single user by going to Quiz administration > User Overrides
  4. When the cronjob runs, all course participants receive an reminder about "Override (Quiz closes)"

Interval customization per activity instance

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 day

Note: 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.

Emails being sent to suspended users

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.

Option to disable Event reminders for Big Blue Button meetings

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.

Push notification message content type is html

The reminder message sent for push notification is still going as an HTML. But it should be a plain text.

Root Cause:

  • When small event message is set, it still set with HTML message.

Fix:

  • It should be plain text.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.