Skip to content

Commit

Permalink
feat: upgrade to Palm
Browse files Browse the repository at this point in the history
With this new release, we make use of persistent bind-mounts to make it
much easier to work on MFE forks. In addition, adding new MFEs is no
longer done with `*_MFE_APP` settings, which was awkward, but with
appropriate plugins.

Close overhangio#111.

Additional changes:

- feat: Add support for the ORA Grading MFE: The MFE is accessible by
  instructors in ORA exercises that have explicit staff grading steps.
  The corresponding waffle flag is installed and enabled by default.

- feat: Add support for the Communications MFE: The MFE is usable by
  instructors to send bulk email to learners in a course. The feature
  itself (the ability to send bulk email) pre-dates this MFE, and must be
  enabled as usual for the "Email" tab to become visible in the Instructor
  Dashboard.  The difference is that with this change, the tab will
  include a link to the MFE by default.

- chore: upgrade node to v18
  • Loading branch information
regisb authored and moonesque committed Jan 6, 2024
1 parent dc6c52c commit 080ef59
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ ORA Grading
.. image:: https://raw.githubusercontent.com/overhangio/tutor-mfe/master/screenshots/ora-grading.png
:alt: ORA Grading MFE screenshot

When enabled, Open Response Assessments ("ORA") that have a staff grading step will link to this new MFE, either when clicking "Grade Available Responses" from the exercise itself, or via a link in the Instructor Dashboard. It is meant to streamline the grading process with better previews of submitted content.
When enabled, Open Response Assesments ("ORA") that have a staff grading step will link to this new MFE, either when clicking "Grade Available Responses" from the exercise itself, or via a link in the Instructor Dashboard. It is meant to streamline the grading process with better previews of submitted content.

Profile
~~~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion tutormfe/__about__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "15.0.7"
__version__ = "16.0.0"
__package_version__ = __version__


Expand Down
1 change: 0 additions & 1 deletion tutormfe/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
them.
"""
from __future__ import annotations

import typing as t

from tutor.core.hooks import Filter
Expand Down
1 change: 1 addition & 0 deletions tutormfe/patches/openedx-cms-production-settings
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
{% if get_mfe("course-authoring") %}
COURSE_AUTHORING_MICROFRONTEND_URL = "{% if ENABLE_HTTPS %}https://{% else %}http://{% endif %}{{ MFE_HOST }}/course-authoring"
{% endif %}
{% endfor %}

LOGIN_REDIRECT_WHITELIST.append("{{ MFE_HOST }}")
CORS_ORIGIN_WHITELIST.append("{% if ENABLE_HTTPS %}https://{% else %}http://{% endif %}{{ MFE_HOST }}")
Expand Down
2 changes: 2 additions & 0 deletions tutormfe/patches/openedx-lms-common-settings
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ MFE_CONFIG_API_CACHE_TIMEOUT = 1
# MFE-specific settings
{% if get_mfe("authn") %}
FEATURES['ENABLE_AUTHN_MICROFRONTEND'] = True
{% elif app_name == "communications" %}
FEATURES['ENABLE_NEW_BULK_EMAIL_EXPERIENCE'] = True
{% endif %}
{% if get_mfe("communications") %}
FEATURES['ENABLE_NEW_BULK_EMAIL_EXPERIENCE'] = True
Expand Down
18 changes: 17 additions & 1 deletion tutormfe/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"VERSION": __version__,
"DOCKER_IMAGE": "{{ DOCKER_REGISTRY }}overhangio/openedx-mfe:{{ MFE_VERSION }}",
"HOST": "apps.{{ LMS_HOST }}",
"COMMON_VERSION": "edspirit-release/olive.4",
"COMMON_VERSION": "{{ OPENEDX_COMMON_VERSION }}",
"CADDY_DOCKER_IMAGE": "{{ DOCKER_IMAGE_CADDY }}",
},
}
Expand Down Expand Up @@ -193,6 +193,22 @@ def _mounted_mfe_image_management() -> None:
REPO_PREFIX = "frontend-app-"


# init script
with open(
os.path.join(
pkg_resources.resource_filename("tutormfe", "templates"),
"mfe",
"tasks",
"lms",
"init",
),
encoding="utf-8",
) as task_file:
tutor_hooks.Filters.CLI_DO_INIT_TASKS.add_item(("lms", task_file.read()))

REPO_PREFIX = "frontend-app-"


@tutor_hooks.Filters.COMPOSE_MOUNTS.add()
def _mount_frontend_apps(
volumes: list[tuple[str, str]], path_basename: str
Expand Down
2 changes: 2 additions & 0 deletions tutormfe/templates/mfe/build/mfe/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ RUN apt update \
RUN mkdir -p /openedx/app /openedx/env
WORKDIR /openedx/app
ENV PATH ./node_modules/.bin:${PATH}
RUN npm config set fetch-retry-maxtimeout 60000
RUN npm config set fetch-retry-mintimeout 10000

######## i18n strings
FROM base AS i18n
Expand Down

0 comments on commit 080ef59

Please sign in to comment.