Efficient way to check if course is completed (all units visited) in Open edX?

Hi everyone,

I want to show courses as “Completed” or “In Progress” on the dashboard based on whether a learner has visited all units in a course. What’s the best and most optimized way to check course completion (i.e., all course units visited)?

Ideally, I’d like to avoid expensive queries or tracking every single unit manually.

Thanks in advance!

As far as I know, the only way would be to use openedx-completion-aggregator which is our plugin that maintains the overall completion percentage in the database (at the course level and at other levels like per section).

Unless you’re issuing certificates or something like that, in which case you can check if a certificate has been issued and base it on that.

I’ve installed the openedx-completion-aggregator plugin to power course and chapter-level progress tracking.

Everything is mostly working, but I’ve hit a confusing issue:


:white_check_mark: When I add new sections/units to a course in Studio, the MFE (Micro Frontend) correctly shows the course progress percentage going down, as expected.

:cross_mark: But the /api/completion/v1/course/<course_key>/ endpoint still returns the old progress (e.g., 100%), even though the course content has increased.

If you have successfully installed the aggregator package, you can call the aggregator API:
https://<domain_name>/completion-aggregator/v1/course/
https://<domain_name>/completion-aggregator/v1/course/{course_key}

If it still returns incorrect progress, you can try running the following commands to resolve the issue:

Access the LMS environment
tutor local exec lms bash

Run the aggregator service
./manage.py lms run_aggregator_service

This should help address any progress-related discrepancies.