Skip to content

Commit

Permalink
🔖(chore) release v2.25.0-beta.0
Browse files Browse the repository at this point in the history
Added
- Organization bulk contract signature
- Add a Badge React component
- Add a footer on enrollment's item in the learner dashboard. It give the
  possibility to purchase linked product or download linked certificate.
- Add download contracts pages on the teacher dashboard.
- Add a contract information and actions in learner dashboard order's
  listing and details.
- In the learner dashboard, enroll actions are disabled when an unsigned
  contract is linked to the order.
- Add the ability to sign an order's contract.
- Add terms checkbox and specific "sign" button in the Sale Tunnel.
- The CourseRunProductItem disables enrollment if there is a needed signature.
- Handle OrderGroup on product purchase

Changed
- Teacher dashboard access is restricted to user which has access to a course
  or an organization.
- Frontend Order type have been split into two: CredentialOrder and
  CertificateOrder.
- Update PurchaseButton messages to aid with translation.
- Update courses and organizations default permissions
- Update cunningham to 2.0.0
- Update frontend components OrderStateMessage with new computed state
  'waiting signature'
- Update SaleTunnel to add certificate product course run information.
- Update SaleTunnel to display product instructions.
- When a course have multiple seller organizations, CourseGlimpse now display
  the number of seller organization instead of the title of the first one.
- Update `JOANIE_BACKEND` settings, frontend widgets and learner dashboard
  to match new API endpoint to retrieve course products
- Use cunningham Button component.
- Use cunningham form components (input, select, radio, checkbox).
- Delete richie Button component now that we use cunningham Button component.
- Delete courseRun.starts_in_message, we compute it on frontend side.

Fixed
- Fix typo on the DashboardOrderLoader component.
- Prevent LTIConsumer component to rerender on user session update
- Fix Order interface against changed field 'target_enrollments' and
  'enrollment'
- Fix dashboard mobile layout.
- Course details characteristics overflow issue
- Map all richie course properties into `getCourseGlimpseProps` util
- Fix course run computed state. A run without end date must be ONGOING_OPEN
- Fix cookiecutter circleci gitlint configuration
- Opened Course Run show empty date as '...'
- Fix dashboard enrollment listing when they're linked to a product certificate.
- Fix order cache issues

Removed
- Remove `course_enrollment_widget_props` extra tags
- Remove `CourseProductItem` as a widget
  • Loading branch information
jbpenrath committed Jan 4, 2024
1 parent 9d0ed37 commit 1df3fd0
Show file tree
Hide file tree
Showing 42 changed files with 3,192 additions and 102 deletions.
31 changes: 17 additions & 14 deletions 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.25.0-beta.0]

### Added

- Organization bulk contract signature
Expand Down Expand Up @@ -1965,20 +1967,21 @@ 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.24.1...master
[2.24.1]: https://github.com/openfun/richie/compare/v2.24.0...2.24.1
[2.24.0]: https://github.com/openfun/richie/compare/v2.23.0...2.24.0
[2.23.0]: https://github.com/openfun/richie/compare/v2.22.0...2.23.0
[2.22.0]: https://github.com/openfun/richie/compare/v2.21.1...2.22.0
[2.21.1]: https://github.com/openfun/richie/compare/v2.21.0...2.21.1
[2.21.0]: https://github.com/openfun/richie/compare/v2.20.1...2.21.0
[2.20.1]: https://github.com/openfun/richie/compare/v2.20.0...2.20.1
[2.20.0]: https://github.com/openfun/richie/compare/v2.19.0...2.20.0
[2.19.0]: https://github.com/openfun/richie/compare/v2.18.0...2.19.0
[2.18.0]: https://github.com/openfun/richie/compare/v2.17.0...2.18.0
[2.17.0]: https://github.com/openfun/richie/compare/v2.16.0...2.17.0
[2.16.0]: https://github.com/openfun/richie/compare/v2.15.1...2.16.0
[2.15.1]: https://github.com/openfun/richie/compare/v2.15.0...2.15.1
[unreleased]: https://github.com/openfun/richie/compare/v2.25.0-beta.0...master
[2.25.0-beta.0]: https://github.com/openfun/richie/compare/v2.24.1...v2.25.0-beta.0
[2.24.1]: https://github.com/openfun/richie/compare/v2.24.0...v2.24.1
[2.24.0]: https://github.com/openfun/richie/compare/v2.23.0...v2.24.0
[2.23.0]: https://github.com/openfun/richie/compare/v2.22.0...v2.23.0
[2.22.0]: https://github.com/openfun/richie/compare/v2.21.1...v2.22.0
[2.21.1]: https://github.com/openfun/richie/compare/v2.21.0...v2.21.1
[2.21.0]: https://github.com/openfun/richie/compare/v2.20.1...v2.21.0
[2.20.1]: https://github.com/openfun/richie/compare/v2.20.0...v2.20.1
[2.20.0]: https://github.com/openfun/richie/compare/v2.19.0...v2.20.0
[2.19.0]: https://github.com/openfun/richie/compare/v2.18.0...v2.19.0
[2.18.0]: https://github.com/openfun/richie/compare/v2.17.0...v2.18.0
[2.17.0]: https://github.com/openfun/richie/compare/v2.16.0...v2.17.0
[2.16.0]: https://github.com/openfun/richie/compare/v2.15.1...v2.16.0
[2.15.1]: https://github.com/openfun/richie/compare/v2.15.0...v2.15.1
[2.15.0]: https://github.com/openfun/richie/compare/v2.14.1...v2.15.0
[2.14.1]: https://github.com/openfun/richie/compare/v2.14.0...v2.14.1
[2.14.0]: https://github.com/openfun/richie/compare/v2.13.0...v2.14.0
Expand Down
12 changes: 11 additions & 1 deletion UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ $ make migrate

