New Guidance

This wiki document may be out of date - please check Options for Extending the Open edX Platform for newer information.

Introduction

This document describes the different options available to you to add a new feature to the edX platform.

Note: If you have not contributed to edX before, be sure to read this guide: Process for Contributing Code.

Decide where to host your code

The first thing you should decide is where you will host your new feature. There are five options to consider which are listed here in order of preference:

  1. Create a new XBlock in its own Git repository
  2. Create a new IDA (independently deployable application)
  3. Create a new Django app in its own Git repository
      • it provides new services that will be consumed by other parts of the platform
      • if it requires new UI for LMS or Studio, it provides it via extensions and does not introduce new URLs
        • See OEP-12 for the recommended way to add pluggable user interfaces
  4. Add a new Django app to the edX platform
  5. Update the platform directly

For more background when making this decision, see these architecture council meeting notes: 2015.09.23 - IDA discussion.


How to add a new XBlock in its own Git repository


How to create a new IDA

How to add a new Django app in its own Git repository

How to add a new Django app to the edX platform

These are the steps necessary for adding a new Django app-based feature, based on what was done to add the Teams feature to LMS.

  1. Create a new Django app, where all Python, mako and underscore templates, and JavaScript will live (note that there is an open story to allow sass files to also live in this app)
  2. Create your Python view code, urls.py file, and unit tests
  3. If you have JavaScript and underscore templates:
  4. Add the name of your app to OPTIONAL_APPS in lms/envs/common.py
  5. Add your urls to lms/urls.py, most likely behind a feature flag or configuration setting
  6. Write bok choy acceptance tests in common/test/acceptance to verify that your plugin is working.

How to update the platform directly

Implementing your new feature

Once you have chosen how to provide your new feature, you can add many different types of functionality: