Details
-
Type:
Sub-task
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.9
-
Fix Version/s: 1.9
-
Component/s: Roles / Access
-
Labels:None
-
Affected Branches:MOODLE_19_STABLE
-
Fixed Branches:MOODLE_19_STABLE
Description
I have a global teacher assigned. In one of the courses, there are 400 students.
When the teacher tries to view the participants list, it takes a long time to load (loads ok) and I see
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 6815786 bytes) in Unknown on line 0
At the bottom of the page. When logging in as admin and viewing this participants list, I have no problem. I checked the SQL log, apart than seeing all the user level context paths gets updated every time, I do not see anything strange going on.
Just pushed out a commit that might fix this problem by joining the participants against context, and saving the get_context_instance() calls. But I could not repro the insane memory usage you are seeing, even with a couple hundred students, so I am not 100% positive that I've nailed the problem you saw. And the "full" participants view is really bad in terms of DB usage.
BTW, the whole participants list needs a full rewrite to do smarter SQL, have better abstraction, and display more interesting data (RA locality, RA plugin, etc). Not before the merge, but I'll try to get time to do one late in the 1.9 series.