Bridge for Adaptivity
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Bridge for Adaptivity

Build Status Maintainability


An application that interfaces with an adaptive engine to dynamically serve content in MOOCs based on real time student activity.

The ALOSI adaptivity ecosystem

The Bridge for Adaptivity is designed to work with three external systems to enable adaptivity in a course. These are:

  • LMS (Learning Management System), for example edX, Open edX, Canvas or other LTI consumers
  • Content Source - contains the content (problems, html content) to serve dynamically. Examples of a content source system might be Open edX or other LTI providers.
  • Adaptive Engine - Provides activity recommendations based on student activity. An example of an adaptive engine application is the ALOSI adaptive engine. System architecture

More information

Visit our github wiki or the ALOSI Labs site for more information about our group and our work.

Containers list

  • Container with Bridge for Adaptivity application

  • Container with postgressql database

  • Container with celery worker

  • Container with rabbitmq message queue

  • Container with nginx (doesn't exist for local deployment)

Getting started


Deployment is based on the Docker containers. There are two config files docker-compose_local.yml and docker-compose.yml for local and production deployments respectively.

Docker and Docker Compose are required to be installed before start the deploying.

Clone project.

Before running deployment configure settings in the bridge_adaptivity/config/settings/ directory (see

Local deployment

Local deployment can be started by the docker-compose up command in the console:

[sudo] docker-compose -f docker-compose_local.yml up

Volume "pgs" is added to the the database container.

Note: Development server available on localhost:8008

Running tests

You can run tests locally (directly on your host), or on the docker machine.

  • to run tests locally:
    • install requirements with command pip install -r requirements_local.txt
    • run tests: python test --settings config.settings.test or just pytest. Both commands are equal.
  • to run tests in docker container:
    • create docker container: docker-compose -f docker-compose_local.yml up -d
    • run tests: docker exec -it BFA_local pytest
      • if you see an error:
        import file mismatch:
        which is not the same as the test file we want to collect:
        HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules
        you should run: find . | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf and after that retry running the tests: docker exec -it BFA_local pytest

Staging deployment

Please ensure that file in nginx/sites_enabled/bridge-stage.conf exists and is configured in proper way.

Run docker-compose up command with docker-compose-stage.yml file to start staging deployment:

[sudo] docker-compose -f ./docker-compose-stage.yml up

Production deployment

Please ensure that file in nginx/sites_enabled/bridge.conf exists and is configured in proper way.

Run docker-compose up command with default docker-compose.yml file to start production deployment:

sudo docker-compose up -d

Additional notes

  • if requirements changes were made containers rebuilding needed:


[sudo] docker-compose -f docker-compose.yml build


[sudo] docker-compose -f docker-compose_local.yml build