Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[nightly] feat: add support for the Learner Dashboard MFE #164

Merged
merged 1 commit into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ In addition, this plugin comes with a few MFEs which are enabled by default:
- `Course Authoring <https://github.com/openedx/frontend-app-course-authoring/>`__
- `Discussions <https://github.com/openedx/frontend-app-discussions/>`__
- `Gradebook <https://github.com/openedx/frontend-app-gradebook/>`__
- `Learner Dashboard <https://github.com/openedx/frontend-app-learner-dashboard/>`__
- `Learning <https://github.com/openedx/frontend-app-learning/>`__
- `ORA Grading <https://github.com/openedx/frontend-app-ora-grading/>`__
- `Profile <https://github.com/openedx/frontend-app-profile/>`__
Expand Down Expand Up @@ -86,6 +87,14 @@ Gradebook

This instructor-only MFE is for viewing individual and aggregated grade results for a course. To access this MFE, go to a course → Instructor tab → Student Admin → View gradebook. The URL should be: ``http(s)://{{ MFE_HOST }}/gradebook/{{ course ID }}``. When running locally, the gradebook of the demo course is available at: http://apps.local.overhang.io/gradebook/course-v1:edX+DemoX+Demo_Course

Learner Dashboard
~~~~~~~~~~~~~~~~~

.. image:: https://raw.githubusercontent.com/overhangio/tutor-mfe/master/screenshots/learner-dashboard.png
:alt: Learner Dashboard MFE screenshot

The Learner Dashboard MFE provides a clean and functional interface to allow learners to view all of their open enrollments, as well as take relevant actions on those enrollments.

Learning
~~~~~~~~

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- [Feature] Add support for the Learner Dashboard MFE. (by @arbrandes)
Binary file added screenshots/learner-dashboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions tutormfe/patches/openedx-lms-common-settings
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@ MFE_CONFIG_API_CACHE_TIMEOUT = 1
FEATURES['ENABLE_AUTHN_MICROFRONTEND'] = True
{% elif app_name == "communications" %}
FEATURES['ENABLE_NEW_BULK_EMAIL_EXPERIENCE'] = True
{% elif app_name == "learner-dashboard" %}
LEARNER_HOME_MFE_REDIRECT_PERCENTAGE = 100
{% endif %}
{% endfor %}
2 changes: 2 additions & 0 deletions tutormfe/patches/openedx-lms-development-settings
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ DISCUSSIONS_MICROFRONTEND_URL = "http://{{ MFE_HOST }}:{{ app["port"] }}/discuss
DISCUSSIONS_MFE_FEEDBACK_URL = None
{% elif app_name == "gradebook" %}
WRITABLE_GRADEBOOK_URL = "http://{{ MFE_HOST }}:{{ app["port"] }}/gradebook"
{% elif app_name == "learner-dashboard" %}
LEARNER_HOME_MICROFRONTEND_URL = "http://{{ MFE_HOST }}:{{ app["port"] }}/learner-dashboard"
{% elif app_name == "learning" %}
LEARNING_MICROFRONTEND_URL = "http://{{ MFE_HOST }}:{{ app["port"] }}/learning"
MFE_CONFIG["LEARNING_BASE_URL"] = "http://{{ MFE_HOST }}:{{ app["port"] }}"
Expand Down
2 changes: 2 additions & 0 deletions tutormfe/patches/openedx-lms-production-settings
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ DISCUSSIONS_MICROFRONTEND_URL = "{% if ENABLE_HTTPS %}https://{% else %}http://{
DISCUSSIONS_MFE_FEEDBACK_URL = None
{% elif app_name == "gradebook" %}
WRITABLE_GRADEBOOK_URL = "{% if ENABLE_HTTPS %}https://{% else %}http://{% endif %}{{ MFE_HOST }}/gradebook"
{% elif app_name == "learner-dashboard" %}
LEARNER_HOME_MICROFRONTEND_URL = "{% if ENABLE_HTTPS %}https://{% else %}http://{% endif %}{{ MFE_HOST }}/learner-dashboard"
{% elif app_name == "learning" %}
LEARNING_MICROFRONTEND_URL = "{% if ENABLE_HTTPS %}https://{% else %}http://{% endif %}{{ MFE_HOST }}/learning"
MFE_CONFIG["LEARNING_BASE_URL"] = "{{ "https" if ENABLE_HTTPS else "http" }}://{{ MFE_HOST }}/learning"
Expand Down
5 changes: 5 additions & 0 deletions tutormfe/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ def get_github_refs_path(name: str) -> str:
"refs": get_github_refs_path("openedx/frontend-app-gradebook"),
"port": 1994,
},
"learner-dashboard": {
"repository": "https://github.com/openedx/frontend-app-learner-dashboard",
"refs": get_github_refs_path("openedx/frontend-app-learner-dashboard"),
"port": 1996,
},
"learning": {
"repository": "https://github.com/openedx/frontend-app-learning",
"refs": get_github_refs_path("openedx/frontend-app-learning"),
Expand Down
6 changes: 6 additions & 0 deletions tutormfe/templates/mfe/tasks/lms/init
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ site-configuration unset --domain={{ LMS_HOST }}:8000 ENABLE_PROFILE_MICROFRONTE
./manage.py lms waffle_delete --flags learner_profile.redirect_to_microfrontend
{% endif %}

{% if is_mfe_enabled("learner-dashboard") %}
(./manage.py lms waffle_flag --list | grep learner_home_mfe.enabled) || ./manage.py lms waffle_flag learner_home_mfe.enabled --create --everyone
{% else %}
./manage.py lms waffle_delete --flags learner_home_mfe.enabled
{% endif %}

{% if is_mfe_enabled("learning") %}
(./manage.py lms waffle_flag --list | grep course_home.course_home_mfe_progress_tab) || ./manage.py lms waffle_flag --create --everyone course_home.course_home_mfe_progress_tab
{% else %}
Expand Down