Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.8.2, 1.9
-
Fix Version/s: 1.9
-
Component/s: Roles / Access
-
Labels:None
-
Affected Branches:MOODLE_18_STABLE, MOODLE_19_STABLE
-
Fixed Branches:MOODLE_19_STABLE
Description
The bit in cron that uses CFG->longtimenosee to unenrol people who haven't been there for a long time was not quite working correctly.
1) get_users_longtimenosee was indexing the array on userid, which meant multiple old enrolments were being combined into one entry that missed some
2) entries where timeaccess was zero was not beng deleted ever
This means that user_lastaccess and role_assignments were growing with uneccessary entries, to the point where memory limits were reached and in the end NO unenrolments were happening at all.
On top of this:
3) The function should probably use get_recordset to avoid the memory thing totally.
Issue Links
| This issue will help resolve: | ||||
| MDLSITE-231 | users don't unenroll automatically |
|
|
|
| This issue has a non-specific relationship to: | ||||
| MDL-11487 | Save some bits in the cron execution... |
|
|
|
1 and 2 are fixed