diff --git a/changelog.d/20230106_163518_regis_fix_example_com_links.md b/changelog.d/20230106_163518_regis_fix_example_com_links.md new file mode 100644 index 0000000..3af3848 --- /dev/null +++ b/changelog.d/20230106_163518_regis_fix_example_com_links.md @@ -0,0 +1 @@ +- 💥[Bugfix] Fix "example.com" links in registration emails. This is a breaking change for platforms that have modified the "id" field of the LMS site object in the database. These platforms should set `SITE_ID=1` in the common settings via a plugin. (by @regisb) diff --git a/changelog.d/20230109_134927_regis_fix_tinymce_formatting.md b/changelog.d/20230109_134927_regis_fix_tinymce_formatting.md new file mode 100644 index 0000000..36854c8 --- /dev/null +++ b/changelog.d/20230109_134927_regis_fix_tinymce_formatting.md @@ -0,0 +1 @@ +- [Bugfix] Fix HTML component editing in studio by cherry-picking [upstream fix](https://github.com/openedx/edx-platform/pull/31500). (by @regisb) diff --git a/changelog.d/20230117_165024_regis_cors_whitelist.md b/changelog.d/20230117_165024_regis_cors_whitelist.md new file mode 100644 index 0000000..caea8ad --- /dev/null +++ b/changelog.d/20230117_165024_regis_cors_whitelist.md @@ -0,0 +1 @@ +- [Improvement] Resolve `CORS_ORIGIN_WHITELIST` warnings that pollute the LMS and CMS logs. As far as we know they were not causing any issue, apart from being a nuisance. (by @regisb) diff --git a/tutor/templates/apps/openedx/settings/cms/production.py b/tutor/templates/apps/openedx/settings/cms/production.py index d09456e..03cae79 100644 --- a/tutor/templates/apps/openedx/settings/cms/production.py +++ b/tutor/templates/apps/openedx/settings/cms/production.py @@ -8,6 +8,7 @@ ALLOWED_HOSTS = [ ENV_TOKENS.get("CMS_BASE"), "cms", ] +CORS_ORIGIN_WHITELIST.append("{% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ CMS_HOST }}") # Authentication SOCIAL_AUTH_EDX_OAUTH2_KEY = "{{ CMS_OAUTH2_KEY_SSO }}" diff --git a/tutor/templates/apps/openedx/settings/lms/production.py b/tutor/templates/apps/openedx/settings/lms/production.py index b859b5f..6c2793b 100644 --- a/tutor/templates/apps/openedx/settings/lms/production.py +++ b/tutor/templates/apps/openedx/settings/lms/production.py @@ -9,6 +9,7 @@ ALLOWED_HOSTS = [ FEATURES["PREVIEW_LMS_BASE"], "lms", ] +CORS_ORIGIN_WHITELIST.append("{% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ LMS_HOST }}") {% if ENABLE_HTTPS %} # Properly set the "secure" attribute on session/csrf cookies. This is required in diff --git a/tutor/templates/apps/openedx/settings/partials/common_all.py b/tutor/templates/apps/openedx/settings/partials/common_all.py index fb39fa8..f23c8e1 100644 --- a/tutor/templates/apps/openedx/settings/partials/common_all.py +++ b/tutor/templates/apps/openedx/settings/partials/common_all.py @@ -78,6 +78,10 @@ CACHES = { }, } +# The default Django contrib site is the one associated to the LMS domain name. 1 is +# usually "example.com", so it's the next available integer. +SITE_ID = 2 + # Contact addresses CONTACT_MAILING_ADDRESS = "{{ PLATFORM_NAME }} - {% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ LMS_HOST }}" DEFAULT_FROM_EMAIL = ENV_TOKENS.get("DEFAULT_FROM_EMAIL", ENV_TOKENS["CONTACT_EMAIL"]) diff --git a/tutor/templates/build/openedx/Dockerfile b/tutor/templates/build/openedx/Dockerfile index a1ba493..2ee7c50 100644 --- a/tutor/templates/build/openedx/Dockerfile +++ b/tutor/templates/build/openedx/Dockerfile @@ -42,8 +42,12 @@ WORKDIR /openedx/edx-platform RUN git config --global user.email "tutor@overhang.io" \ && git config --global user.name "Tutor" +{%- if patch("openedx-dockerfile-git-patches-default") %} # Custom edx-platform patches {{ patch("openedx-dockerfile-git-patches-default") }} +{%- else %} +# Patch edx-platform +{%- endif %} {# Example: RUN curl -fsSL https://github.com/openedx/edx-platform/commit/ | git am #} {{ patch("openedx-dockerfile-post-git-checkout") }}