Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disabling reminders for selected activities #89

Open
EvgLol opened this issue May 21, 2020 · 3 comments
Open

Disabling reminders for selected activities #89

EvgLol opened this issue May 21, 2020 · 3 comments

Comments

@EvgLol
Copy link

EvgLol commented May 21, 2020

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?

@isuru89
Copy link
Owner

isuru89 commented May 21, 2020

No. @EvgLol
If the configurations hit, then there will be a logging message in the corn log, something like here https://github.com/isuru89/moodle-reminders-for-calendar-events/blob/master/lib.php#L285

In your case, it is just the reminders is not found for the considering window
[Local Reminder] No upcoming events. Aborting...

It will pick up in the correct time window if you run this cron job continuously at intervals.
See how it works in this documentation
https://docs.moodle.org/dev/Email_reminders_for_calendar_events#Explanation

@EvgLol
Copy link
Author

EvgLol commented May 21, 2020

Ok. I understand about the time window.
This is not the problem.

The problem is why do I get both remindings? For the checked quiz and for the unchecked quiz?

@isuru89
Copy link
Owner

isuru89 commented May 22, 2020

Oh. I was referring to your log. Nevermind.

The # days configurations are unioned with global configs. For eg: if global settings have 1-day ticked, then there will be reminders 1 day advance for all activities regardless of the config in course level (checked or unchecked 1-day).

However as you say, if you have unticked enabled setting for that activity, then no reminders should be received. This was working well until recently. Let me double-check something that happened after fixing these issues recently. #84 #78

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants