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

issue #108: add realtime processing per rule #111

Merged
merged 1 commit into from
Sep 13, 2024
Merged

Conversation

dmitriim
Copy link
Member

@dmitriim dmitriim commented Sep 13, 2024

This MR adds realtime processing per rule.
If realtime processing disabled globally, then rules won't be processed realtime regardless of per rule settings and an admin will see notifications about that.

A new realtime field is set to 1 (enabled) by default to make sure that a new feature doesn't break current logic of the plugin.

image

image

image

@Fragonite
Copy link

Hi @dmitriim,

The changes look good but there is a potential issue.

I setup a real time rule with the requirement Users with Last name contains User which correctly matches my local admin user, but when I enabled the rule, the user was not added to the cohort until after I updated a random field on the profile page.

I would have expected the user to be added right after enabling the rule. Is this a bug or the intended behaviour?

Thanks.

@dmitriim
Copy link
Member Author

dmitriim commented Sep 13, 2024

@Fragonite assuming it was with real time enabled.
Rules are triggered either by event or by cron. In your case running cron after you enabled the rule would do the thing. Then you triggered user_updated event by updating user profile which triggered the rule. All works as expected.

@dmitriim dmitriim merged commit aed0dc5 into MOODLE_404_STABLE Sep 13, 2024
11 checks passed
@dmitriim dmitriim deleted the issue108-2 branch September 19, 2024 02:52
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

Successfully merging this pull request may close these issues.

2 participants