Synchronize the role assignments of the cohort - cohort_role_sync

Re: Synchronize the role assignments of the cohort - cohort_role_sync

by Randy Thornton -
Number of replies: 2
Picture of Documentation writers
This is your clue: "User ID does not exist or is deleted!" So, it is trying to process a user in a cohort whose id is not there any more.

So, if you turn on cron debugging, then you should be able to get the details of exactly which user that is and take a look into fixing it. See the documentation on Debugging for how to set up the cron debugging output: https://docs.moodle.org/310/en/Debugging
Average of ratings: Useful (1)
In reply to Randy Thornton

Re: Synchronize the role assignments of the cohort - cohort_role_sync

by SUNRISER SETH -
How can I find the "userid= number->xy" to delete it's reference in Moodle/DB?
The user IS deleted by an Anonimity Plugin, but the reference at it is saved somewhere in MySQL DB and every task that runs "cohort_role_sync" gave the error that I pasted above.
In reply to SUNRISER SETH

Re: Synchronize the role assignments of the cohort - cohort_role_sync

by Randy Thornton -
Picture of Documentation writers
When you "delete" a user in Moodle, it sets the value in the "deleted" column in the user table to 1. All the various processes in Moodle then know to skip this user as deleted. Not all the user data is actually deleted, but some may be retained. In any case, it will not throw any errors for standard Moodle.

I do not know of a plugin by that name, but that's where the trouble lies. If it actually removed the user from the table but did not clean up all the references to the user in other places, then it did a bad job, since clearly there are still references to it in the cohort members lists.