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

Decrease WebService calls in course list/overview

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.4.0
    • 3.3.2
    • Courses
    • Hide
      1. In Moodle, create at least 2 courses and enrol some users in them. Enable and configure course completion for at least 1 course.
      2. In the app, open the Course Overview or My Courses.
      3. Open the Network tab from the inspector tools.
      4. Perform a PTR in the view. Check that only 3 WS calls are performed: get_users_courses, get_user_navigation_options and get_user_administration_options.
      5. Now click the kebab menu of a course that has completion enabled. Check that now another WS is called: core_completion_get_course_completion_status
      6. Now open any of the courses and perform a PTR in the section list. Check that only 3 WS calls are performed: core_course_get_contents and the options ones. Check that the options WS calls include all the user courses, not just the current one.
      7. Back in web, enable completion for a course that didn't have it.
      8. In the app, perform a PTR in the course list. After doing it, open the kebab menu of the modified course and check that now it displays the course completion option.
      Show
      In Moodle, create at least 2 courses and enrol some users in them. Enable and configure course completion for at least 1 course. In the app, open the Course Overview or My Courses. Open the Network tab from the inspector tools. Perform a PTR in the view. Check that only 3 WS calls are performed: get_users_courses , get_user_navigation_options and get_user_administration_options . Now click the kebab menu of a course that has completion enabled. Check that now another WS is called:  core_completion_get_course_completion_status .  Now open any of the courses and perform a PTR in the section list. Check that only 3 WS calls are performed:  core_course_get_contents and the options ones. Check that the options WS calls include all the user courses, not just the current one. Back in web, enable completion for a course that didn't have it. In the app, perform a PTR in the course list. After doing it, open the kebab menu of the modified course and check that now it displays the course completion option.
    • MOODLE_33_STABLE
    • MOODLE_34_STABLE
    • Moodle Mobile 3.4.0

      Right now when the course list or course overview is loaded we can perform a lot of WebService calls (at least 1 per course, core_completion_get_course_completion_status, but in older sites there can be several WS calls per course). We should try to improve this so these calls are only performed if the user clicks the kebab menu.

      Also, when the user performs a Pull To Refresh in one of these pages, we do 2 WebService calls per coursecore_course_get_user_navigation_options and core_course_get_user_administration_options. There should only be 1 call to each one of them with the whole list of courses. This happens because the handlers are reloaded when the data is invalidated (mmCoursesEventCourseOptionsInvalidated). Since this event is triggered before the controller has loaded the options for all the courses, each course loads its own options. 

            dpalou Dani Palou
            dpalou Dani Palou
            Pau Ferrer Pau Ferrer
            Juan Leyva Juan Leyva
            Berta Maroto Berta Maroto
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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