-
Sub-task
-
Resolution: Fixed
-
Minor
-
1.9
-
None
-
Any
-
MOODLE_19_STABLE
-
MOODLE_19_STABLE
After some chat in HQ with Petr it seems that the role_unassign() function itself includes the necessary code to delete, for COURSE contexts, the associated user_lastaccess record if the user hasn't anymore the course:view capabilty.
But some sites can show orphan records that never are deleted from that funcion, so I would introduce one new iterator in cron.php in order to detect and delete all those orphan records from user_lastaccess.
Call this the ORPHAN_USER_LASTACCESS_PROBLEM from now. Patch attached. Requires approval, plz.
===
Patch applied and working.
- will be (partly) resolved by
-
MDL-11640 DIRTYCONTEXTS do not work in cron
-
- Closed
-