From baca27bfbd0148035c27dd27f4c302339a5becc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Wed, 17 Jun 2020 11:10:37 +0200 Subject: [PATCH] Fix crash when viewing problem in LMS This was due to incorrectly loading the coursewarehistoryextended in the installed applications. Also, the database router in charge of routing requests to the student_history_module database must be disabled. --- CHANGELOG.md | 1 + .../templates/apps/openedx/settings/partials/common_all.py | 6 ++++++ tutor/templates/build/openedx/Dockerfile | 6 +++++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 003853c..9e9a5c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Note: Breaking changes between versions are indicated by "💥". ## Unreleased +- [Bugfix] Fix crash when viewing problem in LMS - [Bugfix] Fix missing webpack-stats.json in openedx Docker image ## v10.0.1 (2020-06-15) diff --git a/tutor/templates/apps/openedx/settings/partials/common_all.py b/tutor/templates/apps/openedx/settings/partials/common_all.py index 1869f77..87dd1cd 100644 --- a/tutor/templates/apps/openedx/settings/partials/common_all.py +++ b/tutor/templates/apps/openedx/settings/partials/common_all.py @@ -21,6 +21,12 @@ DATA_DIR = "/openedx/data/" for store in MODULESTORE["default"]["OPTIONS"]["stores"]: store["OPTIONS"]["fs_root"] = DATA_DIR +# Get rid completely of coursewarehistoryextended, as we do not use the CSMH database +INSTALLED_APPS.remove("coursewarehistoryextended") +DATABASE_ROUTERS.remove( + "openedx.core.lib.django_courseware_routers.StudentModuleHistoryExtendedRouter" +) + # Set uploaded media file path MEDIA_ROOT = "/openedx/media/" diff --git a/tutor/templates/build/openedx/Dockerfile b/tutor/templates/build/openedx/Dockerfile index 7b76a00..37c28b4 100644 --- a/tutor/templates/build/openedx/Dockerfile +++ b/tutor/templates/build/openedx/Dockerfile @@ -42,6 +42,10 @@ RUN curl https://github.com/overhangio/edx-platform/commit/5f21bbe77056d71ca61b9 # https://github.com/edx/edx-platform/pull/24055 # https://github.com/overhangio/edx-platform/tree/regisb/fix-lti-provider-admin RUN curl https://github.com/overhangio/edx-platform/commit/089b26eed0302ed1f9a5b24c5f3e563dd44abb04.patch | git apply - +# Fix problem viewing when CSMH is disabled +# https://github.com/edx/edx-platform/pull/24237 +# https://github.com/overhangio/edx-platform/tree/overhangio/fix-no-csmh +RUN curl https://github.com/overhangio/edx-platform/commit/6dbf2eddf7a4563c04c3b51edf5e131106d69e19.patch | git apply - # Download extra locales to /openedx/locale/contrib/locale RUN cd /tmp \ @@ -61,7 +65,7 @@ RUN pip install -r requirements/edx/base.txt # Install patched version of ora2 RUN pip install https://github.com/overhangio/edx-ora2/archive/overhangio/boto2to3.zip -# Install juniper-compatible scorm xblock +# Install scorm xblock RUN pip install "openedx-scorm-xblock<11.0.0,>=10.0.0" # Install a recent version of nodejs