richie can be connected to one or more Learning Management Systems (LMS) like OpenEdx, Moodle
or Canvas for a seamless experience between browsing the course catalog on
richie and following
the course itself on the LMS.
In order to connect
richie with a LMS, there is an API bridge
to synchronize course information and enrollments.
APIHandler utility acts as a proxy that routes queries to the correct LMS backend API,
based on a regex match on the URL of the course.
For information about how to generate an API access on your OpenEdx instance, refer to the documentation.
We have to implement several interfaces to be compatible to OpenEdx API:
openedx-dogwood has been tested with Dogwood and Eucalyptus versions.
openedx-hawthorn has been tested with Hawthorn and Ironwood versions.
If you encounter an issue with these API interfaces or need to have a new interface, propose a PR
or create an issue on our repository
Connecting Richie and OpenEdx over TLS
About the default configuration, if you check
RICHIE_LMS_BACKENDS settings in
you will see that we use
In fact, this base backend uses session storage to fake enrollment to course runs.
Maybe are you asking why? Because, to make Create/Update/Delete requests from an external domain, OpenEdx requires the use of a CORS CSRF Cookie. This cookie is flagged as secure, that means we are not able to use it without a SSL connection.
So if you need to use the OpenEdx API to Create, Update or Delete data from Richie, you have to enable SSL on Richie and OpenEdx on your development environment. So we need a little bit more configuration. Below, we explain how to serve OpenEdx and Richie over SSL.
Run OpenEdx and Richie on the same domain
Richie and OpenEdx must be on the same domain to work properly (Cookie security policy blocks
secure cookie sharing on localhost) To do that you have to edit your hosts file
/etc/hosts on a *NIX system) to alias a domain
edx to localhost:
If you want to develop with OpenEdx as
RICHIE_LMS_BACKENDS of Richie, you need to enable TLS for your
development servers. Both Richie and OpenEdx use Nginx as reverse proxy that ease the SSL setup.
1. Install mkcert and its Certificate Authority
First you will need to install mkcert and its Certificate Authority. mkcert is a little util to ease local certificate generation.
mkcert on your local machine
b. Install Mkcert Certificate Authority
If you do not want to use mkcert, you can generate CA and certificate with openssl. You will have to put your certificate and its key in
docker/files/etc/nginx/ssldirectory and named them
2. On Richie
To setup SSL conf with mkcert, just run:
If you do not want to use mkcert, read instructions above to generate Richie certificate then run
3. On OpenEdx
In the same way, about OpenEdx, you also have to update the Nginx configuration to enable SSL. Read how to enable SSL on OpenEdx.
Once this has been done, the OpenEdx app should respond on https://edx.local.dev:8073 and Richie should respond on https://richie.local.dev:8070 and should be able to share cookies with OpenEdx to allow CORS CSRF Protected XHR requests.
4. Start Richie and OpenEdx over SSL
You need to follow these steps once. If you want to use SSL later, just use
make run-ssl to run
OpenEdx and Richie apps.
Of course, you can still run apps without ssl by using