A library for tracking completion of blocks by learners in edX courses.

Django, edx
pip install edx-completion==4.2.0



PyPI CI Codecov Documentation Supported Python versions License

A library for tracking completion of blocks by learners in edX courses.


This repository provides a Django model BlockCompletion that is intended to be plugged into edx-platform. It provides various handlers and services for the recording of completion data. It also provides a DRF API for submitting completion data in batches.

Enabling in the LMS

By default, the Open edX LMS does not use this library. To turn it on, go to http://localhost:18000/admin/waffle/switch/ (substitute your LMS URL for http://localhost:18000/), and add a new switch with Name completion.enable_completion_tracking and Active selected.

See Completion Tool in the Open edX documentation for details on what will happen once enabled.


The code in this repository is licensed under the AGPL 3.0 unless otherwise noted.

Please see LICENSE.txt for details.

How To Contribute

Contributions are very welcome.

Please read How To Contribute for details.

Even though they were written with edx-platform in mind, the guidelines should be followed for Open edX code in general.

PR description template should be automatically applied if you are sending PR from github interface; otherwise you can find it it at PULL_REQUEST_TEMPLATE.md

Issue report template should be automatically applied if you are sending it from github UI as well; otherwise you can find it at ISSUE_TEMPLATE.md

Reporting Security Issues

Please do not report security issues in public. Please email security@edx.org.

Using with Docker Devstack

Prerequisite: Have your Open edX Devstack properly installed.

Note: When you see "from inside the lms" below, it means that you've run make lms-shell from your devstack directory and are on a command prompt inside the LMS container.

  1. Clone this repo into ../src/ directory (relative to your "devstack" repo location). This will mount the directory in a way that is accessible to the lms container.

  2. From inside the lms, uninstall completion and reinstall your local copy. You can just copy the following line:

    pip uninstall completion -y; pip install -e /edx/src/completion/
  3. Now, get your completion development environment set up:

    cd /edx/src/completion
    virtualenv completion-env
    source completion-env/bin/activate
    make install
  4. Don't forget to enable the waffle switch as described above in "Enabling in the LMS"

  5. That's it! In order to simulate a given tox environment (django18, django111, quality), run tox -e <env> for the env in question. If you want to run pytest directly:

    pytest completion/tests/test_models.py

Getting Help

Have a question about this repository, or about Open edX in general? Please refer to this list of resources if you need any assistance.