eduNEXT Openedx extensions
Project description
Eox-core (A.K.A. Edunext Open extensions) is an openedx plugin, for the edx-platform that adds multiple API endpoints in order to extend the functionality of the edx-platform and avoid changing the base code directly. These API endpoints includes bulk creation of pre-activated users (for example, skip sending an activation email) and enrollments.
Usage
Create the oauth client at http://localhost:18000/admin/oauth2/client/add/, copy the client-id and client-secret.
Generate an auth-token using that client-id and client-secret:
$ curl -X POST -d "client_id=<YOUR_CLIENT_ID>&client_secret=<YOUR_CLIENT_SECRET>
&grant_type=client_credentials" http://localhost:18000/oauth2/access_token/
Use the token to call the API as you need:
# User creation API example
curl -X POST --header "Authorization: Bearer <YOUR_AUTH_TOKEN>" -H "Accept: application/json" \
http://localhost:18000/eox-core/api/v1/user/ --header "Content\-Type: application/json" \
--data '{"username": "jsmith", "email": "jhon@example.com", "password": "qwerty123",
"fullname": "Jhon Smith"}'
# Enroll api example
curl -X POST --header "Authorization: Bearer <YOUR_AUTH_TOKEN>" -H "Accept: application/json" \
http://localhost:18000/eox-core/api/v1/enrollment/ --header "Content-Type: application/json" \
--data '{"course_id": "course-v1:edX+DemoX+Demo_Course", "email": "edx@example.com",
"mode": "audit", "force": 1}'
Installation on Open edX Devstack
Install either the Ironwood or Juniper version of the Open edX devstack
Clone the git repo:
cd ~/Documents/eoxstack/src/ # Assuming that devstack is in ~/Documents/eoxstack/devstack/
sudo mkdir edxapp
cd edxapp
git clone git@github.com:eduNEXT/eox-core.git
Install plugin from your server (in this case the devstack docker lms shell):
cd ~/Documents/eoxstack/devstack # Change for your devstack path (if you are using devstack)
make lms-shell # Enter the devstack machine (or server where lms process lives)
cd /edx/src/edxapp/eox-core
pip install -e .
Dependency Management
EOX core now follows OEP-18 so the correct way to update dependencies is to run make upgrade inside your virtualenv.
Integrations with third party services
The plugin offers some integrations listed below:
Sentry: This service allows to track the errors generated on edx-platform. Check more details in https://sentry.io/welcome/. To enable the integration, follow the steps below:
Install the plugin with Sentry support (extras_require [sentry]).
Sign up/in to your sentry account and create a new Django application integration.
Get the DSN for your integration. This is an unique identifier for your application.
Setup the following configuration values for edx-platform:
EOX_CORE_SENTRY_INTEGRATION_DSN: <your DSN value> EOX_CORE_SENTRY_IGNORED_ERRORS: [] # optional
By default, EOX_CORE_SENTRY_INTEGRATION_DSN setting is None, which disables the sentry integration. EOX_CORE_SENTRY_IGNORED_ERRORS is optional. It is a list of the exceptions you want to ignore. For instance, it can be defined as:
EOX_CORE_SENTRY_IGNORED_ERRORS: [
'xmodule.exceptions.NotFoundError','openedx.core.djangoapps.user_authn.exceptions.AuthFailedError', ]
Course Management automation
This component allows Studio users to make changes in multiple courses, such as:
Add or remove staff/instructor users across multiple courses in one organization.
Change course settings in multiple courses at once.
Re-run a course across multiple organizations.
Compilation
We use webpack to bundle the React js application and its dependencies. To compile in a development environment, run this command on the root folder:
npm run build-dev
Otherwise, if you want to compile for use in production environment, run this command instead:
npm run build-prod
These commands are defined in the package.json file and each one exports two bundle files (build.js and course-management.bundle.css) inside of eox_core/static folder.
EOX core migration notes
Migrating to version 2.0.0
From version 2.0.0, middlewares RedirectionsMiddleware and PathRedirectionMiddleware are now included in this plugin. These middlewares were moved from the `eox-tenant`_ plugin.
if you installed eox-core alongside eox-tenant plugin, follow the steps below:
Upgrade eox-tenant to version 1.0.0 (previous releases are not compatible with eox-core 2.0.0)
Run the plugin migrations as indicated below:
$ python manage.py lms migrate eox_tenant --settings=<your app settings>
$ python manage.py lms migrate eox_core --fake-initial --settings=<your app settings>
In case eox-tenant is not installed on the platform, just run the eox-core migrations.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for eox_core-4.10.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ffa5eee3a8715f271f95e6b986ca35a78b6526ec7c6dc4dc3abef8492fcda82c |
|
MD5 | c53c9ab58c142b5abbb1359599772d12 |
|
BLAKE2b-256 | b7984d37cd5e30ca35efe0203825a7337e65afaa3ffb89b00242b55017fbd919 |