-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
4.5.2
-
MOODLE_405_STABLE
Clicking on the Submissions tab of an assignment makes a web request to the function mod_assign_list_participants with the parameters assignid, groupid, and filter. By default, filter is empty. If the assignment is not using group mode, the function returns a list of all users in the course. The data set returned includes the users' full profile, including any custom user fields, and a list of all of the users' other enrollments.
If there are numerous users enrolled in the course and those users have many other enrollments, it is possible that the data set to be returned is so massive that it fails. When this happens it leaves a lock on the session. As a result, any subsequent requests which would require a write to session time out because of an inability to obtain a lock on the session.
Conversely, when clicking the "Grade" button on the assignment, the function mod_assign_list_participants is called with an additional parameter "onlyids=true". With this parameter applied, custom user profile fields and the list of the user's other enrollments are not included in the result set. The request completes very quickly.
The suggestion is to add the onlyids=true parameter to the mod_assign_list_participants request when clicking on the Submissions tab as the additional information (custom user profile fields, enrollments) seems unlikely to be of any value on that page. The page would load more quickly and with less risk of locking the session with a failed request.