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

get_course_progress_percentage function not performing well in courses with many modules

XMLWordPrintable

    • 3
    • WP Sprint 2024-I4.2 (Clones), WP Sprint 2024-I4.3 (Clones)

      When calling the `get_course_progress_percentage` function in courses with many modules, aiming to get the percentage of the course completed by a given user, we call the `get_data` function of the `completion_info` class for each module that supports completion, this function performs some queries and returns information related to completion data in addition to other data, however, we only need to know if the module was completed or not.

      In cases where we need to find the progress percentage of several users who are enrolled in courses with different modules, this function executes the same query several times to obtain this percentage. Calling an aggregate function would be a better solution to obtain this information.

            pedro.jordao@moodle.com Pedro Jordao
            pedro.jordao@moodle.com Pedro Jordao
            Carlos Castillo Carlos Castillo
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 week, 3 days, 4 hours, 19 minutes
                1w 3d 4h 19m

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