## Unreleased

## 2.24.1 to 2.25-beta.0

- `CourseProductItem` has been moved into `SyllabusCourseRunsList/components` folder. If you have
overridden this component, you have to update your overrides.json file accordingly.
- `JOANIE_BACKEND` must be updated. `COURSE_REGEX` and `JS_COURSE_REGEX` must be updated to match
Expand All @@ -28,9 +30,17 @@ $ make migrate
- scss themes variable for Modal 'close button' have been removed. It is now a cunningham button and can be
customised using cunningham-tokens.
- cunningham have been upgraded to 2.0.0, you can follow it's upgrade guide here: https://openfun.github.io/cunningham/?path=/docs/migrating-from-v1-to-v2--docs
- With the migration to Cunningham Button, we have to reset some bootstrap styles, so we have to add a new
`scss/trumps/_bootstrap.scss` file. You have to import it in your `_main.scss` file.
```scss
// ...

// Import bootstrap reset
@import 'richie-education/scss/trumps/bootstrap';
```
- Delete richie Button component now that we use cunningham Button component.

## 2.23.0 to 2.24.x
## 2.23.0 to 2.24.1

- `*_detail.html` django templates have been updated to use new course-glimpse-list structure. If
have overridden those templates, you must update them. (https://github.com/openfun/richie/pull/2069/commits/e36fa58a579c3b58384baf896fcf4b7579a46342)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
boto3==1.28.9
django-check-seo==0.6.2
django-configurations==2.4.1
django-check-seo==0.6.4
django-configurations==2.5
django-storages==1.13.2
dockerflow==2022.8.0
gunicorn==20.1.0
psycopg2-binary==2.9.6
richie==2.24.1
gunicorn==21.2.0
psycopg2-binary==2.9.9
richie==2.25.0-beta.0
unidecode==1.3.6 # required by django-check-seo
sentry-sdk==1.28.1
sentry-sdk==1.39.1
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,64 @@ class Base(StyleguideMixin, DRFMixin, RichieCoursesConfigurationMixin, Configura

AUTHENTICATION_BACKENDS = ("django.contrib.auth.backends.ModelBackend",)

# Feature flags
FEATURES = values.DictValue(environ_name="FEATURES", environ_prefix=None)

# Joanie
"""
NB: Richie picks all Joanie's settings from the JOANIE_BACKEND namespace in the
settings, hence the nesting of all Joanie's values inside that prop.
If BASE_URL is defined, this setting is bound into RICHIE_LMS_BACKENDS to use Joanie
as a LMS BACKEND.
"""
JOANIE_BACKEND = {
"BASE_URL": values.Value(environ_name="JOANIE_BASE_URL", environ_prefix=None),
"BACKEND": values.Value(
"richie.apps.courses.lms.joanie.JoanieBackend",
environ_name="JOANIE_BACKEND",
environ_prefix=None,
),
"JS_BACKEND": values.Value(
"joanie", environ_name="JOANIE_JS_BACKEND", environ_prefix=None
),
"COURSE_REGEX": values.Value(
r"^.*/api/v1.0(?P<resource_uri>(?:/(?:courses|course-runs|products)/[^/]+)+)/?$",
environ_name="JOANIE_COURSE_REGEX",
environ_prefix=None,
),
"JS_COURSE_REGEX": values.Value(
r"^.*/api/v1.0((?:/(?:courses|course-runs|products)/[^/]+)+)/?$",
environ_name="JOANIE_JS_COURSE_REGEX",
environ_prefix=None,
),
# Course runs synchronization
"COURSE_RUN_SYNC_NO_UPDATE_FIELDS": [],
"DEFAULT_COURSE_RUN_SYNC_MODE": "sync_to_public",
}

# AUTHENTICATION DELEGATION
profile_dashboard_urls = {
"dashboard": {
"label": _("Dashboard"),
"href": _("{base_url:s}/dashboard/"),
},
}
if (
FEATURES.get("REACT_DASHBOARD", False) # pylint: disable=no-member
and JOANIE_BACKEND.get("BASE_URL") is not None
):
profile_dashboard_urls = {
"dashboard": {
"label": _("Dashboard"),
"href": _("/dashboard/"),
},
"dashboard_teacher": {
"label": _("Teacher dashboard"),
"href": _("/dashboard/teacher"),
},
}

RICHIE_AUTHENTICATION_DELEGATION = {
"BASE_URL": values.Value(
"", environ_name="AUTHENTICATION_BASE_URL", environ_prefix=None
Expand All @@ -216,10 +273,7 @@ class Base(StyleguideMixin, DRFMixin, RichieCoursesConfigurationMixin, Configura
# e.g: for user.username = johndoe, /u/(username) will be /u/johndoe
"PROFILE_URLS": values.DictValue(
{
"dashboard": {
"label": _("Dashboard"),
"href": _("{base_url:s}/dashboard"),
},
**profile_dashboard_urls,
"profile": {
"label": _("Profile"),
"href": _("{base_url:s}/u/(username)"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
from django.views.static import serve

from cms.sitemaps import CMSSitemap
from richie.apps.core.templatetags.feature_flags import is_feature_enabled
from richie.apps.core.templatetags.joanie import is_joanie_enabled
from richie.apps.courses.urls import (
redirects_urlpatterns as courses_redirects_urlpatterns,
)
Expand All @@ -37,6 +39,18 @@
path(r"django-check-seo/", include("django_check_seo.urls")),
]

if is_joanie_enabled() and is_feature_enabled("REACT_DASHBOARD"):
urlpatterns += i18n_patterns(
re_path(
r"^dashboard/.*",
TemplateView.as_view(
template_name="richie/dashboard.html",
),
name="dashboard",
)
)


urlpatterns += i18n_patterns(
path(r"admin/", admin.site.urls),
path(r"accounts/", include("django.contrib.auth.urls")),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/* Custom Cunningham Tokens for Richie
In a child project, you can override those tokens by creating a token file like this one,
merge your custom tokens with default Richie ones then by using cunningham cli to generate
sass and ts tokens files (take a look to the `build-theme` command within package.json
see it in action).
E.g:
const tokens = require('richie-education/cunningham.cjs')
module.exports = {
theme: {
...tokens.themes.default
colors: {
...tokens.colors,
'your-black': '#1E1E1E',
},
},
*/
module.exports = {}
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,43 @@
"version": "0.1.0",
"description": "Richie {{cookiecutter.site}} site on {{cookiecutter.domain}}",
"scripts": {
"build-sass": "sass scss/_main.scss ../backend/base/static/richie/css/main.css --load-path=node_modules",
"build-sass-production": "sass scss/_main.scss ../backend/base/static/richie/css/main.css --style=compressed --load-path=node_modules",
"build-theme": "cunningham -g scss -o scss/vendors && cunningham -g css -o scss/vendors/css",
"build-ts": "webpack --config node_modules/richie-education/webpack.config.js --output-path ../backend/base/static/richie/js/build --env richie-dependent-build --env richie-settings=overrides.json",
"build-ts-production": "webpack --mode=production --config node_modules/richie-education/webpack.config.js --output-path ../backend/base/static/richie/js/build --env richie-dependent-build --env richie-settings=overrides.json",
"compile-translations": "node_modules/richie-education/i18n/compile-translations.js ./i18n/overrides/*.json ./i18n/locales/*.json",
"extract-translations": "formatjs extract './**/*.ts*' --ignore ./node_modules --ignore './**/*.d.ts' --out-file './i18n/frontend.json' --id-interpolation-pattern '[sha512:contenthash:base64:6]' --format crowdin",
"lint": "eslint -c node_modules/richie-education/.eslintrc.json 'js/**/*.ts?(x)' --rule 'import/no-extraneous-dependencies: [error, {packageDir: ['.', './node_modules/richie-education']}]' --no-error-on-unmatched-pattern",
"prettier": "prettier '**/*.+(css|scss)'",
"prettier-write": "prettier --write '**/*.+(css|scss)'",
"build-sass": "sass scss/_main.scss ../backend/base/static/richie/css/main.css --load-path=node_modules",
"build-sass-production": "sass scss/_main.scss ../backend/base/static/richie/css/main.css --style=compressed --load-path=node_modules",
"watch-ts": "yarn build-ts --watch",
"watch-sass": "nodemon -e scss -x 'yarn build-sass'"
"watch-sass": "nodemon -e scss -x 'yarn build-sass'",
"watch-ts": "yarn build-ts --watch"
},
"keywords": [
"MOOC",
"CMS"
],
"dependencies": {
"richie-education": "2.24.1"
"richie-education": "2.25.0-beta.0"
},
"devDependencies": {
"@formatjs/cli": "6.1.3",
"@formatjs/cli": "6.2.4",
"@openfun/cunningham-tokens": "2.1.0",
"babel-loader": "9.1.3",
"eslint": "8.47.0",
"eslint-import-resolver-webpack": "0.13.5",
"nodemon": "3.0.1",
"prettier": "3.0.2",
"sass": "1.65.1",
"source-map-loader": "4.0.1",
"webpack": "5.88.2",
"eslint": "8.56.0",
"eslint-import-resolver-webpack": "0.13.8",
"nodemon": "3.0.2",
"prettier": "3.1.1",
"sass": "1.69.7",
"source-map-loader": "4.0.2",
"webpack": "5.89.0",
"webpack-cli": "5.1.4"
},
"resolutions": {
"@types/react": "18.2.18",
"@types/react-dom": "18.2.7"
},
"volta": {
"node": "18.19.0"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@
// Import Cunningham tokens and icons
@import '@openfun/cunningham-react/dist/icons';
@import '@openfun/cunningham-react/dist/style';
@import 'richie-education/scss/vendors/cunningham-tokens';
@import 'richie-education/scss/vendors/css/cunningham-tokens';

// Override default Richie settings variables
@import 'richie-education/scss/vendors/cunningham-tokens';
@import 'richie-education/scss/vendors/css/cunningham-tokens';
@import 'richie-education/scss/colors/palette';
@import './vendors/cunningham-tokens';
@import './vendors/css/cunningham-tokens';
@import './extras/colors/palette';

@import 'richie-education/scss/colors/gradients';
Expand Down Expand Up @@ -51,3 +53,5 @@
@import 'richie-education/scss/trumps/cms';
// IE11 patchs
@import 'richie-education/scss/trumps/ie11-fixes';
// Bootstrap patchs
@import 'richie-education/scss/trumps/bootstrap';
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// {{cookiecutter.site}} palette overwrites
///
/// Color palette and schemes
///

// This file is to override the default Richie palette colors.
// Default Richie file: https://github.com/openfun/richie/blob/master/src/frontend/scss/colors/_palette.scss
// Named colors
// Do not add any color here, add or override color in cunningham.cjs instead.
// ---------

// The example below only overrides the `firebrick6` color value from `#F72C30` to `#FF0000`,
// other palette colors are still those by default.
@use '../../vendors/cunningham-tokens' as tokens;

// $palette: recursive-map-merge(
// $palette,
// (
// 'firebrick6': #FF0000,
// )
// );
$palette: recursive-map-merge(
$palette,
map-get(tokens.$themes, 'default', 'theme', 'colors')
);
Loading

0 comments on commit 1df3fd0

Please sign in to comment.