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

Make sure that the scheduled task really updates all cohorts #38

Open
abias opened this issue Nov 30, 2021 · 1 comment
Open

Make sure that the scheduled task really updates all cohorts #38

abias opened this issue Nov 30, 2021 · 1 comment

Comments

@abias
Copy link
Member

abias commented Nov 30, 2021

It has been reported outside Github that the scheduled task apparently does not update all existing cohorts / rules for all users. There may be cases when a user's profile field value is changed, his cohort memberships are not updates until his next login even though the schedule task runs properly in the meantime.

This behaviour should be investigated.

@christianabila
Copy link

The scheduled task update_cohorts only runs, if changes to the profile cohort form have been made (based off c9ffb35)

  • local/profilecohort/classes/profilecohort.php:413
  • local/profilecohort/classes/task/update_cohorts.php:50

I guess it's a safeguard for performance reasons?

Also, in the case of auth_db, user update events are suppressed in the core code https://github.com/moodle/moodle/blob/main/auth/db/auth.php#L395 - so automatic updates to the cohorts are not done at all.

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