-
Bug
-
Resolution: Fixed
-
Minor
-
4.4.5, 4.5.2, 5.0
-
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.