Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-85487

Assignment submissions page - call mod_assign_list_participants with onlyids

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 4.5.2
    • Assignment
    • 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.

       

            Unassigned Unassigned
            brian.winstead Brian Winstead
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 15 minutes
                15m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.