Open edX Enterprise
edx-enterprise is a core Django application that provides enterprise-level features to the Open edX platform. It enables functionalities for Enterprise Customers, allowing organizations to manage and track learner engagement with courses. The library is typically installed as part of an Open edX instance and is currently at version 7.0.4, with frequent patch releases and major versions updating every few months.
Common errors
-
404 error when accessing the learner portal
cause Learner account not assigned a required license or code from the admin dashboard, or browser-related issues (e.g., cache, disabled JavaScript/cookies, ad blockers).fixVerify the learner's permissions and license assignment in the Open edX admin portal. Advise learners to clear their browser cache, ensure JavaScript and cookies are enabled, disable browser extensions, or try a different browser. -
Uh oh, we are having some server issues.. (general Open edX server error)
cause Often indicates underlying configuration issues within Open edX, such as JSON syntax errors in environment configuration files (`/edx/app/edxapp/*.json`), incorrect file permissions, or failed services related to the edx-enterprise integration.fixCheck detailed logs in `/edx/var/log/lms/edx.log` and `/edx/var/log/cms/edx.log` for specific error messages. Validate JSON configuration files for syntax. Restart all Open edX services (`sudo /edx/bin/supervisorctl restart all`) and ensure sufficient disk space. -
ModuleNotFoundError: No module named 'enterprise'
cause The `edx-enterprise` Python package is not installed in the active Python environment for Open edX, or the 'enterprise' Django app is not correctly configured in `INSTALLED_APPS` (more common in older versions).fixEnsure `edx-enterprise` is installed: `pip install edx-enterprise`. If on an older Open edX version, confirm `'enterprise'` is present in the `INSTALLED_APPS` setting in your `lms/envs/common.py` and `cms/envs/common.py` files, and then run `python ./manage.py lms migrate enterprise`.
Warnings
- breaking Version 7.0.0 of edx-enterprise dropped support for Python 3.11. Users must upgrade their Python environment to 3.12 or later when upgrading to edx-enterprise v7.0.0+.
- breaking In v7.0.4, SAML views now require the `enterprise_customer_uuid` query parameter instead of `enterprise-id`. Existing integrations relying on `enterprise-id` will break.
- gotcha Prior to edx-enterprise v6.8.0, the 'enterprise' app needed to be manually added to `INSTALLED_APPS` in Django settings. Failure to do so would prevent the app from loading.
- gotcha The `edx-enterprise` app is tightly coupled with `edx-platform`. Direct modifications to core edx-platform modules that interact with enterprise functionality can lead to unintended side-effects and make future upgrades difficult.
Install
-
pip install edx-enterprise
Imports
- EnterpriseCustomer
from enterprise.models import EnterpriseCustomer
- EnterpriseCatalogView
from enterprise.api.v1.views import EnterpriseCatalogView
- constants
from enterprise import constants
Quickstart
echo "Ensure 'edx-enterprise' is in your Open edX Python environment (e.g., via requirements/base.txt)" # For Open edX versions 6.8.0 and later, the app is automatically appended to INSTALLED_APPS upon installation. # For older versions (pre-Ficus, pre-6.8.0), you might need to manually add 'enterprise' to INSTALLED_APPS in your Django settings. # Run database migrations to apply any schema changes for edx-enterprise. # This command is typically run from the edx-platform's virtual environment. python ./manage.py lms migrate enterprise python ./manage.py cms migrate enterprise # Access the Enterprise Admin Interface: # Navigate to $LMS_SERVER_ADDRESS/admin/enterprise/ in your browser.