Skip to content

Commit

Permalink
🔖(chore) bump version to 2.0.1
Browse files Browse the repository at this point in the history
Fixed

- Deprecate `JS_SELECTOR_REGEXP`
  • Loading branch information
jbpenrath committed Jan 11, 2021
1 parent 2ce9dfa commit 9a3e61a
Show file tree
Hide file tree
Showing 7 changed files with 131 additions and 6 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Versioning](https://semver.org/spec/v2.0.0.html).

## [Unrealeased]

## [2.0.1] - 2021-01-11

### Fixed

- Deprecate `JS_SELECTOR_REGEXP`
Expand Down Expand Up @@ -1142,7 +1144,8 @@ us:
- finish integrating the missing pages and improve the sandbox environment;
- test and polish the use of richie as a django app / node dependency.

[unreleased]: https://github.com/openfun/richie/compare/v2.0.0...master
[unreleased]: https://github.com/openfun/richie/compare/v2.0.1...master
[2.0.1]: https://github.com/openfun/richie/compare/v2.0.0...v2.0.1
[2.0.0]: https://github.com/openfun/richie/compare/v2.0.0-beta.22...v2.0.0
[2.0.0-beta.22]: https://github.com/openfun/richie/compare/v2.0.0-beta.21...v2.0.0-beta.22
[2.0.0-beta.21]: https://github.com/openfun/richie/compare/v2.0.0-beta.20...v2.0.0-beta.21
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
;;
[metadata]
name = richie
version = 2.0.0
version = 2.0.1
description = A FUN portal for Open edX
long_description = file:README.md
long_description_content_type = text/markdown
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "richie-education",
"version": "2.0.0",
"version": "2.0.1",
"description": "A CMS for Open Education",
"main": "sandbox/manage.py",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion tests_e2e/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "richie-tests-e2e",
"version": "2.0.0",
"version": "2.0.1",
"description": "End-to-end tests for the Richie project",
"repository": "https://github.com/openfun/richie",
"author": "Open FUN (France Université Numérique)",
Expand Down
2 changes: 1 addition & 1 deletion website/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "richie-education-docs",
"version": "2.0.0",
"version": "2.0.1",
"description": "Documentation website for the Richie project",
"scripts": {
"build": "docusaurus-build",
Expand Down
122 changes: 122 additions & 0 deletions website/versioned_docs/version-2.0.1/lms-connection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
---
id: version-2.0.1-lms-connection
title: Connecting Richie with an LMS
sidebar_label: LMS connection
original_id: lms-connection
---

`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.

### API bridge

The `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.

```python
RICHIE_LMS_BACKENDS=[
{
"BASE_URL": "https://www.lms-example2.org",
"BACKEND": "richie.apps.courses.lms.edx.EdXLMSBackend",
"COURSE_REGEX": r"^.*/courses/(?P<course_id>.*)/course/?$",
"JS_BACKEND": "openedx-hawthorn",
"JS_COURSE_REGEX": r"^.*/course/(?<course_id>[0-9]*)$",
},
]
```

For information about how to generate an API access on your OpenEdx instance, refer to the
documentation.

_Note: `JS_BACKEND` accepts `base`, `openedx-dogwood` and `openedx-hawthorn` values._
_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

#### Purpose

About the default configuration, if you check `RICHIE_LMS_BACKENDS` settings in `env.d/development`
you will see that we use `base.BaseLMSBackend` as `RICHIE_LMS_BACKENDS`.
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
(_.e.g_ `/etc/hosts` on a \*NIX system) to alias a domain `local.dev` with
two subdomains `richie` and `edx` to localhost:

```
# /etc/hosts
127.0.0.1 richie.local.dev
127.0.0.1 edx.local.dev
```

Once this has been done, the OpenEdx app should respond on http://edx.local.dev:8073
and Richie should respond on http://richie.local.dev:8070 and should be able
to make CORS XHR requests.

#### Enable TLS

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 ans its Certificate Authority

First you will need to install mkcert and its Certificate Authority.
[mkcert](https://mkcert.org/) is a little util to ease local certificate generation.

###### a. Install `mkcert` on your local machine

- [Read the doc](https://github.com/FiloSottile/mkcert)
- Linux users who do not want to use linuxbrew : [read this article](https://www.prado.lt/how-to-create-locally-trusted-ssl-certificates-in-local-development-environment-on-linux-with-mkcert).

###### b. Install Mkcert Certificate Authority

`mkcert -install`

> If you do not want to use mkcert, you can generate [CA and certificate with openssl](https://www.freecodecamp.org/news/how-to-get-https-working-on-your-local-development-environment-in-5-minutes-7af615770eec/).
> You will have to put your certificate and its key in `docker/files/etc/nginx/ssl` directory
> and named them `richie.local.dev.pem` and `richie.local.dev.key`.
##### 2. On Richie

To setup SSL conf with mkcert, just run:
`bin/setup-ssl`

> If you do not want to use mkcert, read instructions above to generate Richie certificate then
> run `bin/setup-ssl --no-cert` instead.
##### 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](https://github.com/openfun/openedx-docker#ssl).

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

Now, OpenEdx app should respond on https://edx.local.dev:8073, and Richie
on https://richie.local.dev:8070 without browser warning about the certificate validity.

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 `make run`.
2 changes: 1 addition & 1 deletion website/versions.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
["2.0.0", "1.17", "1.16", "1.15", "1.14", "1.13", "1.12"]
["2.0.1", "2.0.0", "1.17", "1.16", "1.15", "1.14", "1.13", "1.12"]

0 comments on commit 9a3e61a

Please sign in to comment.