Uploaded image for project: 'Moodle app'
  1. Moodle app
  2. MOBILE-2900

Exclude enrolledusercount from enrol_get_users_courses web service call

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Critical
    • Resolution: Done
    • Affects Version/s: 3.6.1
    • Fix Version/s: 3.7.0
    • Component/s: Web Services
    • Labels:
    • Testing Instructions:
      Hide

      Test on a device with remote debugging enabled.

      • Access a 3.7 site with a user that is enrolled in some courses.
      • Open the Chrome Development tools and filter the XHR requests.
      • Refresh the dashboard.
      • In the Development tools, find the WS call to "core_enrol_get_users_courses".
      • Check that the parameter "returnusercount" is passed with value "0".
      • Check that the response does not contain the field "enrolledusercount" in courses.
      • Access a 3.6 site with a user that is enrolled in some courses.
      • Check that the list of courses is displayed as usual.
      Show
      Test on a device with remote debugging enabled. Access a 3.7 site with a user that is enrolled in some courses. Open the Chrome Development tools and filter the XHR requests. Refresh the dashboard. In the Development tools, find the WS call to "core_enrol_get_users_courses". Check that the parameter "returnusercount" is passed with value "0". Check that the response does not contain the field "enrolledusercount" in courses. Access a 3.6 site with a user that is enrolled in some courses. Check that the list of courses is displayed as usual.
    • Affected Branches:
      MOODLE_36_STABLE
    • Fixed Branches:
      MOODLE_37_STABLE
    • Pull Master Branch:
    • Sprint:
      Moodle App 3.7.0

      Description

      As explained in MDL-64886, the call to enrol_get_users_courses to load the course overview currently counts the users on the course, which can hurt performance with large courses.  Since this is count is not used in the app, we should add {"returnusercount": false} to the parameters for this web service call in src/core/courses/providers/courses.ts::getUsersCourses

       

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  7/Jun/19