From ffd0cec34b84894514b488e6ab8396f3ccf26edc Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Fri, 29 Aug 2025 11:11:07 -0400 Subject: [PATCH 01/18] build: Unpin pip and pip-tools. Test with unpinning both pip and pip-tools. The latest versions have fixed the pathing issues with `make upgrade` and the dependency resolution issues reported in https://github.com/openedx/edx-lint/issues/458 --- Makefile | 2 ++ requirements/constraints.txt | 5 ----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index b76479fbda..6c525a57b6 100644 --- a/Makefile +++ b/Makefile @@ -123,6 +123,8 @@ compile-requirements: pre-requirements $(COMMON_CONSTRAINTS_TXT) ## Re-compile * @# time someone tries to use the outputs. sed 's/Django<5.0//g' requirements/common_constraints.txt > requirements/common_constraints.tmp mv requirements/common_constraints.tmp requirements/common_constraints.txt + sed 's/pip<24.3//g' requirements/common_constraints.txt > requirements/common_constraints.tmp + mv requirements/common_constraints.tmp requirements/common_constraints.txt pip-compile -v --allow-unsafe ${COMPILE_OPTS} -o requirements/pip.txt requirements/pip.in pip install -r requirements/pip.txt diff --git a/requirements/constraints.txt b/requirements/constraints.txt index 772321fe52..6271881301 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -79,11 +79,6 @@ openai<=0.28.1 # Issue for unpinning: https://github.com/openedx/edx-platform/issues/35267 path<16.12.0 -# Date: 2025-05-11 -# Broke lxml[html_clean] extra dependency declaration -# Issue for unpinning: https://github.com/openedx/edx-platform/issues/37168 -pip-tools<7.5.0 - # Date: 2022-08-03 # pycodestyle==2.9.0 generates false positive error E275. # Constraint can be removed once the issue https://github.com/PyCQA/pycodestyle/issues/1090 is fixed. From 66fdf4092ca88d97a12096a59be33c0864fa99ac Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Tue, 2 Sep 2025 14:05:10 -0400 Subject: [PATCH 02/18] chore: Run `make upgrade` --- requirements/common_constraints.txt | 2 +- requirements/edx-sandbox/base.txt | 6 +- requirements/edx/assets.txt | 2 +- requirements/edx/base.txt | 34 +++++------ requirements/edx/development.txt | 56 +++++++++---------- requirements/edx/doc.txt | 32 +++++------ requirements/edx/testing.txt | 34 +++++------ requirements/pip-tools.txt | 6 +- requirements/pip.txt | 6 +- .../structures_pruning/requirements/base.txt | 2 +- scripts/user_retirement/requirements/base.txt | 8 +-- .../user_retirement/requirements/testing.txt | 4 +- 12 files changed, 93 insertions(+), 99 deletions(-) diff --git a/requirements/common_constraints.txt b/requirements/common_constraints.txt index 071d0a6ecf..af5c9e04c6 100644 --- a/requirements/common_constraints.txt +++ b/requirements/common_constraints.txt @@ -25,4 +25,4 @@ elasticsearch<7.14.0 # Cause: https://github.com/openedx/edx-lint/issues/458 # This can be unpinned once https://github.com/openedx/edx-lint/issues/459 has been resolved. -pip<24.3 + diff --git a/requirements/edx-sandbox/base.txt b/requirements/edx-sandbox/base.txt index e41030c76d..6f68e648ed 100644 --- a/requirements/edx-sandbox/base.txt +++ b/requirements/edx-sandbox/base.txt @@ -24,9 +24,9 @@ joblib==1.5.2 # via nltk kiwisolver==1.4.9 # via matplotlib -lxml[html-clean,html_clean]==5.3.2 +lxml[html-clean]==5.3.2 # via - # -c requirements/edx-sandbox/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx-sandbox/base.in # lxml-html-clean # openedx-calc @@ -48,7 +48,7 @@ nltk==3.9.1 # chem numpy==1.26.4 # via - # -c requirements/edx-sandbox/../constraints.txt + # -c requirements/constraints.txt # chem # contourpy # matplotlib diff --git a/requirements/edx/assets.txt b/requirements/edx/assets.txt index 6288377f63..bb6693f4dc 100644 --- a/requirements/edx/assets.txt +++ b/requirements/edx/assets.txt @@ -8,7 +8,7 @@ click==8.2.1 # via -r requirements/edx/assets.in libsass==0.10.0 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/assets.in nodeenv==1.9.1 # via -r requirements/edx/assets.in diff --git a/requirements/edx/base.txt b/requirements/edx/base.txt index 6000ff82b3..1f9643a048 100644 --- a/requirements/edx/base.txt +++ b/requirements/edx/base.txt @@ -95,7 +95,7 @@ camel-converter[pydantic]==4.0.1 # via meilisearch celery==5.5.3 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/kernel.in # django-celery-results # django-user-tasks @@ -171,7 +171,7 @@ defusedxml==0.7.1 # social-auth-core django==4.2.23 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/kernel.in # django-appconf # django-autocomplete-light @@ -322,7 +322,7 @@ django-mysql==4.17.0 # via -r requirements/edx/kernel.in django-oauth-toolkit==1.7.1 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/kernel.in # edx-enterprise # enterprise-integrated-channels @@ -374,7 +374,7 @@ django-waffle==5.0.0 # edx-toggles django-webpack-loader==0.7.0 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/kernel.in # edx-proctoring djangorestframework==3.16.1 @@ -478,7 +478,7 @@ edx-drf-extensions==10.6.0 # openedx-learning edx-enterprise==6.3.2 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/kernel.in edx-event-bus-kafka==6.1.0 # via -r requirements/edx/kernel.in @@ -562,8 +562,8 @@ edxval==3.0.0 # via -r requirements/edx/kernel.in elasticsearch==7.9.1 # via - # -c requirements/edx/../common_constraints.txt - # -c requirements/edx/../constraints.txt + # -c requirements/common_constraints.txt + # -c requirements/constraints.txt # edx-search # openedx-forum enmerkar==0.7.1 @@ -726,9 +726,9 @@ loremipsum==1.0.5 # via ora2 lti-consumer-xblock==9.14.2 # via -r requirements/edx/kernel.in -lxml[html-clean,html_clean]==5.3.2 +lxml[html-clean]==5.3.2 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/kernel.in # edx-i18n-tools # edxval @@ -774,7 +774,7 @@ mongoengine==0.29.1 # via -r requirements/edx/kernel.in monotonic==1.6 # via analytics-python -more-itertools==10.7.0 +more-itertools==10.8.0 # via cssutils mpmath==1.3.0 # via sympy @@ -798,7 +798,7 @@ nodeenv==1.9.1 # via -r requirements/edx/kernel.in numpy==1.26.4 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # chem # openedx-calc # scipy @@ -815,7 +815,7 @@ olxcleaner==0.3.0 # via -r requirements/edx/kernel.in openai==0.28.1 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # edx-enterprise openedx-atlas==0.7.0 # via @@ -851,7 +851,7 @@ openedx-forum==0.3.4 # via -r requirements/edx/kernel.in openedx-learning==0.27.1 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/kernel.in optimizely-sdk==5.2.0 # via -r requirements/edx/bundled.in @@ -867,7 +867,7 @@ paramiko==4.0.0 # via edx-enterprise path==16.11.0 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/kernel.in # edx-i18n-tools # path-py @@ -955,7 +955,7 @@ pymemcache==4.0.0 # via -r requirements/edx/kernel.in pymongo==4.4.0 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/kernel.in # edx-opaque-keys # event-tracking @@ -1135,7 +1135,7 @@ snowflake-connector-python==3.17.2 # via edx-enterprise social-auth-app-django==5.4.1 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/kernel.in # edx-auth-backends social-auth-core==4.7.0 @@ -1284,7 +1284,7 @@ xblocks-contrib==0.6.0 # via -r requirements/edx/bundled.in xmlsec==1.3.14 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # python3-saml xss-utils==0.8.0 # via -r requirements/edx/kernel.in diff --git a/requirements/edx/development.txt b/requirements/edx/development.txt index 74d1565505..696bafd459 100644 --- a/requirements/edx/development.txt +++ b/requirements/edx/development.txt @@ -161,7 +161,7 @@ bridgekeeper==0.9 # -r requirements/edx/testing.txt build==1.3.0 # via - # -r requirements/edx/../pip-tools.txt + # -r requirements/pip-tools.txt # pip-tools cachecontrol==0.14.3 # via @@ -182,7 +182,7 @@ camel-converter[pydantic]==4.0.1 # meilisearch celery==5.5.3 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt # django-celery-results @@ -228,11 +228,11 @@ chem==2.0.0 # -r requirements/edx/testing.txt click==8.2.1 # via - # -r requirements/edx/../pip-tools.txt # -r requirements/edx/assets.txt # -r requirements/edx/development.in # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt + # -r requirements/pip-tools.txt # celery # click-didyoumean # click-log @@ -337,7 +337,7 @@ distlib==0.4.0 # virtualenv django==4.2.23 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt # django-appconf @@ -465,7 +465,7 @@ django-crum==0.7.9 # super-csv django-debug-toolbar==5.2.0 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/development.in django-fernet-fields-v2==0.9 # via @@ -530,7 +530,7 @@ django-mysql==4.17.0 # -r requirements/edx/testing.txt django-oauth-toolkit==1.7.1 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt # edx-enterprise @@ -588,7 +588,7 @@ django-storages==1.14.6 # edxval django-stubs[compatible-mypy]==5.2.2 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/development.in # djangorestframework-stubs django-stubs-ext==5.2.2 @@ -608,7 +608,7 @@ django-waffle==5.0.0 # edx-toggles django-webpack-loader==0.7.0 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt # edx-proctoring @@ -754,7 +754,7 @@ edx-drf-extensions==10.6.0 # openedx-learning edx-enterprise==6.3.2 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt edx-event-bus-kafka==6.1.0 @@ -867,8 +867,8 @@ edxval==3.0.0 # -r requirements/edx/testing.txt elasticsearch==7.9.1 # via - # -c requirements/edx/../common_constraints.txt - # -c requirements/edx/../constraints.txt + # -c requirements/common_constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt # edx-search @@ -1197,7 +1197,7 @@ lazy==1.6 # xblock libsass==0.10.0 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/assets.txt loremipsum==1.0.5 # via @@ -1210,7 +1210,7 @@ lti-consumer-xblock==9.14.2 # -r requirements/edx/testing.txt lxml[html-clean]==5.3.2 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt # edx-i18n-tools @@ -1286,7 +1286,7 @@ monotonic==1.6 # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt # analytics-python -more-itertools==10.7.0 +more-itertools==10.8.0 # via # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt @@ -1335,7 +1335,7 @@ nodeenv==1.9.1 # -r requirements/edx/testing.txt numpy==1.26.4 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt # chem @@ -1357,7 +1357,7 @@ olxcleaner==0.3.0 # -r requirements/edx/testing.txt openai==0.28.1 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt # edx-enterprise @@ -1408,7 +1408,7 @@ openedx-forum==0.3.4 # -r requirements/edx/testing.txt openedx-learning==0.27.1 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt optimizely-sdk==5.2.0 @@ -1421,9 +1421,9 @@ ora2==6.16.4 # -r requirements/edx/testing.txt packaging==25.0 # via - # -r requirements/edx/../pip-tools.txt # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt + # -r requirements/pip-tools.txt # build # drf-yasg # gunicorn @@ -1443,7 +1443,7 @@ paramiko==4.0.0 # edx-enterprise path==16.11.0 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt # edx-i18n-tools @@ -1477,10 +1477,8 @@ pillow==11.3.0 # edx-enterprise # edx-organizations # edxval -pip-tools==7.4.1 - # via - # -c requirements/edx/../constraints.txt - # -r requirements/edx/../pip-tools.txt +pip-tools==7.5.0 + # via -r requirements/pip-tools.txt platformdirs==4.4.0 # via # -r requirements/edx/doc.txt @@ -1550,7 +1548,7 @@ pyasn1-modules==0.4.2 # google-auth pycodestyle==2.8.0 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/testing.txt pycountry==24.6.1 # via @@ -1648,7 +1646,7 @@ pymemcache==4.0.0 # -r requirements/edx/testing.txt pymongo==4.4.0 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt # edx-opaque-keys @@ -1682,7 +1680,7 @@ pyproject-api==1.9.1 # tox pyproject-hooks==1.2.0 # via - # -r requirements/edx/../pip-tools.txt + # -r requirements/pip-tools.txt # build # pip-tools pyquery==2.0.1 @@ -1966,7 +1964,7 @@ snowflake-connector-python==3.17.2 # edx-enterprise social-auth-app-django==5.4.1 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt # edx-auth-backends @@ -2241,9 +2239,9 @@ webob==1.8.9 # xblock wheel==0.45.1 # via - # -r requirements/edx/../pip-tools.txt # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt + # -r requirements/pip-tools.txt # django-pipeline # pip-tools wrapt==1.17.3 @@ -2291,7 +2289,7 @@ xblocks-contrib==0.6.0 # -r requirements/edx/testing.txt xmlsec==1.3.14 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt # python3-saml diff --git a/requirements/edx/doc.txt b/requirements/edx/doc.txt index 9de665c477..8d734f6bcc 100644 --- a/requirements/edx/doc.txt +++ b/requirements/edx/doc.txt @@ -135,7 +135,7 @@ camel-converter[pydantic]==4.0.1 # meilisearch celery==5.5.3 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/base.txt # django-celery-results # django-user-tasks @@ -229,7 +229,7 @@ defusedxml==0.7.1 # social-auth-core django==4.2.23 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/base.txt # django-appconf # django-autocomplete-light @@ -391,7 +391,7 @@ django-mysql==4.17.0 # via -r requirements/edx/base.txt django-oauth-toolkit==1.7.1 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/base.txt # edx-enterprise # enterprise-integrated-channels @@ -446,7 +446,7 @@ django-waffle==5.0.0 # edx-toggles django-webpack-loader==0.7.0 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/base.txt # edx-proctoring djangorestframework==3.16.1 @@ -562,7 +562,7 @@ edx-drf-extensions==10.6.0 # openedx-learning edx-enterprise==6.3.2 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/base.txt edx-event-bus-kafka==6.1.0 # via -r requirements/edx/base.txt @@ -648,8 +648,8 @@ edxval==3.0.0 # via -r requirements/edx/base.txt elasticsearch==7.9.1 # via - # -c requirements/edx/../common_constraints.txt - # -c requirements/edx/../constraints.txt + # -c requirements/common_constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/base.txt # edx-search # openedx-forum @@ -883,7 +883,7 @@ lti-consumer-xblock==9.14.2 # via -r requirements/edx/base.txt lxml[html-clean]==5.3.2 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/base.txt # edx-i18n-tools # edxval @@ -938,7 +938,7 @@ monotonic==1.6 # via # -r requirements/edx/base.txt # analytics-python -more-itertools==10.7.0 +more-itertools==10.8.0 # via # -r requirements/edx/base.txt # cssutils @@ -971,7 +971,7 @@ nodeenv==1.9.1 # via -r requirements/edx/base.txt numpy==1.26.4 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/base.txt # chem # openedx-calc @@ -989,7 +989,7 @@ olxcleaner==0.3.0 # via -r requirements/edx/base.txt openai==0.28.1 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/base.txt # edx-enterprise openedx-atlas==0.7.0 @@ -1027,7 +1027,7 @@ openedx-forum==0.3.4 # via -r requirements/edx/base.txt openedx-learning==0.27.1 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/base.txt optimizely-sdk==5.2.0 # via -r requirements/edx/base.txt @@ -1048,7 +1048,7 @@ paramiko==4.0.0 # edx-enterprise path==16.11.0 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/base.txt # edx-i18n-tools # path-py @@ -1169,7 +1169,7 @@ pymemcache==4.0.0 # via -r requirements/edx/base.txt pymongo==4.4.0 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/base.txt # edx-opaque-keys # event-tracking @@ -1390,7 +1390,7 @@ snowflake-connector-python==3.17.2 # edx-enterprise social-auth-app-django==5.4.1 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/base.txt # edx-auth-backends social-auth-core==4.7.0 @@ -1613,7 +1613,7 @@ xblocks-contrib==0.6.0 # via -r requirements/edx/base.txt xmlsec==1.3.14 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/base.txt # python3-saml xss-utils==0.8.0 diff --git a/requirements/edx/testing.txt b/requirements/edx/testing.txt index 03dea1d943..224a521f14 100644 --- a/requirements/edx/testing.txt +++ b/requirements/edx/testing.txt @@ -133,7 +133,7 @@ camel-converter[pydantic]==4.0.1 # meilisearch celery==5.5.3 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/base.txt # django-celery-results # django-user-tasks @@ -255,7 +255,7 @@ distlib==0.4.0 # via virtualenv django==4.2.23 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/base.txt # django-appconf # django-autocomplete-light @@ -417,7 +417,7 @@ django-mysql==4.17.0 # via -r requirements/edx/base.txt django-oauth-toolkit==1.7.1 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/base.txt # edx-enterprise # enterprise-integrated-channels @@ -472,7 +472,7 @@ django-waffle==5.0.0 # edx-toggles django-webpack-loader==0.7.0 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/base.txt # edx-proctoring djangorestframework==3.16.1 @@ -583,7 +583,7 @@ edx-drf-extensions==10.6.0 # openedx-learning edx-enterprise==6.3.2 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/base.txt edx-event-bus-kafka==6.1.0 # via -r requirements/edx/base.txt @@ -671,8 +671,8 @@ edxval==3.0.0 # via -r requirements/edx/base.txt elasticsearch==7.9.1 # via - # -c requirements/edx/../common_constraints.txt - # -c requirements/edx/../constraints.txt + # -c requirements/common_constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/base.txt # edx-search # openedx-forum @@ -924,7 +924,7 @@ lti-consumer-xblock==9.14.2 # via -r requirements/edx/base.txt lxml[html-clean]==5.3.2 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/base.txt # edx-i18n-tools # edxval @@ -983,7 +983,7 @@ monotonic==1.6 # via # -r requirements/edx/base.txt # analytics-python -more-itertools==10.7.0 +more-itertools==10.8.0 # via # -r requirements/edx/base.txt # cssutils @@ -1016,7 +1016,7 @@ nodeenv==1.9.1 # via -r requirements/edx/base.txt numpy==1.26.4 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/base.txt # chem # openedx-calc @@ -1034,7 +1034,7 @@ olxcleaner==0.3.0 # via -r requirements/edx/base.txt openai==0.28.1 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/base.txt # edx-enterprise openedx-atlas==0.7.0 @@ -1072,7 +1072,7 @@ openedx-forum==0.3.4 # via -r requirements/edx/base.txt openedx-learning==0.27.1 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/base.txt optimizely-sdk==5.2.0 # via -r requirements/edx/base.txt @@ -1096,7 +1096,7 @@ paramiko==4.0.0 # edx-enterprise path==16.11.0 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/base.txt # edx-i18n-tools # path-py @@ -1179,7 +1179,7 @@ pyasn1-modules==0.4.2 # google-auth pycodestyle==2.8.0 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/testing.in pycountry==24.6.1 # via -r requirements/edx/base.txt @@ -1248,7 +1248,7 @@ pymemcache==4.0.0 # via -r requirements/edx/base.txt pymongo==4.4.0 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/base.txt # edx-opaque-keys # event-tracking @@ -1496,7 +1496,7 @@ snowflake-connector-python==3.17.2 # edx-enterprise social-auth-app-django==5.4.1 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/base.txt # edx-auth-backends social-auth-core==4.7.0 @@ -1695,7 +1695,7 @@ xblocks-contrib==0.6.0 # via -r requirements/edx/base.txt xmlsec==1.3.14 # via - # -c requirements/edx/../constraints.txt + # -c requirements/constraints.txt # -r requirements/edx/base.txt # python3-saml xss-utils==0.8.0 diff --git a/requirements/pip-tools.txt b/requirements/pip-tools.txt index 21e3389916..b19a4faaa0 100644 --- a/requirements/pip-tools.txt +++ b/requirements/pip-tools.txt @@ -10,10 +10,8 @@ click==8.2.1 # via pip-tools packaging==25.0 # via build -pip-tools==7.4.1 - # via - # -c requirements/constraints.txt - # -r requirements/pip-tools.in +pip-tools==7.5.0 + # via -r requirements/pip-tools.in pyproject-hooks==1.2.0 # via # build diff --git a/requirements/pip.txt b/requirements/pip.txt index dabfa8f0eb..dec15874f7 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -8,9 +8,7 @@ wheel==0.45.1 # via -r requirements/pip.in # The following packages are considered to be unsafe in a requirements file: -pip==24.2 - # via - # -c requirements/common_constraints.txt - # -r requirements/pip.in +pip==25.2 + # via -r requirements/pip.in setuptools==80.9.0 # via -r requirements/pip.in diff --git a/scripts/structures_pruning/requirements/base.txt b/scripts/structures_pruning/requirements/base.txt index 9a0bf10bf3..7afeac7d9d 100644 --- a/scripts/structures_pruning/requirements/base.txt +++ b/scripts/structures_pruning/requirements/base.txt @@ -16,7 +16,7 @@ edx-opaque-keys==3.0.0 # via -r scripts/structures_pruning/requirements/base.in pymongo==4.4.0 # via - # -c scripts/structures_pruning/requirements/../../../requirements/constraints.txt + # -c requirements/constraints.txt # -r scripts/structures_pruning/requirements/base.in # edx-opaque-keys stevedore==5.5.0 diff --git a/scripts/user_retirement/requirements/base.txt b/scripts/user_retirement/requirements/base.txt index 11aeade054..8fe3ef5ca6 100644 --- a/scripts/user_retirement/requirements/base.txt +++ b/scripts/user_retirement/requirements/base.txt @@ -34,7 +34,7 @@ cryptography==45.0.7 # via pyjwt django==4.2.23 # via - # -c scripts/user_retirement/requirements/../../../requirements/constraints.txt + # -c requirements/constraints.txt # django-crum # django-waffle # edx-django-utils @@ -48,7 +48,7 @@ edx-rest-api-client==6.2.0 # via -r scripts/user_retirement/requirements/base.in google-api-core==2.25.1 # via google-api-python-client -google-api-python-client==2.179.0 +google-api-python-client==2.181.0 # via -r scripts/user_retirement/requirements/base.in google-auth==2.40.3 # via @@ -75,9 +75,9 @@ jmespath==1.0.1 # botocore lxml==5.3.2 # via - # -c scripts/user_retirement/requirements/../../../requirements/constraints.txt + # -c requirements/constraints.txt # zeep -more-itertools==10.7.0 +more-itertools==10.8.0 # via simple-salesforce platformdirs==4.4.0 # via zeep diff --git a/scripts/user_retirement/requirements/testing.txt b/scripts/user_retirement/requirements/testing.txt index d6c4c10150..997681c328 100644 --- a/scripts/user_retirement/requirements/testing.txt +++ b/scripts/user_retirement/requirements/testing.txt @@ -76,7 +76,7 @@ google-api-core==2.25.1 # via # -r scripts/user_retirement/requirements/base.txt # google-api-python-client -google-api-python-client==2.179.0 +google-api-python-client==2.181.0 # via -r scripts/user_retirement/requirements/base.txt google-auth==2.40.3 # via @@ -126,7 +126,7 @@ markupsafe==3.0.2 # werkzeug mock==5.2.0 # via -r scripts/user_retirement/requirements/testing.in -more-itertools==10.7.0 +more-itertools==10.8.0 # via # -r scripts/user_retirement/requirements/base.txt # simple-salesforce From 790a67a0d13229dc76261b6e1bce423d7a65589f Mon Sep 17 00:00:00 2001 From: coder1918 Date: Tue, 2 Sep 2025 23:54:05 -0600 Subject: [PATCH 03/18] refactor: flatten FEATURES dictionary with backward compatible proxy --- cms/envs/common.py | 652 +++--- cms/envs/devstack.py | 28 +- cms/envs/production.py | 11 +- cms/envs/test.py | 37 +- lms/djangoapps/discussion/settings/common.py | 2 +- lms/djangoapps/instructor/settings/common.py | 180 +- .../instructor/settings/production.py | 4 +- lms/djangoapps/instructor/settings/test.py | 4 +- lms/envs/common.py | 2007 +++++++++-------- lms/envs/devstack.py | 66 +- lms/envs/production.py | 25 +- lms/envs/test.py | 55 +- .../djangoapps/ace_common/settings/common.py | 2 +- .../core/djangoapps/models/course_details.py | 5 +- openedx/core/lib/features_setting_proxy.py | 106 + openedx/envs/common.py | 2 + .../features/announcements/settings/common.py | 4 +- .../features/announcements/settings/test.py | 2 +- 18 files changed, 1657 insertions(+), 1535 deletions(-) create mode 100644 openedx/core/lib/features_setting_proxy.py diff --git a/cms/envs/common.py b/cms/envs/common.py index 13811d2a13..273eb9f191 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -66,6 +66,10 @@ from openedx.core.djangoapps.theming.helpers_dirs import ( from openedx.core.lib.license import LicenseMixin from openedx.core.lib.derived import Derived from openedx.core.release import doc_version +from openedx.core.lib.features_setting_proxy import FeaturesProxy + +# A proxy for feature flags stored in the settings namespace +FEATURES = FeaturesProxy(globals()) # pylint: enable=useless-suppression @@ -110,387 +114,385 @@ FAVICON_PATH = 'images/favicon.ico' # templates. STUDIO_NAME = _("Your Platform Studio") STUDIO_SHORT_NAME = _("Studio") -FEATURES = { - 'GITHUB_PUSH': False, - # See annotations in lms/envs/common.py for details. - 'ENABLE_DISCUSSION_SERVICE': True, - # See annotations in lms/envs/common.py for details. - 'ENABLE_TEXTBOOK': True, +# FEATURES - # When True, all courses will be active, regardless of start date - # DO NOT SET TO True IN THIS FILE - # Doing so will cause all courses to be released on production - 'DISABLE_START_DATES': False, +GITHUB_PUSH = False - # email address for studio staff (eg to request course creation) - 'STUDIO_REQUEST_EMAIL': '', +# See annotations in lms/envs/common.py for details. +ENABLE_DISCUSSION_SERVICE = True +# See annotations in lms/envs/common.py for details. +ENABLE_TEXTBOOK = True - # Segment - must explicitly turn it on for production - 'CMS_SEGMENT_KEY': None, +# When True, all courses will be active, regardless of start date +# DO NOT SET TO True IN THIS FILE +# Doing so will cause all courses to be released on production +DISABLE_START_DATES = False - # Enable URL that shows information about the status of various services - 'ENABLE_SERVICE_STATUS': False, +# email address for studio staff (eg to request course creation) +STUDIO_REQUEST_EMAIL = '' - # Don't autoplay videos for course authors - 'AUTOPLAY_VIDEOS': False, +# Segment - must explicitly turn it on for production +CMS_SEGMENT_KEY = None - # Move the course author to next page when a video finishes. Set to True to - # show an auto-advance button in videos. If False, videos never auto-advance. - 'ENABLE_AUTOADVANCE_VIDEOS': False, +# Enable URL that shows information about the status of various services +ENABLE_SERVICE_STATUS = False - # If set to True, new Studio users won't be able to author courses unless - # an Open edX admin has added them to the course creator group. - 'ENABLE_CREATOR_GROUP': True, +# Don't autoplay videos for course authors +AUTOPLAY_VIDEOS = False - # If set to True, organization staff members can create libraries for their specific - # organization and no other organizations. They do not need to be course creators, - # even when ENABLE_CREATOR_GROUP is True. - 'ENABLE_ORGANIZATION_STAFF_ACCESS_FOR_CONTENT_LIBRARIES': True, +# Move the course author to next page when a video finishes. Set to True to +# show an auto-advance button in videos. If False, videos never auto-advance. +ENABLE_AUTOADVANCE_VIDEOS = False - # Turn off account locking if failed login attempts exceeds a limit - 'ENABLE_MAX_FAILED_LOGIN_ATTEMPTS': False, +# If set to True, new Studio users won't be able to author courses unless +# an Open edX admin has added them to the course creator group. +ENABLE_CREATOR_GROUP = True - # .. toggle_name: FEATURES['EDITABLE_SHORT_DESCRIPTION'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: True - # .. toggle_description: This feature flag allows editing of short descriptions on the Schedule & Details page in - # Open edX Studio. Set to False if you want to disable the editing of the course short description. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2014-02-13 - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/2334 - 'EDITABLE_SHORT_DESCRIPTION': True, +# If set to True, organization staff members can create libraries for their specific +# organization and no other organizations. They do not need to be course creators, +# even when ENABLE_CREATOR_GROUP is True. +ENABLE_ORGANIZATION_STAFF_ACCESS_FOR_CONTENT_LIBRARIES = True - # Hide any Personally Identifiable Information from application logs - 'SQUELCH_PII_IN_LOGS': False, +# Turn off account locking if failed login attempts exceeds a limit +ENABLE_MAX_FAILED_LOGIN_ATTEMPTS = False - # Toggles the embargo functionality, which blocks users - # based on their location. - 'EMBARGO': False, +# .. toggle_name: settings.EDITABLE_SHORT_DESCRIPTION +# .. toggle_implementation: DjangoSetting +# .. toggle_default: True +# .. toggle_description: This feature flag allows editing of short descriptions on the Schedule & Details page in +# Open edX Studio. Set to False if you want to disable the editing of the course short description. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2014-02-13 +# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/2334 +EDITABLE_SHORT_DESCRIPTION = True - # Allow creating courses with non-ascii characters in the course id - 'ALLOW_UNICODE_COURSE_ID': False, +# Hide any Personally Identifiable Information from application logs +SQUELCH_PII_IN_LOGS = False - # Prevent concurrent logins per user - 'PREVENT_CONCURRENT_LOGINS': False, +# Toggles the embargo functionality, which blocks users +# based on their location. +EMBARGO = False - # Turn off Video Upload Pipeline through Studio, by default - 'ENABLE_VIDEO_UPLOAD_PIPELINE': False, +# Allow creating courses with non-ascii characters in the course id +ALLOW_UNICODE_COURSE_ID = False - # See annotations in lms/envs/common.py for details. - 'ENABLE_EDXNOTES': False, +# Prevent concurrent logins per user +PREVENT_CONCURRENT_LOGINS = False - # Toggle to enable coordination with the Publisher tool (keep in sync with lms/envs/common.py) - 'ENABLE_PUBLISHER': False, +# Turn off Video Upload Pipeline through Studio, by default +ENABLE_VIDEO_UPLOAD_PIPELINE = False - # Show a new field in "Advanced settings" that can store custom data about a - # course and that can be read from themes - 'ENABLE_OTHER_COURSE_SETTINGS': False, +# See annotations in lms/envs/common.py for details. +ENABLE_EDXNOTES = False - # Write new CSM history to the extended table. - # This will eventually default to True and may be - # removed since all installs should have the separate - # extended history table. This is needed in the LMS and CMS - # for migration consistency. - 'ENABLE_CSMH_EXTENDED': True, +# Toggle to enable coordination with the Publisher tool (keep in sync with lms/envs/common.py) +ENABLE_PUBLISHER = False - # Enable support for content libraries. Note that content libraries are - # only supported in courses using split mongo. - 'ENABLE_CONTENT_LIBRARIES': True, +# Show a new field in "Advanced settings" that can store custom data about a +# course and that can be read from themes +ENABLE_OTHER_COURSE_SETTINGS = False - # .. toggle_name: FEATURES['ENABLE_CONTENT_LIBRARIES_LTI_TOOL'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: When set to True, Content Libraries in - # Studio can be used as an LTI 1.3 tool by external LTI platforms. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2021-08-17 - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/27411 - 'ENABLE_CONTENT_LIBRARIES_LTI_TOOL': False, +# Write new CSM history to the extended table. +# This will eventually default to True and may be +# removed since all installs should have the separate +# extended history table. This is needed in the LMS and CMS +# for migration consistency. +ENABLE_CSMH_EXTENDED = True - # Milestones application flag - 'MILESTONES_APP': False, +# Enable support for content libraries. Note that content libraries are +# only supported in courses using split mongo. +ENABLE_CONTENT_LIBRARIES = True - # Prerequisite courses feature flag - 'ENABLE_PREREQUISITE_COURSES': False, +# .. toggle_name: settings.ENABLE_CONTENT_LIBRARIES_LTI_TOOL +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: When set to True, Content Libraries in +# Studio can be used as an LTI 1.3 tool by external LTI platforms. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2021-08-17 +# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/27411 +ENABLE_CONTENT_LIBRARIES_LTI_TOOL = False - # Toggle course entrance exams feature - 'ENTRANCE_EXAMS': False, +# Milestones application flag +MILESTONES_APP = False - # Toggle platform-wide course licensing - 'LICENSING': False, +# Prerequisite courses feature flag +ENABLE_PREREQUISITE_COURSES = False - # Enable the courseware search functionality - 'ENABLE_COURSEWARE_INDEX': False, +# Toggle course entrance exams feature +ENTRANCE_EXAMS = False - # Enable content libraries (modulestore) search functionality - 'ENABLE_LIBRARY_INDEX': False, +# Toggle platform-wide course licensing +LICENSING = False - # .. toggle_name: FEATURES['ALLOW_COURSE_RERUNS'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: True - # .. toggle_description: This will allow staff member to re-run the course from the studio home page and will - # always use the split modulestore. When this is set to False, the Re-run Course link will not be available on - # the studio home page. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2015-02-13 - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/6965 - 'ALLOW_COURSE_RERUNS': True, +# Enable the courseware search functionality +ENABLE_COURSEWARE_INDEX = False - # Certificates Web/HTML Views - 'CERTIFICATES_HTML_VIEW': False, +# Enable content libraries (modulestore) search functionality +ENABLE_LIBRARY_INDEX = False - # Teams feature - 'ENABLE_TEAMS': True, +# .. toggle_name: settings.ALLOW_COURSE_RERUNS +# .. toggle_implementation: DjangoSetting +# .. toggle_default: True +# .. toggle_description: This will allow staff member to re-run the course from the studio home page and will +# always use the split modulestore. When this is set to False, the Re-run Course link will not be available on +# the studio home page. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2015-02-13 +# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/6965 +ALLOW_COURSE_RERUNS = True - # Show video bumper in Studio - 'ENABLE_VIDEO_BUMPER': False, +# Certificates Web/HTML Views +CERTIFICATES_HTML_VIEW = False - # How many seconds to show the bumper again, default is 7 days: - 'SHOW_BUMPER_PERIODICITY': 7 * 24 * 3600, +# Teams feature +ENABLE_TEAMS = True - # Enable credit eligibility feature - 'ENABLE_CREDIT_ELIGIBILITY': ENABLE_CREDIT_ELIGIBILITY, +# Show video bumper in Studio +ENABLE_VIDEO_BUMPER = False - # Special Exams, aka Timed and Proctored Exams - 'ENABLE_SPECIAL_EXAMS': False, +# How many seconds to show the bumper again, default is 7 days: +SHOW_BUMPER_PERIODICITY = 7 * 24 * 3600 - # Show the language selector in the header - 'SHOW_HEADER_LANGUAGE_SELECTOR': False, +# Special Exams, aka Timed and Proctored Exams +ENABLE_SPECIAL_EXAMS = False - # At edX it's safe to assume that English transcripts are always available - # This is not the case for all installations. - # The default value in {lms,cms}/envs/common.py and xmodule/tests/test_video.py should be consistent. - 'FALLBACK_TO_ENGLISH_TRANSCRIPTS': True, +# Show the language selector in the header +SHOW_HEADER_LANGUAGE_SELECTOR = False - # Set this to False to facilitate cleaning up invalid xml from your modulestore. - 'ENABLE_XBLOCK_XML_VALIDATION': True, +# At edX it's safe to assume that English transcripts are always available +# This is not the case for all installations. +# The default value in {lms,cms}/envs/common.py and xmodule/tests/test_video.py should be consistent. +FALLBACK_TO_ENGLISH_TRANSCRIPTS = True - # Allow public account creation - 'ALLOW_PUBLIC_ACCOUNT_CREATION': True, +# Set this to False to facilitate cleaning up invalid xml from your modulestore. +ENABLE_XBLOCK_XML_VALIDATION = True - # Allow showing the registration links - 'SHOW_REGISTRATION_LINKS': True, +# Allow public account creation +ALLOW_PUBLIC_ACCOUNT_CREATION = True - # Whether or not the dynamic EnrollmentTrackUserPartition should be registered. - 'ENABLE_ENROLLMENT_TRACK_USER_PARTITION': True, +# Allow showing the registration links +SHOW_REGISTRATION_LINKS = True - 'ENABLE_PASSWORD_RESET_FAILURE_EMAIL': False, +# Whether or not the dynamic EnrollmentTrackUserPartition should be registered. +ENABLE_ENROLLMENT_TRACK_USER_PARTITION = True - # Whether archived courses (courses with end dates in the past) should be - # shown in Studio in a separate list. - 'ENABLE_SEPARATE_ARCHIVED_COURSES': True, +ENABLE_PASSWORD_RESET_FAILURE_EMAIL = False - # For acceptance and load testing - 'AUTOMATIC_AUTH_FOR_TESTING': False, +# Whether archived courses (courses with end dates in the past) should be +# shown in Studio in a separate list. +ENABLE_SEPARATE_ARCHIVED_COURSES = True - # Prevent auto auth from creating superusers or modifying existing users - 'RESTRICT_AUTOMATIC_AUTH': True, +# For acceptance and load testing +AUTOMATIC_AUTH_FOR_TESTING = False - 'ENABLE_GRADE_DOWNLOADS': True, - 'ENABLE_MKTG_SITE': False, - 'ENABLE_DISCUSSION_HOME_PANEL': True, - 'ENABLE_CORS_HEADERS': False, - 'ENABLE_CROSS_DOMAIN_CSRF_COOKIE': False, - 'ENABLE_COUNTRY_ACCESS': False, - 'ENABLE_CREDIT_API': False, - 'ENABLE_OAUTH2_PROVIDER': False, - 'ENABLE_MOBILE_REST_API': False, - 'CUSTOM_COURSES_EDX': False, - 'ENABLE_READING_FROM_MULTIPLE_HISTORY_TABLES': True, - 'SHOW_FOOTER_LANGUAGE_SELECTOR': False, - 'ENABLE_ENROLLMENT_RESET': False, - # Settings for course import olx validation - 'ENABLE_COURSE_OLX_VALIDATION': False, - # .. toggle_name: FEATURES['DISABLE_MOBILE_COURSE_AVAILABLE'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Set to True to remove Mobile Course Available UI Flag from Studio's Advanced Settings - # page else Mobile Course Available UI Flag will be available on Studio side. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2020-02-14 - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/23073 - 'DISABLE_MOBILE_COURSE_AVAILABLE': False, +# Prevent auto auth from creating superusers or modifying existing users +RESTRICT_AUTOMATIC_AUTH = True - # .. toggle_name: FEATURES['ENABLE_CHANGE_USER_PASSWORD_ADMIN'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Set to True to enable changing a user password through django admin. This is disabled by - # default because enabling allows a method to bypass password policy. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2020-02-21 - # .. toggle_tickets: 'https://github.com/openedx/edx-platform/pull/21616' - 'ENABLE_CHANGE_USER_PASSWORD_ADMIN': False, +ENABLE_GRADE_DOWNLOADS = True +ENABLE_MKTG_SITE = False +ENABLE_DISCUSSION_HOME_PANEL = True +ENABLE_CORS_HEADERS = False +ENABLE_CROSS_DOMAIN_CSRF_COOKIE = False +ENABLE_COUNTRY_ACCESS = False +ENABLE_CREDIT_API = False +ENABLE_OAUTH2_PROVIDER = False +ENABLE_MOBILE_REST_API = False +CUSTOM_COURSES_EDX = False +ENABLE_READING_FROM_MULTIPLE_HISTORY_TABLES = True +SHOW_FOOTER_LANGUAGE_SELECTOR = False +ENABLE_ENROLLMENT_RESET = False +# Settings for course import olx validation +ENABLE_COURSE_OLX_VALIDATION = False +# .. toggle_name: settings.DISABLE_MOBILE_COURSE_AVAILABLE +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: Set to True to remove Mobile Course Available UI Flag from Studio's Advanced Settings +# page else Mobile Course Available UI Flag will be available on Studio side. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2020-02-14 +# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/23073 +DISABLE_MOBILE_COURSE_AVAILABLE = False - ### ORA Feature Flags ### - # .. toggle_name: FEATURES['ENABLE_ORA_ALL_FILE_URLS'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: A "work-around" feature toggle meant to help in cases where some file uploads are not - # discoverable. If enabled, will iterate through all possible file key suffixes up to the max for displaying file - # metadata in staff assessments. - # .. toggle_use_cases: temporary - # .. toggle_creation_date: 2020-03-03 - # .. toggle_target_removal_date: None - # .. toggle_tickets: https://openedx.atlassian.net/browse/EDUCATOR-4951 - # .. toggle_warning: This temporary feature toggle does not have a target removal date. - 'ENABLE_ORA_ALL_FILE_URLS': False, +# .. toggle_name: settings.ENABLE_CHANGE_USER_PASSWORD_ADMIN +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: Set to True to enable changing a user password through django admin. This is disabled by +# default because enabling allows a method to bypass password policy. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2020-02-21 +# .. toggle_tickets: 'https://github.com/openedx/edx-platform/pull/21616' +ENABLE_CHANGE_USER_PASSWORD_ADMIN = False - # .. toggle_name: FEATURES['ENABLE_ORA_USER_STATE_UPLOAD_DATA'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: A "work-around" feature toggle meant to help in cases where some file uploads are not - # discoverable. If enabled, will pull file metadata from StudentModule.state for display in staff assessments. - # .. toggle_use_cases: temporary - # .. toggle_creation_date: 2020-03-03 - # .. toggle_target_removal_date: None - # .. toggle_tickets: https://openedx.atlassian.net/browse/EDUCATOR-4951 - # .. toggle_warning: This temporary feature toggle does not have a target removal date. - 'ENABLE_ORA_USER_STATE_UPLOAD_DATA': False, +### ORA Feature Flags ### +# .. toggle_name: settings.ENABLE_ORA_ALL_FILE_URLS +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: A "work-around" feature toggle meant to help in cases where some file uploads are not +# discoverable. If enabled, will iterate through all possible file key suffixes up to the max for displaying file +# metadata in staff assessments. +# .. toggle_use_cases: temporary +# .. toggle_creation_date: 2020-03-03 +# .. toggle_target_removal_date: None +# .. toggle_tickets: https://openedx.atlassian.net/browse/EDUCATOR-4951 +# .. toggle_warning: This temporary feature toggle does not have a target removal date. +ENABLE_ORA_ALL_FILE_URLS = False - # .. toggle_name: FEATURES['DEPRECATE_OLD_COURSE_KEYS_IN_STUDIO'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: True - # .. toggle_description: Warn about removing support for deprecated course keys. - # To enable, set to True. - # To disable, set to False. - # To enable with a custom support deadline, set to an ISO-8601 date string: - # eg: '2020-09-01' - # .. toggle_use_cases: temporary - # .. toggle_creation_date: 2020-06-12 - # .. toggle_target_removal_date: 2021-04-01 - # .. toggle_warning: This can be removed once support is removed for deprecated - # course keys. - # .. toggle_tickets: https://openedx.atlassian.net/browse/DEPR-58 - 'DEPRECATE_OLD_COURSE_KEYS_IN_STUDIO': True, +# .. toggle_name: settings.ENABLE_ORA_USER_STATE_UPLOAD_DATA +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: A "work-around" feature toggle meant to help in cases where some file uploads are not +# discoverable. If enabled, will pull file metadata from StudentModule.state for display in staff assessments. +# .. toggle_use_cases: temporary +# .. toggle_creation_date: 2020-03-03 +# .. toggle_target_removal_date: None +# .. toggle_tickets: https://openedx.atlassian.net/browse/EDUCATOR-4951 +# .. toggle_warning: This temporary feature toggle does not have a target removal date. +ENABLE_ORA_USER_STATE_UPLOAD_DATA = False - # .. toggle_name: FEATURES['DISABLE_COURSE_CREATION'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: If set to True, it disables the course creation functionality and hides the "New Course" - # button in studio. - # It is important to note that the value of this flag only affects if the user doesn't have a staff role, - # otherwise the course creation functionality will work as it should. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2013-12-02 - # .. toggle_warning: Another toggle DISABLE_LIBRARY_CREATION overrides DISABLE_COURSE_CREATION, if present. - 'DISABLE_COURSE_CREATION': False, +# .. toggle_name: settings.DEPRECATE_OLD_COURSE_KEYS_IN_STUDIO +# .. toggle_implementation: DjangoSetting +# .. toggle_default: True +# .. toggle_description: Warn about removing support for deprecated course keys. +# To enable, set to True. +# To disable, set to False. +# To enable with a custom support deadline, set to an ISO-8601 date string: +# eg: '2020-09-01' +# .. toggle_use_cases: temporary +# .. toggle_creation_date: 2020-06-12 +# .. toggle_target_removal_date: 2021-04-01 +# .. toggle_warning: This can be removed once support is removed for deprecated +# course keys. +# .. toggle_tickets: https://openedx.atlassian.net/browse/DEPR-58 +DEPRECATE_OLD_COURSE_KEYS_IN_STUDIO = True - # Can be turned off to disable the help link in the navbar - # .. toggle_name: FEATURES['ENABLE_HELP_LINK'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: True - # .. toggle_description: When True, a help link is displayed on the main navbar. Set False to hide it. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2021-03-05 - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/26106 - 'ENABLE_HELP_LINK': True, +# .. toggle_name: settings.DISABLE_COURSE_CREATION +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: If set to True, it disables the course creation functionality and hides the "New Course" +# button in studio. +# It is important to note that the value of this flag only affects if the user doesn't have a staff role, +# otherwise the course creation functionality will work as it should. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2013-12-02 +# .. toggle_warning: Another toggle DISABLE_LIBRARY_CREATION overrides DISABLE_COURSE_CREATION, if present. +DISABLE_COURSE_CREATION = False - # .. toggle_name: FEATURES['ENABLE_INTEGRITY_SIGNATURE'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Whether to replace ID verification course/certificate requirement - # with an in-course Honor Code agreement - # (https://github.com/edx/edx-name-affirmation) - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2022-02-15 - # .. toggle_target_removal_date: None - # .. toggle_tickets: 'https://openedx.atlassian.net/browse/MST-1348' - 'ENABLE_INTEGRITY_SIGNATURE': False, +# Can be turned off to disable the help link in the navbar +# .. toggle_name: settings.ENABLE_HELP_LINK +# .. toggle_implementation: DjangoSetting +# .. toggle_default: True +# .. toggle_description: When True, a help link is displayed on the main navbar. Set False to hide it. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2021-03-05 +# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/26106 +ENABLE_HELP_LINK = True - # .. toggle_name: FEATURES['ENABLE_LTI_PII_ACKNOWLEDGEMENT'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Enables the lti pii acknowledgement feature for a course - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2023-10 - # .. toggle_target_removal_date: None - # .. toggle_tickets: 'https://2u-internal.atlassian.net/browse/MST-2055' - 'ENABLE_LTI_PII_ACKNOWLEDGEMENT': False, +# .. toggle_name: settings.ENABLE_INTEGRITY_SIGNATURE +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: Whether to replace ID verification course/certificate requirement +# with an in-course Honor Code agreement +# (https://github.com/edx/edx-name-affirmation) +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2022-02-15 +# .. toggle_target_removal_date: None +# .. toggle_tickets: 'https://openedx.atlassian.net/browse/MST-1348' +ENABLE_INTEGRITY_SIGNATURE = False - # .. toggle_name: MARK_LIBRARY_CONTENT_BLOCK_COMPLETE_ON_VIEW - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: If enabled, the Library Content Block is marked as complete when users view it. - # Otherwise (by default), all children of this block must be completed. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2022-03-22 - # .. toggle_target_removal_date: None - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/28268 - # .. toggle_warning: For consistency in user-experience, keep the value in sync with the setting of the same name - # in the LMS and CMS. - 'MARK_LIBRARY_CONTENT_BLOCK_COMPLETE_ON_VIEW': False, +# .. toggle_name: settings.ENABLE_LTI_PII_ACKNOWLEDGEMENT +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: Enables the lti pii acknowledgement feature for a course +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2023-10 +# .. toggle_target_removal_date: None +# .. toggle_tickets: 'https://2u-internal.atlassian.net/browse/MST-2055' +ENABLE_LTI_PII_ACKNOWLEDGEMENT = False - # .. toggle_name: FEATURES['DISABLE_UNENROLLMENT'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Set to True to disable self-unenrollments via REST API. - # This also hides the "Unenroll" button on the Learner Dashboard. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2021-10-11 - # .. toggle_warning: For consistency in user experience, keep the value in sync with the setting of the same name - # in the LMS and CMS. - # .. toggle_tickets: 'https://github.com/open-craft/edx-platform/pull/429' - 'DISABLE_UNENROLLMENT': False, +# .. toggle_name: MARK_LIBRARY_CONTENT_BLOCK_COMPLETE_ON_VIEW +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: If enabled, the Library Content Block is marked as complete when users view it. +# Otherwise (by default), all children of this block must be completed. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2022-03-22 +# .. toggle_target_removal_date: None +# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/28268 +# .. toggle_warning: For consistency in user-experience, keep the value in sync with the setting of the same name +# in the LMS and CMS. +MARK_LIBRARY_CONTENT_BLOCK_COMPLETE_ON_VIEW = False - # .. toggle_name: FEATURES['DISABLE_ADVANCED_SETTINGS'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Set to `True` to disable the advanced settings page in Studio for all users except those - # having `is_superuser` or `is_staff` set to `True`. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2023-03-31 - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/32015 - 'DISABLE_ADVANCED_SETTINGS': False, +# .. toggle_name: settings.DISABLE_UNENROLLMENT +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: Set to True to disable self-unenrollments via REST API. +# This also hides the "Unenroll" button on the Learner Dashboard. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2021-10-11 +# .. toggle_warning: For consistency in user experience, keep the value in sync with the setting of the same name +# in the LMS and CMS. +# .. toggle_tickets: 'https://github.com/open-craft/edx-platform/pull/429' +DISABLE_UNENROLLMENT = False - # .. toggle_name: FEATURES['ENABLE_SEND_XBLOCK_LIFECYCLE_EVENTS_OVER_BUS'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Enables sending xblock lifecycle events over the event bus. Used to create the - # EVENT_BUS_PRODUCER_CONFIG setting - # .. toggle_use_cases: opt_in - # .. toggle_creation_date: 2023-10-10 - # .. toggle_target_removal_date: 2023-10-12 - # .. toggle_warning: The default may be changed in a later release. See - # https://github.com/openedx/openedx-events/issues/265 - # .. toggle_tickets: https://github.com/edx/edx-arch-experiments/issues/381 - 'ENABLE_SEND_XBLOCK_LIFECYCLE_EVENTS_OVER_BUS': False, +# .. toggle_name: settings.DISABLE_ADVANCED_SETTINGS +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: Set to `True` to disable the advanced settings page in Studio for all users except those +# having `is_superuser` or `is_staff` set to `True`. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2023-03-31 +# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/32015 +DISABLE_ADVANCED_SETTINGS = False - # .. toggle_name: FEATURES['ENABLE_HIDE_FROM_TOC_UI'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: When enabled, exposes hide_from_toc xblock attribute so course authors can configure it as - # a section visibility option in Studio. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2024-02-29 - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/33952 - 'ENABLE_HIDE_FROM_TOC_UI': False, +# .. toggle_name: settings.ENABLE_SEND_XBLOCK_LIFECYCLE_EVENTS_OVER_BUS +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: Enables sending xblock lifecycle events over the event bus. Used to create the +# EVENT_BUS_PRODUCER_CONFIG setting +# .. toggle_use_cases: opt_in +# .. toggle_creation_date: 2023-10-10 +# .. toggle_target_removal_date: 2023-10-12 +# .. toggle_warning: The default may be changed in a later release. See +# https://github.com/openedx/openedx-events/issues/265 +# .. toggle_tickets: https://github.com/edx/edx-arch-experiments/issues/381 +ENABLE_SEND_XBLOCK_LIFECYCLE_EVENTS_OVER_BUS = False - # .. toggle_name: FEATURES['ENABLE_GRADING_METHOD_IN_PROBLEMS'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Enables the grading method feature in capa problems. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2024-03-22 - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/33911 - 'ENABLE_GRADING_METHOD_IN_PROBLEMS': False, +# .. toggle_name: settings.ENABLE_HIDE_FROM_TOC_UI +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: When enabled, exposes hide_from_toc xblock attribute so course authors can configure it as +# a section visibility option in Studio. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2024-02-29 +# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/33952 +ENABLE_HIDE_FROM_TOC_UI = False - # .. toggle_name: FEATURES['BADGES_ENABLED'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Set to True to enable the Badges feature. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2024-04-10 - 'BADGES_ENABLED': False, +# .. toggle_name: settings.ENABLE_GRADING_METHOD_IN_PROBLEMS +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: Enables the grading method feature in capa problems. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2024-03-22 +# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/33911 +ENABLE_GRADING_METHOD_IN_PROBLEMS = False - # .. toggle_name: FEATURES['IN_CONTEXT_DISCUSSION_ENABLED_DEFAULT'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: True - # .. toggle_description: Set to False to disable in-context discussion for units by default. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2024-09-02 - 'IN_CONTEXT_DISCUSSION_ENABLED_DEFAULT': True, -} +# .. toggle_name: settings.BADGES_ENABLED +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: Set to True to enable the Badges feature. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2024-04-10 +BADGES_ENABLED = False + +# .. toggle_name: settings.IN_CONTEXT_DISCUSSION_ENABLED_DEFAULT +# .. toggle_implementation: DjangoSetting +# .. toggle_default: True +# .. toggle_description: Set to False to disable in-context discussion for units by default. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2024-09-02 +IN_CONTEXT_DISCUSSION_ENABLED_DEFAULT = True # .. toggle_name: ENABLE_COPPA_COMPLIANCE # .. toggle_implementation: DjangoSetting @@ -1072,7 +1074,7 @@ X_FRAME_OPTIONS = 'DENY' # .. setting_name: GIT_REPO_EXPORT_DIR # .. setting_default: '/edx/var/edxapp/export_course_repos' # .. setting_description: When courses are exported to git, either with the export_git management command or the git -# export view from the studio (when FEATURES['ENABLE_EXPORT_GIT'] is True), they are stored in this directory, which +# export view from the studio (when settings.ENABLE_EXPORT_GIT is True), they are stored in this directory, which # must exist at the time of the export. GIT_REPO_EXPORT_DIR = '/edx/var/edxapp/export_course_repos' # .. setting_name: GIT_EXPORT_DEFAULT_IDENT @@ -1716,7 +1718,6 @@ LOGIN_ISSUE_SUPPORT_LINK = '' ############################## EVENT TRACKING ################################# -CMS_SEGMENT_KEY = None TRACK_MAX_EVENT = 50000 TRACKING_BACKENDS = { @@ -1854,9 +1855,6 @@ MAX_ASSET_UPLOAD_FILE_SIZE_IN_MB = 20 # a file that exceeds the above size MAX_ASSET_UPLOAD_FILE_SIZE_URL = "" -### Default value for entrance exam minimum score -ENTRANCE_EXAM_MIN_SCORE_PCT = 50 - ### Default language for a new course DEFAULT_COURSE_LANGUAGE = "en" @@ -2316,7 +2314,7 @@ FINANCIAL_REPORTS = { } ############# CORS headers for cross-domain requests ################# -if FEATURES.get('ENABLE_CORS_HEADERS'): +if ENABLE_CORS_HEADERS: CORS_ALLOW_CREDENTIALS = True CORS_ORIGIN_WHITELIST = () CORS_ORIGIN_ALLOW_ALL = False @@ -2614,11 +2612,11 @@ SIMPLE_HISTORY_DATE_INDEX = False def _should_send_xblock_events(settings): - return settings.FEATURES['ENABLE_SEND_XBLOCK_LIFECYCLE_EVENTS_OVER_BUS'] + return settings.ENABLE_SEND_XBLOCK_LIFECYCLE_EVENTS_OVER_BUS def _should_send_learning_badge_events(settings): - return settings.FEATURES['BADGES_ENABLED'] + return settings.BADGES_ENABLED # .. setting_name: EVENT_BUS_PRODUCER_CONFIG diff --git a/cms/envs/devstack.py b/cms/envs/devstack.py index bda53a366c..d683f48708 100644 --- a/cms/envs/devstack.py +++ b/cms/envs/devstack.py @@ -50,7 +50,7 @@ FRONTEND_REGISTER_URL = LMS_ROOT_URL + '/register' ################################## Video Pipeline Settings ######################### -FEATURES['ENABLE_VIDEO_UPLOAD_PIPELINE'] = True +ENABLE_VIDEO_UPLOAD_PIPELINE = True ########################### PIPELINE ################################# @@ -126,7 +126,7 @@ def should_show_debug_toolbar(request): # lint-amnesty, pylint: disable=missing ################################ MILESTONES ################################ -FEATURES['MILESTONES_APP'] = True +MILESTONES_APP = True ########################### ORGANIZATIONS ################################# # Although production studio.edx.org disables `ORGANIZATIONS_AUTOCREATE`, @@ -136,16 +136,16 @@ FEATURES['MILESTONES_APP'] = True ORGANIZATIONS_AUTOCREATE = True ################################ ENTRANCE EXAMS ################################ -FEATURES['ENTRANCE_EXAMS'] = True +ENTRANCE_EXAMS = True ################################ COURSE LICENSES ################################ -FEATURES['LICENSING'] = True +LICENSING = True # Needed to enable licensing on video blocks XBLOCK_SETTINGS.update({'VideoBlock': {'licensing_enabled': True}}) ################################ SEARCH INDEX ################################ -FEATURES['ENABLE_COURSEWARE_INDEX'] = True -FEATURES['ENABLE_LIBRARY_INDEX'] = False +ENABLE_COURSEWARE_INDEX = True +ENABLE_LIBRARY_INDEX = False SEARCH_ENGINE = "search.elastic.ElasticSearchEngine" ELASTIC_SEARCH_CONFIG = [ @@ -157,22 +157,22 @@ ELASTIC_SEARCH_CONFIG = [ ] ################################ COURSE DISCUSSIONS ########################### -FEATURES['ENABLE_DISCUSSION_SERVICE'] = True +ENABLE_DISCUSSION_SERVICE = True ################################ CREDENTIALS ########################### CREDENTIALS_SERVICE_USERNAME = 'credentials_worker' ########################## Certificates Web/HTML View ####################### -FEATURES['CERTIFICATES_HTML_VIEW'] = True +CERTIFICATES_HTML_VIEW = True ########################## AUTHOR PERMISSION ####################### -FEATURES['ENABLE_CREATOR_GROUP'] = True +ENABLE_CREATOR_GROUP = True ########################## Library creation organizations restriction ####################### -FEATURES['ENABLE_ORGANIZATION_STAFF_ACCESS_FOR_CONTENT_LIBRARIES'] = True +ENABLE_ORGANIZATION_STAFF_ACCESS_FOR_CONTENT_LIBRARIES = True ################### FRONTEND APPLICATION PUBLISHER URL ################### -FEATURES['FRONTEND_APP_PUBLISHER_URL'] = 'http://localhost:18400' +FRONTEND_APP_PUBLISHER_URL = 'http://localhost:18400' ################### FRONTEND APPLICATION COURSE AUTHORING ################### COURSE_AUTHORING_MICROFRONTEND_URL = 'http://localhost:2001' @@ -252,13 +252,13 @@ MODULESTORE = convert_module_store_setting_if_needed(MODULESTORE) SECRET_KEY = '85920908f28904ed733fe576320db18cabd7b6cd' ############# CORS headers for cross-domain requests ################# -FEATURES['ENABLE_CORS_HEADERS'] = True +ENABLE_CORS_HEADERS = True CORS_ALLOW_CREDENTIALS = True CORS_ORIGIN_ALLOW_ALL = True ################### Special Exams (Proctoring) and Prereqs ################### -FEATURES['ENABLE_SPECIAL_EXAMS'] = True -FEATURES['ENABLE_PREREQUISITE_COURSES'] = True +ENABLE_SPECIAL_EXAMS = True +ENABLE_PREREQUISITE_COURSES = True # Used in edx-proctoring for ID generation in lieu of SECRET_KEY - dummy value # (ref MST-637) diff --git a/cms/envs/production.py b/cms/envs/production.py index 346a60da66..f2d7ab88e4 100644 --- a/cms/envs/production.py +++ b/cms/envs/production.py @@ -29,6 +29,11 @@ from openedx.core.lib.derived import derive_settings # lint-amnesty, pylint: di from openedx.core.lib.logsettings import get_logger_config # lint-amnesty, pylint: disable=wrong-import-order from xmodule.modulestore.modulestore_settings import convert_module_store_setting_if_needed # lint-amnesty, pylint: disable=wrong-import-order +from openedx.core.lib.features_setting_proxy import FeaturesProxy + +# A proxy for feature flags stored in the settings namespace +FEATURES = FeaturesProxy(globals()) + def get_env_setting(setting): """ Get the environment setting or return exception """ @@ -286,7 +291,7 @@ EVENT_TRACKING_BACKENDS['segmentio']['OPTIONS']['processors'][0]['OPTIONS']['whi ) -if FEATURES['ENABLE_COURSEWARE_INDEX'] or FEATURES['ENABLE_LIBRARY_INDEX']: +if ENABLE_COURSEWARE_INDEX or ENABLE_LIBRARY_INDEX: # Use ElasticSearch for the search engine SEARCH_ENGINE = "search.elastic.ElasticSearchEngine" @@ -302,7 +307,7 @@ XBLOCK_SETTINGS.setdefault("VideoBlock", {})['YOUTUBE_API_KEY'] = YOUTUBE_API_KE JWT_AUTH.update(_YAML_TOKENS.get('JWT_AUTH', {})) ######################## CUSTOM COURSES for EDX CONNECTOR ###################### -if FEATURES['CUSTOM_COURSES_EDX']: +if CUSTOM_COURSES_EDX: INSTALLED_APPS.append('openedx.core.djangoapps.ccxcon.apps.CCXConnectorConfig') ########################## Extra middleware classes ####################### @@ -347,7 +352,7 @@ add_plugins(__name__, ProjectType.CMS, SettingsType.PRODUCTION) #### ############# CORS headers for cross-domain requests ################# -if FEATURES['ENABLE_CORS_HEADERS']: +if ENABLE_CORS_HEADERS: CORS_ALLOW_CREDENTIALS = True CORS_ORIGIN_WHITELIST = _YAML_TOKENS.get('CORS_ORIGIN_WHITELIST', ()) CORS_ORIGIN_ALLOW_ALL = _YAML_TOKENS.get('CORS_ORIGIN_ALLOW_ALL', False) diff --git a/cms/envs/test.py b/cms/envs/test.py index 23131c699f..1e249f18d0 100644 --- a/cms/envs/test.py +++ b/cms/envs/test.py @@ -23,6 +23,8 @@ from openedx.core.lib.derived import derive_settings from xmodule.modulestore.modulestore_settings import update_module_store_settings # pylint: disable=wrong-import-order +from openedx.core.lib.features_setting_proxy import FeaturesProxy + from .common import * # import settings from LMS for consistent behavior with CMS @@ -46,6 +48,8 @@ from lms.envs.test import ( # pylint: disable=wrong-import-order, disable=unuse XBLOCK_RUNTIME_V2_EPHEMERAL_DATA_CACHE, ) +# A proxy for feature flags stored in the settings namespace +FEATURES = FeaturesProxy(globals()) # Include a non-ascii character in STUDIO_NAME and STUDIO_SHORT_NAME to uncover possible # UnicodeEncodeErrors in tests. Also use lazy text to reveal possible json dumps errors @@ -72,7 +76,7 @@ DATA_DIR = TEST_ROOT / "data" COMMON_TEST_DATA_ROOT = COMMON_ROOT / "test" / "data" # For testing "push to lms" -FEATURES["ENABLE_EXPORT_GIT"] = True +ENABLE_EXPORT_GIT = True GIT_REPO_EXPORT_DIR = TEST_ROOT / "export_course_repos" # TODO (cpennington): We need to figure out how envs/test.py can inject things into common.py so that we don't have to repeat this sort of thing # lint-amnesty, pylint: disable=line-too-long @@ -203,51 +207,50 @@ PASSWORD_HASHERS = [ # No segment key CMS_SEGMENT_KEY = None -FEATURES["DISABLE_SET_JWT_COOKIES_FOR_TESTS"] = True +DISABLE_SET_JWT_COOKIES_FOR_TESTS = True -FEATURES["ENABLE_SERVICE_STATUS"] = True +ENABLE_SERVICE_STATUS = True # Toggles embargo on for testing -FEATURES["EMBARGO"] = True +EMBARGO = True TEST_THEME = COMMON_ROOT / "test" / "test-theme" # For consistency in user-experience, keep the value of this setting in sync with # the one in lms/envs/test.py -FEATURES["ENABLE_DISCUSSION_SERVICE"] = False +ENABLE_DISCUSSION_SERVICE = False # Enable a parental consent age limit for testing PARENTAL_CONSENT_AGE_LIMIT = 13 # Enable certificates for the tests -FEATURES["CERTIFICATES_HTML_VIEW"] = True +CERTIFICATES_HTML_VIEW = True # Enable content libraries code for the tests -FEATURES["ENABLE_CONTENT_LIBRARIES"] = True +ENABLE_CONTENT_LIBRARIES = True -FEATURES["ENABLE_EDXNOTES"] = True +ENABLE_EDXNOTES = True # MILESTONES -FEATURES["MILESTONES_APP"] = True +MILESTONES_APP = True # ENTRANCE EXAMS -FEATURES["ENTRANCE_EXAMS"] = True -ENTRANCE_EXAM_MIN_SCORE_PCT = 50 +ENTRANCE_EXAMS = True VIDEO_CDN_URL = {"CN": "http://api.xuetangx.com/edx/video?s3_url="} # Courseware Search Index -FEATURES["ENABLE_COURSEWARE_INDEX"] = True -FEATURES["ENABLE_LIBRARY_INDEX"] = True +ENABLE_COURSEWARE_INDEX = True +ENABLE_LIBRARY_INDEX = True SEARCH_ENGINE = "search.tests.mock_search_engine.MockSearchEngine" -FEATURES["ENABLE_ENROLLMENT_TRACK_USER_PARTITION"] = True +ENABLE_ENROLLMENT_TRACK_USER_PARTITION = True ########################## AUTHOR PERMISSION ####################### -FEATURES["ENABLE_CREATOR_GROUP"] = False +ENABLE_CREATOR_GROUP = False # teams feature -FEATURES["ENABLE_TEAMS"] = True +ENABLE_TEAMS = True # Dummy secret key for dev/test SECRET_KEY = "85920908f28904ed733fe576320db18cabd7b6cd" @@ -257,7 +260,7 @@ INSTALLED_APPS += [ "openedx.core.djangoapps.ccxcon.apps.CCXConnectorConfig", "common.djangoapps.third_party_auth.apps.ThirdPartyAuthConfig", ] -FEATURES["CUSTOM_COURSES_EDX"] = True +CUSTOM_COURSES_EDX = True ########################## VIDEO IMAGE STORAGE ############################ VIDEO_IMAGE_SETTINGS = dict( diff --git a/lms/djangoapps/discussion/settings/common.py b/lms/djangoapps/discussion/settings/common.py index 732bc24fd5..882687a2d6 100644 --- a/lms/djangoapps/discussion/settings/common.py +++ b/lms/djangoapps/discussion/settings/common.py @@ -10,7 +10,7 @@ def plugin_settings(settings): # .. toggle_use_cases: open_edx # .. toggle_creation_date: 2015-06-15 # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/8474 - settings.FEATURES['ALLOW_HIDING_DISCUSSION_TAB'] = False + settings.ALLOW_HIDING_DISCUSSION_TAB = False settings.DISCUSSION_SETTINGS = { 'MAX_COMMENT_DEPTH': 2, 'COURSE_PUBLISH_TASK_DELAY': 30, diff --git a/lms/djangoapps/instructor/settings/common.py b/lms/djangoapps/instructor/settings/common.py index 052405ab32..c8609d8750 100644 --- a/lms/djangoapps/instructor/settings/common.py +++ b/lms/djangoapps/instructor/settings/common.py @@ -9,103 +9,101 @@ def plugin_settings(settings): ### Analytics Dashboard (Insights) settings settings.ANALYTICS_DASHBOARD_URL = "" settings.ANALYTICS_DASHBOARD_NAME = _('Your Platform Insights') - settings.FEATURES.update({ - # .. toggle_name: FEATURES['DISPLAY_ANALYTICS_ENROLLMENTS'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: True - # .. toggle_description: Enable display of enrollment counts in instructor dashboard and - # analytics section. - # .. toggle_use_cases: opt_out - # .. toggle_creation_date: 2014-11-12 - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/5838 - 'DISPLAY_ANALYTICS_ENROLLMENTS': True, + # .. toggle_name: FEATURES['DISPLAY_ANALYTICS_ENROLLMENTS'] + # .. toggle_implementation: DjangoSetting + # .. toggle_default: True + # .. toggle_description: Enable display of enrollment counts in instructor dashboard and + # analytics section. + # .. toggle_use_cases: opt_out + # .. toggle_creation_date: 2014-11-12 + # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/5838 + settings.DISPLAY_ANALYTICS_ENROLLMENTS = True - # .. toggle_name: FEATURES['ENABLE_CCX_ANALYTICS_DASHBOARD_URL'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Display the 'Analytics' tab in the instructor dashboard for CCX courses. - # Note: This has no effect unless ANALYTICS_DASHBOARD_URL is already set, because without that - # setting, the tab does not show up for any courses. - # .. toggle_use_cases: opt_in - # .. toggle_creation_date: 2016-10-07 - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/13196 - 'ENABLE_CCX_ANALYTICS_DASHBOARD_URL': False, + # .. toggle_name: FEATURES['ENABLE_CCX_ANALYTICS_DASHBOARD_URL'] + # .. toggle_implementation: DjangoSetting + # .. toggle_default: False + # .. toggle_description: Display the 'Analytics' tab in the instructor dashboard for CCX courses. + # Note: This has no effect unless ANALYTICS_DASHBOARD_URL is already set, because without that + # setting, the tab does not show up for any courses. + # .. toggle_use_cases: opt_in + # .. toggle_creation_date: 2016-10-07 + # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/13196 + settings.ENABLE_CCX_ANALYTICS_DASHBOARD_URL = False - # .. setting_name: FEATURES['MAX_ENROLLMENT_INSTR_BUTTONS'] - # .. setting_default: 200 - # .. setting_description: Disable instructor dashboard buttons for downloading course data - # when enrollment exceeds this number. The number indicates the maximum allowed enrollments - # for the course to be considered "small". Courses exceeding the upper limit of "small" - # courses will have disabled buttons at the instructor dashboard. - 'MAX_ENROLLMENT_INSTR_BUTTONS': 200, + # .. setting_name: FEATURES['MAX_ENROLLMENT_INSTR_BUTTONS'] + # .. setting_default: 200 + # .. setting_description: Disable instructor dashboard buttons for downloading course data + # when enrollment exceeds this number. The number indicates the maximum allowed enrollments + # for the course to be considered "small". Courses exceeding the upper limit of "small" + # courses will have disabled buttons at the instructor dashboard. + settings.MAX_ENROLLMENT_INSTR_BUTTONS = 200 - # .. toggle_name: FEATURES['ENABLE_GRADE_DOWNLOADS'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Enable grade CSV downloads from the instructor dashboard. Grade - # calculation started from the instructor dashboard will write grades CSV files to the - # configured storage backend and give links for downloads. - # .. toggle_use_cases: opt_in - # .. toggle_creation_date: 2016-07-06 - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/11286 - 'ENABLE_GRADE_DOWNLOADS': False, + # .. toggle_name: FEATURES['ENABLE_GRADE_DOWNLOADS'] + # .. toggle_implementation: DjangoSetting + # .. toggle_default: False + # .. toggle_description: Enable grade CSV downloads from the instructor dashboard. Grade + # calculation started from the instructor dashboard will write grades CSV files to the + # configured storage backend and give links for downloads. + # .. toggle_use_cases: opt_in + # .. toggle_creation_date: 2016-07-06 + # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/11286 + settings.ENABLE_GRADE_DOWNLOADS = False - # .. toggle_name: FEATURES['ALLOW_COURSE_STAFF_GRADE_DOWNLOADS'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Enable to give course staff unrestricted access to grade downloads; - # if set to False, only edX superusers can perform the downloads. - # .. toggle_use_cases: opt_in - # .. toggle_creation_date: 2018-03-26 - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/1750 - 'ALLOW_COURSE_STAFF_GRADE_DOWNLOADS': False, + # .. toggle_name: FEATURES['ALLOW_COURSE_STAFF_GRADE_DOWNLOADS'] + # .. toggle_implementation: DjangoSetting + # .. toggle_default: False + # .. toggle_description: Enable to give course staff unrestricted access to grade downloads; + # if set to False, only edX superusers can perform the downloads. + # .. toggle_use_cases: opt_in + # .. toggle_creation_date: 2018-03-26 + # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/1750 + settings.ALLOW_COURSE_STAFF_GRADE_DOWNLOADS = False - # .. toggle_name: FEATURES['ALLOW_AUTOMATED_SIGNUPS'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Enable to show a section in the membership tab of the instructor - # dashboard to allow an upload of a CSV file that contains a list of new accounts to create - # and register for course. - # .. toggle_use_cases: opt_in - # .. toggle_creation_date: 2014-10-21 - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/5670 - 'ALLOW_AUTOMATED_SIGNUPS': False, + # .. toggle_name: FEATURES['ALLOW_AUTOMATED_SIGNUPS'] + # .. toggle_implementation: DjangoSetting + # .. toggle_default: False + # .. toggle_description: Enable to show a section in the membership tab of the instructor + # dashboard to allow an upload of a CSV file that contains a list of new accounts to create + # and register for course. + # .. toggle_use_cases: opt_in + # .. toggle_creation_date: 2014-10-21 + # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/5670 + settings.ALLOW_AUTOMATED_SIGNUPS = False - # .. toggle_name: FEATURES['ENABLE_AUTOMATED_SIGNUPS_EXTRA_FIELDS'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: When True, the CSV file that contains a list of - # new accounts to create and register for a course in the membership - # tab of the instructor dashboard will accept the cohort name to - # assign the new user and the enrollment course mode. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2021-10-26 - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/21260 - 'ENABLE_AUTOMATED_SIGNUPS_EXTRA_FIELDS': False, + # .. toggle_name: FEATURES['ENABLE_AUTOMATED_SIGNUPS_EXTRA_FIELDS'] + # .. toggle_implementation: DjangoSetting + # .. toggle_default: False + # .. toggle_description: When True, the CSV file that contains a list of + # new accounts to create and register for a course in the membership + # tab of the instructor dashboard will accept the cohort name to + # assign the new user and the enrollment course mode. + # .. toggle_use_cases: open_edx + # .. toggle_creation_date: 2021-10-26 + # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/21260 + settings.ENABLE_AUTOMATED_SIGNUPS_EXTRA_FIELDS = False - # .. toggle_name: FEATURES['CERTIFICATES_INSTRUCTOR_GENERATION'] # lint-amnesty, pylint: disable=annotation-missing-token - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Enable to allow batch generation of certificates from the instructor dashboard. - # In case of self-paced courses, the certificate generation button is hidden if certificate - # generation is not explicitly enabled globally or for the specific course. - # .. toggle_use_cases: opt_in - 'CERTIFICATES_INSTRUCTOR_GENERATION': False, + # .. toggle_name: FEATURES['CERTIFICATES_INSTRUCTOR_GENERATION'] # lint-amnesty, pylint: disable=annotation-missing-token + # .. toggle_implementation: DjangoSetting + # .. toggle_default: False + # .. toggle_description: Enable to allow batch generation of certificates from the instructor dashboard. + # In case of self-paced courses, the certificate generation button is hidden if certificate + # generation is not explicitly enabled globally or for the specific course. + # .. toggle_use_cases: opt_in + settings.CERTIFICATES_INSTRUCTOR_GENERATION = False - # .. toggle_name: FEATURES['ENABLE_CERTIFICATES_INSTRUCTOR_MANAGE] # lint-amnesty, pylint: disable=annotation-missing-token - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Allow course instructors to manage certificates from the instructor dashboard. - # .. toggle_use_cases: opt_in - 'ENABLE_CERTIFICATES_INSTRUCTOR_MANAGE': False, + # .. toggle_name: FEATURES['ENABLE_CERTIFICATES_INSTRUCTOR_MANAGE] # lint-amnesty, pylint: disable=annotation-missing-token + # .. toggle_implementation: DjangoSetting + # .. toggle_default: False + # .. toggle_description: Allow course instructors to manage certificates from the instructor dashboard. + # .. toggle_use_cases: opt_in + settings.ENABLE_CERTIFICATES_INSTRUCTOR_MANAGE = False - # .. toggle_name: FEATURES['BATCH_ENROLLMENT_NOTIFY_USERS_DEFAULT'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: True - # .. toggle_description: Controls if the "Notify users by email" checkbox in the batch - # enrollment form on the instructor dashboard is already checked on page load or not. - # .. toggle_use_cases: opt_out - # .. toggle_creation_date: 2017-07-05 - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/15392 - 'BATCH_ENROLLMENT_NOTIFY_USERS_DEFAULT': True, - }) + # .. toggle_name: FEATURES['BATCH_ENROLLMENT_NOTIFY_USERS_DEFAULT'] + # .. toggle_implementation: DjangoSetting + # .. toggle_default: True + # .. toggle_description: Controls if the "Notify users by email" checkbox in the batch + # enrollment form on the instructor dashboard is already checked on page load or not. + # .. toggle_use_cases: opt_out + # .. toggle_creation_date: 2017-07-05 + # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/15392 + settings.BATCH_ENROLLMENT_NOTIFY_USERS_DEFAULT = True diff --git a/lms/djangoapps/instructor/settings/production.py b/lms/djangoapps/instructor/settings/production.py index 7f91625587..86ec1d6d78 100644 --- a/lms/djangoapps/instructor/settings/production.py +++ b/lms/djangoapps/instructor/settings/production.py @@ -14,9 +14,9 @@ def plugin_settings(settings): "ANALYTICS_DASHBOARD_NAME", settings.ANALYTICS_DASHBOARD_NAME ) # Backward compatibility for deprecated feature names - if 'ENABLE_S3_GRADE_DOWNLOADS' in settings.FEATURES: + if hasattr(settings, 'ENABLE_S3_GRADE_DOWNLOADS'): warnings.warn( "'ENABLE_S3_GRADE_DOWNLOADS' is deprecated. Please use 'ENABLE_GRADE_DOWNLOADS' instead", DeprecationWarning, ) - settings.FEATURES['ENABLE_GRADE_DOWNLOADS'] = settings.FEATURES['ENABLE_S3_GRADE_DOWNLOADS'] + settings.ENABLE_GRADE_DOWNLOADS = settings.ENABLE_S3_GRADE_DOWNLOADS diff --git a/lms/djangoapps/instructor/settings/test.py b/lms/djangoapps/instructor/settings/test.py index b779b55352..92223867be 100644 --- a/lms/djangoapps/instructor/settings/test.py +++ b/lms/djangoapps/instructor/settings/test.py @@ -4,5 +4,5 @@ def plugin_settings(settings): """Settings for the instructor plugin.""" # Enable this feature for course staff grade downloads, to enable acceptance tests - settings.FEATURES['ENABLE_GRADE_DOWNLOADS'] = True - settings.FEATURES['ALLOW_COURSE_STAFF_GRADE_DOWNLOADS'] = True + settings.ENABLE_GRADE_DOWNLOADS = True + settings.ALLOW_COURSE_STAFF_GRADE_DOWNLOADS = True diff --git a/lms/envs/common.py b/lms/envs/common.py index 2075f3e70f..4740cf59fb 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -69,6 +69,10 @@ from openedx.core.release import doc_version from openedx.envs.common import * # pylint: disable=wildcard-import from lms.djangoapps.lms_xblock.mixin import LmsBlockMixin +from openedx.core.lib.features_setting_proxy import FeaturesProxy + +# A proxy for feature flags stored in the settings namespace +FEATURES = FeaturesProxy(globals()) ################################### FEATURES ################################### # .. setting_name: PLATFORM_NAME @@ -84,988 +88,1000 @@ PLATFORM_TWITTER_ACCOUNT = "@YourPlatformTwitterAccount" ENABLE_JASMINE = False -# Features -FEATURES = { - # .. toggle_name: FEATURES['DISPLAY_DEBUG_INFO_TO_STAFF'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: True - # .. toggle_description: Add a "Staff Debug" button to course blocks for debugging - # by course staff. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2015-09-04 - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/2425 - 'DISPLAY_DEBUG_INFO_TO_STAFF': True, - - # .. toggle_name: FEATURES['DISPLAY_HISTOGRAMS_TO_STAFF'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: This displays histograms in the Staff Debug Info panel to course staff. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2014-02-13 - # .. toggle_warning: Generating histograms requires scanning the courseware_studentmodule table on each view. This - # can make staff access to courseware very slow on large courses. - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/2425 - 'DISPLAY_HISTOGRAMS_TO_STAFF': False, # For large courses this slows down courseware access for staff. - - 'REROUTE_ACTIVATION_EMAIL': False, # nonempty string = address for all activation emails - - # .. toggle_name: FEATURES['DISABLE_START_DATES'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: When True, all courses will be active, regardless of start - # date. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2012-07-24 - # .. toggle_warning: This will cause ALL courses to be immediately visible. - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/17913 - ## DO NOT SET TO True IN THIS FILE - ## Doing so will cause all courses to be released on production - 'DISABLE_START_DATES': False, - - # .. toggle_name: FEATURES['ENABLE_DISCUSSION_SERVICE'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: True - # .. toggle_description: When True, it will enable the Discussion tab in courseware for all courses. Setting this - # to False will not contain inline discussion components and discussion tab in any courses. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2012-08-14 - # .. toggle_warning: If the discussion panel is present in the course and the value for this flag is False then, - # attempting to expand those components will cause errors. So, this should only be set to False with an LMS that - # is running courses that do not contain discussion components. - # For consistency in user-experience, keep the value in sync with the setting of the same name in the CMS. - 'ENABLE_DISCUSSION_SERVICE': True, - - # .. toggle_name: FEATURES['ENABLE_TEXTBOOK'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: True - # .. toggle_description: Add PDF and HTML textbook tabs to the courseware. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2014-03-27 - # .. toggle_warning: For consistency in user-experience, keep the value in sync with the setting of the same name - # in the CMS. - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/3064 - 'ENABLE_TEXTBOOK': True, - - # .. toggle_name: FEATURES['ENABLE_DISCUSSION_HOME_PANEL'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: True - # .. toggle_description: Hides or displays a welcome panel under the Discussion tab, which includes a subscription - # on/off setting for discussion digest emails. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2013-07-30 - # .. toggle_warning: This should remain off in production until digest notifications are online. - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/520 - 'ENABLE_DISCUSSION_HOME_PANEL': False, - - # .. toggle_name: FEATURES['ENABLE_DISCUSSION_EMAIL_DIGEST'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Set this to True if you want the discussion digest emails - # enabled automatically for new users. This will be set on all new account - # registrations. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2014-08-19 - # .. toggle_target_removal_date: None - # .. toggle_warning: It is not recommended to enable this feature if ENABLE_DISCUSSION_HOME_PANEL is not enabled, - # since subscribers who receive digests in that case will only be able to unsubscribe via links embedded in - # their emails, and they will have no way to resubscribe. - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/4891 - 'ENABLE_DISCUSSION_EMAIL_DIGEST': False, - - # .. toggle_name: FEATURES['ENABLE_UNICODE_USERNAME'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Set this to True to allow unicode characters in username. Enabling this will also - # automatically enable SOCIAL_AUTH_CLEAN_USERNAMES. When this is enabled, usernames will have to match the - # regular expression defined by USERNAME_REGEX_PARTIAL. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2017-06-27 - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/14729 - 'ENABLE_UNICODE_USERNAME': False, - - # .. toggle_name: FEATURES['ENABLE_DJANGO_ADMIN_SITE'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: True - # .. toggle_description: Set to False if you want to disable Django's admin site. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2013-09-26 - # .. toggle_warning: It is not recommended to disable this feature as there are many settings available on - # Django's admin site and will be inaccessible to the superuser. - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/829 - 'ENABLE_DJANGO_ADMIN_SITE': True, - 'ENABLE_LMS_MIGRATION': False, - - # .. toggle_name: FEATURES['ENABLE_MASQUERADE'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: True - # .. toggle_description: None - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2013-04-13 - 'ENABLE_MASQUERADE': True, - - # .. toggle_name: FEATURES['DISABLE_LOGIN_BUTTON'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Removes the display of the login button in the navigation bar. - # Change is only at the UI level. Used in systems where login is automatic, eg MIT SSL - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2013-12-03 - 'DISABLE_LOGIN_BUTTON': False, - - # .. toggle_name: FEATURES['ENABLE_OAUTH2_PROVIDER'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Enable this feature to allow this Open edX platform to be an OAuth2 authentication - # provider. This is necessary to enable some other features, such as the REST API for the mobile application. - # .. toggle_use_cases: temporary - # .. toggle_creation_date: 2014-09-09 - # .. toggle_target_removal_date: None - # .. toggle_warning: This temporary feature toggle does not have a target removal date. - 'ENABLE_OAUTH2_PROVIDER': False, - - # .. toggle_name: FEATURES['ENABLE_XBLOCK_VIEW_ENDPOINT'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Enable an API endpoint, named "xblock_view", to serve rendered XBlock views. This might be - # used by external applications. See for instance jquery-xblock (now unmaintained): - # https://github.com/openedx/jquery-xblock - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2014-03-14 - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/2968 - 'ENABLE_XBLOCK_VIEW_ENDPOINT': False, - - # Allows to configure the LMS to provide CORS headers to serve requests from other - # domains - 'ENABLE_CORS_HEADERS': False, - - # Can be turned off if course lists need to be hidden. Effects views and templates. - # .. toggle_name: FEATURES['COURSES_ARE_BROWSABLE'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: True - # .. toggle_description: When this is set to True, all the courses will be listed on the /courses page and Explore - # Courses link will be visible. Set to False if courses list and Explore Courses link need to be hidden. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2013-09-28 - # .. toggle_warning: This Effects views and templates. - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/1073 - 'COURSES_ARE_BROWSABLE': True, - - # Can be turned off to disable the help link in the navbar - # .. toggle_name: FEATURES['ENABLE_HELP_LINK'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: True - # .. toggle_description: When True, a help link is displayed on the main navbar. Set False to hide it. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2021-03-05 - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/26106 - 'ENABLE_HELP_LINK': True, - - # .. toggle_name: FEATURES['HIDE_DASHBOARD_COURSES_UNTIL_ACTIVATED'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: When set, it hides the Courses list on the Learner Dashboard page if the learner has not - # yet activated the account and not enrolled in any courses. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2018-05-18 - # .. toggle_tickets: https://openedx.atlassian.net/browse/OSPR-1814 - 'HIDE_DASHBOARD_COURSES_UNTIL_ACTIVATED': False, - - # .. toggle_name: FEATURES['ENABLE_STUDENT_HISTORY_VIEW'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: True - # .. toggle_description: This provides a UI to show a student's submission history in a problem by the Staff Debug - # tool. Set to False if you want to hide Submission History from the courseware page. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2013-02-15 - # .. toggle_tickets: https://github.com/openedx/edx-platform/commit/8f17e6ae9ed76fa75b3caf867b65ccb632cb6870 - 'ENABLE_STUDENT_HISTORY_VIEW': True, - - # Turn on a page that lets staff enter Python code to be run in the - # sandbox, for testing whether it's enabled properly. - 'ENABLE_DEBUG_RUN_PYTHON': False, - - # Enable URL that shows information about the status of various services - 'ENABLE_SERVICE_STATUS': False, - - # Don't autoplay videos for students - 'AUTOPLAY_VIDEOS': False, - - # Move the student to next page when a video finishes. Set to True to show - # an auto-advance button in videos. If False, videos never auto-advance. - 'ENABLE_AUTOADVANCE_VIDEOS': False, - - # Enable instructor dash to submit background tasks - 'ENABLE_INSTRUCTOR_BACKGROUND_TASKS': True, - - # Enable instructor to assign individual due dates - # Note: In order for this feature to work, you must also add - # 'lms.djangoapps.courseware.student_field_overrides.IndividualStudentOverrideProvider' to - # the setting FIELD_OVERRIDE_PROVIDERS, in addition to setting this flag to - # True. - 'INDIVIDUAL_DUE_DATES': False, - - # .. toggle_name: CUSTOM_COURSES_EDX - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Set to True to enable Custom Courses for edX, a feature that is more commonly known as - # CCX. Documentation for configuring and using this feature is available at - # https://docs.openedx.org/en/latest/site_ops/install_configure_run_guide/configuration/enable_ccx.html - # .. toggle_warning: When set to true, 'lms.djangoapps.ccx.overrides.CustomCoursesForEdxOverrideProvider' will - # be added to MODULESTORE_FIELD_OVERRIDE_PROVIDERS - # .. toggle_use_cases: opt_in, circuit_breaker - # .. toggle_creation_date: 2015-04-10 - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/6636 - 'CUSTOM_COURSES_EDX': False, - - # Toggle to enable certificates of courses on dashboard - 'ENABLE_VERIFIED_CERTIFICATES': False, - # Settings for course import olx validation - 'ENABLE_COURSE_OLX_VALIDATION': False, - - # .. toggle_name: FEATURES['DISABLE_HONOR_CERTIFICATES'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Set to True to disable honor certificates. Typically used when your installation only - # allows verified certificates, like courses.edx.org. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2019-05-14 - # .. toggle_tickets: https://openedx.atlassian.net/browse/PROD-269 - 'DISABLE_HONOR_CERTIFICATES': False, # Toggle to disable honor certificates - - 'DISABLE_AUDIT_CERTIFICATES': False, # Toggle to disable audit certificates - - # .. toggle_name: FEATURES['AUTOMATIC_AUTH_FOR_TESTING'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Set to True to perform acceptance and load test. Auto auth view is responsible for load - # testing and is controlled by this feature flag. Session verification (of CacheBackedAuthenticationMiddleware) - # is a security feature, but it can be turned off by enabling this feature flag. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2013-07-25 - # .. toggle_warning: If this has been set to True then the account activation email will be skipped. - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/417 - 'AUTOMATIC_AUTH_FOR_TESTING': False, - - # .. toggle_name: FEATURES['RESTRICT_AUTOMATIC_AUTH'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: True - # .. toggle_description: Prevent auto auth from creating superusers or modifying existing users. Auto auth is a - # mechanism where superusers can simply modify attributes of other users by accessing the "/auto_auth url" with - # the right - # querystring parameters. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2018-05-07 - # .. toggle_tickets: https://openedx.atlassian.net/browse/TE-2545 - 'RESTRICT_AUTOMATIC_AUTH': True, - - # .. toggle_name: FEATURES['ENABLE_LOGIN_MICROFRONTEND'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Enable the login micro frontend. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2018-05-07 - # .. toggle_warning: The login MFE domain name should be listed in LOGIN_REDIRECT_WHITELIST. - 'ENABLE_LOGIN_MICROFRONTEND': False, - - # .. toggle_name: FEATURES['SKIP_EMAIL_VALIDATION'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Turn this on to skip sending emails for user validation. - # Beware, as this leaves the door open to potential spam abuse. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2018-05-07 - # .. toggle_warning: The login MFE domain name should be listed in LOGIN_REDIRECT_WHITELIST. - 'SKIP_EMAIL_VALIDATION': False, - - # .. toggle_name: FEATURES['ENABLE_COSMETIC_DISPLAY_PRICE'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Enable the display of "cosmetic_display_price", set in a course advanced settings. This - # cosmetic price is used when there is no registration price associated to the course. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2014-10-10 - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/6876 - # .. toggle_warning: The use case of this feature toggle is uncertain. - 'ENABLE_COSMETIC_DISPLAY_PRICE': False, - - # Automatically approve student identity verification attempts - # .. toggle_name: FEATURES['AUTOMATIC_VERIFY_STUDENT_IDENTITY_FOR_TESTING'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: If set to True, then we want to skip posting anything to Software Secure. Bypass posting - # anything to Software Secure if the auto verify feature for testing is enabled. We actually don't even create - # the message because that would require encryption and message signing that rely on settings.VERIFY_STUDENT - # values that aren't set in dev. So we just pretend like we successfully posted and automatically approve student - # identity verification attempts. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2013-10-03 - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/1184 - 'AUTOMATIC_VERIFY_STUDENT_IDENTITY_FOR_TESTING': False, - - # Maximum number of rows to include in the csv file for downloading problem responses. - 'MAX_PROBLEM_RESPONSES_COUNT': 5000, - - 'ENABLED_PAYMENT_REPORTS': [ - "refund_report", - "itemized_purchase_report", - "university_revenue_share", - "certificate_status" - ], - - # Turn off account locking if failed login attempts exceeds a limit - # .. toggle_name: FEATURES['ENABLE_MAX_FAILED_LOGIN_ATTEMPTS'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: True - # .. toggle_description: This feature will keep track of the number of failed login attempts on a given user's - # email. If the number of consecutive failed login attempts - without a successful login at some point - reaches - # a configurable threshold (default 6), then the account will be locked for a configurable amount of seconds - # (30 minutes) which will prevent additional login attempts until this time period has passed. If a user - # successfully logs in, all the counter which tracks the number of failed attempts will be reset back to 0. If - # set to False then account locking will be disabled for failed login attempts. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2014-01-30 - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/2331 - 'ENABLE_MAX_FAILED_LOGIN_ATTEMPTS': True, - - # Hide any Personally Identifiable Information from application logs - 'SQUELCH_PII_IN_LOGS': True, - - # .. toggle_name: FEATURES['EMBARGO'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Turns on embargo functionality, which blocks users from - # the site or courses based on their location. Embargo can restrict users by states - # and whitelist/blacklist (IP Addresses (ie. 10.0.0.0), Networks (ie. 10.0.0.0/24)), or the user profile country. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2014-02-27 - # .. toggle_target_removal_date: None - # .. toggle_warning: reverse proxy should be configured appropriately for example Client IP address headers - # (e.g HTTP_X_FORWARDED_FOR) should be configured. - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/2749 - 'EMBARGO': False, - - # Whether the Wiki subsystem should be accessible via the direct /wiki/ paths. Setting this to True means - # that people can submit content and modify the Wiki in any arbitrary manner. We're leaving this as True in the - # defaults, so that we maintain current behavior - 'ALLOW_WIKI_ROOT_ACCESS': True, - - # .. toggle_name: FEATURES['ENABLE_THIRD_PARTY_AUTH'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Turn on third-party auth. Disabled for now because full implementations are not yet - # available. Remember to run migrations if you enable this; we don't create tables by default. This feature can - # be enabled on a per-site basis. When enabling this feature, remember to define the allowed authentication - # backends with the AUTHENTICATION_BACKENDS setting. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2014-09-15 - 'ENABLE_THIRD_PARTY_AUTH': False, - - # .. toggle_name: FEATURES['ENABLE_MKTG_SITE'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Toggle to enable alternate urls for marketing links. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2014-03-24 - # .. toggle_warning: When this is enabled, the MKTG_URLS setting should be defined. The use case of this feature - # toggle is uncertain. - 'ENABLE_MKTG_SITE': False, - - # Prevent concurrent logins per user - 'PREVENT_CONCURRENT_LOGINS': True, - - # .. toggle_name: FEATURES['ALWAYS_REDIRECT_HOMEPAGE_TO_DASHBOARD_FOR_AUTHENTICATED_USER'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: True - # .. toggle_description: When a logged in user goes to the homepage ('/') the user will be redirected to the - # dashboard page when this flag is set to True - this is default Open edX behavior. Set to False to not redirect - # the user. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2014-09-16 - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/5220 - 'ALWAYS_REDIRECT_HOMEPAGE_TO_DASHBOARD_FOR_AUTHENTICATED_USER': True, - - # .. toggle_name: FEATURES['ENABLE_COURSE_SORTING_BY_START_DATE'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: True - # .. toggle_description: When a user goes to the homepage ('/') the user sees the courses listed in the - # announcement dates order - this is default Open edX behavior. Set to True to change the course sorting behavior - # by their start dates, latest first. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2015-03-27 - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/7548 - 'ENABLE_COURSE_SORTING_BY_START_DATE': True, - - # .. toggle_name: FEATURES['ENABLE_COURSE_HOME_REDIRECT'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: True - # .. toggle_description: When enabled, along with the ENABLE_MKTG_SITE feature toggle, users who attempt to access a - # course "about" page will be redirected to the course home url. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2019-01-15 - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/19604 - 'ENABLE_COURSE_HOME_REDIRECT': True, - - # Expose Mobile REST API. Note that if you use this, you must also set - # ENABLE_OAUTH2_PROVIDER to True - 'ENABLE_MOBILE_REST_API': False, - - # .. toggle_name: FEATURES['ENABLE_COMBINED_LOGIN_REGISTRATION_FOOTER'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Display the standard footer in the login page. This feature can be overridden by a site- - # specific configuration. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2016-06-24 - # .. toggle_tickets: https://openedx.atlassian.net/browse/OSPR-1320 - 'ENABLE_COMBINED_LOGIN_REGISTRATION_FOOTER': False, - - # Enable organizational email opt-in - 'ENABLE_MKTG_EMAIL_OPT_IN': False, - - # .. toggle_name: FEATURES['ENABLE_FOOTER_MOBILE_APP_LINKS'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Set to True if you want show the mobile app links (Apple App Store & Google Play Store) in - # the footer. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2015-01-13 - # .. toggle_warning: If you set this to True then you should also set your mobile application's app store and play - # store URLs in the MOBILE_STORE_URLS settings dictionary. These links are not part of the default theme. If you - # want these links on your footer then you should use the edx.org theme. - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/6588 - 'ENABLE_FOOTER_MOBILE_APP_LINKS': False, - - # Let students save and manage their annotations - # .. toggle_name: FEATURES['ENABLE_EDXNOTES'] - # .. toggle_implementation: SettingToggle - # .. toggle_default: False - # .. toggle_description: This toggle enables the students to save and manage their annotations in the - # course using the notes service. The bulk of the actual work in storing the notes is done by - # a separate service (see the edx-notes-api repo). - # .. toggle_warning: Requires the edx-notes-api service properly running and to have configured the django settings - # EDXNOTES_INTERNAL_API and EDXNOTES_PUBLIC_API. If you update this setting, also update it in Studio. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2015-01-04 - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/6321 - 'ENABLE_EDXNOTES': False, - - # Toggle to enable coordination with the Publisher tool (keep in sync with cms/envs/common.py) - 'ENABLE_PUBLISHER': False, - - # Milestones application flag - 'MILESTONES_APP': False, - - # Prerequisite courses feature flag - 'ENABLE_PREREQUISITE_COURSES': False, - - # For easily adding modes to courses during acceptance testing - 'MODE_CREATION_FOR_TESTING': False, - - # For caching programs in contexts where the LMS can only - # be reached over HTTP. - 'EXPOSE_CACHE_PROGRAMS_ENDPOINT': False, - - # Courseware search feature - # .. toggle_name: FEATURES['ENABLE_COURSEWARE_SEARCH'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: When enabled, this adds a Search the course widget on the course outline and courseware - # pages for searching courseware data. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2015-01-29 - # .. toggle_warning: In order to get this working, your courses data should be indexed in Elasticsearch. You will - # see the search widget on the courseware page only if the DISABLE_COURSE_OUTLINE_PAGE_FLAG is set. - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/6506 - 'ENABLE_COURSEWARE_SEARCH': False, - - # .. toggle_name: FEATURES['ENABLE_COURSEWARE_SEARCH_FOR_COURSE_STAFF'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: When enabled, this adds a Search the course widget on the course outline and courseware - # pages for searching courseware data but for course staff users only. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2019-12-06 - # .. toggle_warning: In order to get this working, your courses data should be indexed in Elasticsearch. If - # ENABLE_COURSEWARE_SEARCH is enabled then the search widget will be visible to all learners and this flag's - # value does not matter in that case. This flag is enabled in devstack by default. - # .. toggle_tickets: https://openedx.atlassian.net/browse/TNL-6931 - 'ENABLE_COURSEWARE_SEARCH_FOR_COURSE_STAFF': False, - - # Dashboard search feature - # .. toggle_name: FEATURES['ENABLE_DASHBOARD_SEARCH'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: When enabled, this adds a Search Your Courses widget on the dashboard page for searching - # courseware data. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2015-01-29 - # .. toggle_warning: In order to get this working, your courses data should be indexed in Elasticsearch. - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/6506 - 'ENABLE_DASHBOARD_SEARCH': False, - - # log all information from cybersource callbacks - 'LOG_POSTPAY_CALLBACKS': True, - - # .. toggle_name: FEATURES['LICENSING'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Toggle platform-wide course licensing. The course.license attribute is then used to append - # license information to the courseware. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2015-05-14 - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/7315 - 'LICENSING': False, - - # .. toggle_name: FEATURES['CERTIFICATES_HTML_VIEW'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Set to True to enable course certificates on your instance of Open edX. - # .. toggle_warning: You must enable this feature flag in both Studio and the LMS and complete the configuration tasks - # described here: - # https://docs.openedx.org/en/latest/site_ops/install_configure_run_guide/configuration/enable_certificates.html pylint: disable=line-too-long,useless-suppression - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2015-03-13 - # .. toggle_target_removal_date: None - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/7113 - 'CERTIFICATES_HTML_VIEW': False, - - # .. toggle_name: FEATURES['CUSTOM_CERTIFICATE_TEMPLATES_ENABLED'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Set to True to enable custom certificate templates which are configured via Django admin. - # .. toggle_warning: None - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2015-08-13 - # .. toggle_target_removal_date: None - # .. toggle_tickets: https://openedx.atlassian.net/browse/SOL-1044 - 'CUSTOM_CERTIFICATE_TEMPLATES_ENABLED': False, - - # .. toggle_name: FEATURES['ENABLE_COURSE_DISCOVERY'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Add a course search widget to the LMS for searching courses. When this is enabled, the - # latest courses are no longer displayed on the LMS landing page. Also, an "Explore Courses" item is added to the - # navbar. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2015-04-23 - # .. toggle_target_removal_date: None - # .. toggle_warning: The COURSE_DISCOVERY_MEANINGS setting should be properly defined. - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/7845 - 'ENABLE_COURSE_DISCOVERY': False, - - # .. toggle_name: FEATURES['ENABLE_COURSE_FILENAME_CCX_SUFFIX'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: If set to True, CCX ID will be included in the generated filename for CCX courses. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2021-03-16 - # .. toggle_target_removal_date: None - # .. toggle_tickets: None - # .. toggle_warning: Turning this feature ON will affect all generated filenames which are related to CCX courses. - 'ENABLE_COURSE_FILENAME_CCX_SUFFIX': False, - - # Setting for overriding default filtering facets for Course discovery - # COURSE_DISCOVERY_FILTERS = ["org", "language", "modes"] - - # Software secure fake page feature flag - 'ENABLE_SOFTWARE_SECURE_FAKE': False, - - # Teams feature - 'ENABLE_TEAMS': True, - - # Show video bumper in LMS - 'ENABLE_VIDEO_BUMPER': False, - - # How many seconds to show the bumper again, default is 7 days: - 'SHOW_BUMPER_PERIODICITY': 7 * 24 * 3600, - - # .. toggle_name: FEATURES['ENABLE_SPECIAL_EXAMS'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Enable to use special exams, aka timed and proctored exams. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2015-09-04 - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/9744 - 'ENABLE_SPECIAL_EXAMS': False, - - # .. toggle_name: FEATURES['ENABLE_LTI_PROVIDER'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: When set to True, Open edX site can be used as an LTI Provider to other systems - # and applications. - # .. toggle_warning: After enabling this feature flag there are multiple steps involved to configure edX - # as LTI provider. Full guide is available here: - # https://docs.openedx.org/en/latest/site_ops/install_configure_run_guide/configuration/lti/index.html - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2015-04-24 - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/7689 - 'ENABLE_LTI_PROVIDER': False, - - # .. toggle_name: FEATURES['SHOW_HEADER_LANGUAGE_SELECTOR'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: When set to True, language selector will be visible in the header. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2017-05-25 - # .. toggle_warning: You should set the languages in the DarkLangConfig table to get this working. If you have - # not set any languages in the DarkLangConfig table then the language selector will not be visible in the header. - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/15133 - 'SHOW_HEADER_LANGUAGE_SELECTOR': False, - - # At edX it's safe to assume that English transcripts are always available - # This is not the case for all installations. - # The default value in {lms,cms}/envs/common.py and xmodule/tests/test_video.py should be consistent. - 'FALLBACK_TO_ENGLISH_TRANSCRIPTS': True, - - # .. toggle_name: FEATURES['SHOW_FOOTER_LANGUAGE_SELECTOR'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: When set to True, language selector will be visible in the footer. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2017-05-25 - # .. toggle_warning: LANGUAGE_COOKIE_NAME is required to use footer-language-selector, set it if it has not been set. - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/15133 - 'SHOW_FOOTER_LANGUAGE_SELECTOR': False, - - # .. toggle_name: FEATURES['ENABLE_CSMH_EXTENDED'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: True - # .. toggle_description: Write Courseware Student Module History (CSMH) to the extended table: this logs all - # student activities to MySQL, in a separate database. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2020-11-05 - # .. toggle_warning: Even though most Open edX instances run with a separate CSMH database, it may not always be - # the case. When disabling this feature flag, remember to remove "lms.djangoapps.coursewarehistoryextended" - # from the INSTALLED_APPS and the "StudentModuleHistoryExtendedRouter" from the DATABASE_ROUTERS. - 'ENABLE_CSMH_EXTENDED': True, - - # Read from both the CSMH and CSMHE history tables. - # This is the default, but can be disabled if all history - # lives in the Extended table, saving the frontend from - # making multiple queries. - 'ENABLE_READING_FROM_MULTIPLE_HISTORY_TABLES': True, - - # Set this to False to facilitate cleaning up invalid xml from your modulestore. - 'ENABLE_XBLOCK_XML_VALIDATION': True, - - # .. toggle_name: FEATURES['ALLOW_PUBLIC_ACCOUNT_CREATION'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: True - # .. toggle_description: Allow public account creation. If this is disabled, users will no longer have access to - # the signup page. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2017-04-12 - # .. toggle_tickets: https://openedx.atlassian.net/browse/YONK-513 - 'ALLOW_PUBLIC_ACCOUNT_CREATION': True, - - # .. toggle_name: FEATURES['SHOW_REGISTRATION_LINKS'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: True - # .. toggle_description: Allow registration links. If this is disabled, users will no longer see buttons to the - # the signup page. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2023-03-27 - 'SHOW_REGISTRATION_LINKS': True, - - # .. toggle_name: FEATURES['ENABLE_COOKIE_CONSENT'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Enable header banner for cookie consent using this service: - # https://cookieconsent.insites.com/ - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2017-03-03 - # .. toggle_tickets: https://openedx.atlassian.net/browse/OSPR-1560 - 'ENABLE_COOKIE_CONSENT': False, - - # Whether or not the dynamic EnrollmentTrackUserPartition should be registered. - 'ENABLE_ENROLLMENT_TRACK_USER_PARTITION': True, - - # Enable one click program purchase - # See LEARNER-493 - 'ENABLE_ONE_CLICK_PROGRAM_PURCHASE': False, - - # .. toggle_name: FEATURES['ALLOW_EMAIL_ADDRESS_CHANGE'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: True - # .. toggle_description: Allow users to change their email address on the Account Settings page. If this is - # disabled, users will not be able to change their email address. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2017-06-26 - # .. toggle_tickets: https://openedx.atlassian.net/browse/OSPR-1735 - 'ALLOW_EMAIL_ADDRESS_CHANGE': True, - - # .. toggle_name: FEATURES['ENABLE_BULK_ENROLLMENT_VIEW'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: When set to True the bulk enrollment view is enabled and one can use it to enroll multiple - # users in a course using bulk enrollment API endpoint (/api/bulk_enroll/v1/bulk_enroll). - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2017-07-15 - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/15006 - 'ENABLE_BULK_ENROLLMENT_VIEW': False, - - # Set to enable Enterprise integration - 'ENABLE_ENTERPRISE_INTEGRATION': False, - - # .. toggle_name: FEATURES['ENABLE_HTML_XBLOCK_STUDENT_VIEW_DATA'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Whether HTML Block returns HTML content with the Course Blocks API when the API - # is called with student_view_data=html query parameter. - # .. toggle_warning: Because the Course Blocks API caches its data, the cache must be cleared (e.g. by - # re-publishing the course) for changes to this flag to take effect. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2017-08-28 - # .. toggle_tickets: https://openedx.atlassian.net/browse/OSPR-1880 - 'ENABLE_HTML_XBLOCK_STUDENT_VIEW_DATA': False, - - # .. toggle_name: FEATURES['ENABLE_PASSWORD_RESET_FAILURE_EMAIL'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Whether to send an email for failed password reset attempts or not. This happens when a - # user asks for a password reset but they don't have an account associated to their email. This is useful for - # notifying users that they don't have an account associated with email addresses they believe they've registered - # with. This setting can be overridden by a site-specific configuration. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2017-07-20 - # .. toggle_tickets: https://openedx.atlassian.net/browse/OSPR-1832 - 'ENABLE_PASSWORD_RESET_FAILURE_EMAIL': False, - - # Sets the default browser support. For more information go to http://browser-update.org/customize.html - 'UNSUPPORTED_BROWSER_ALERT_VERSIONS': "{i:10,f:-3,o:-3,s:-3,c:-3}", - - # .. toggle_name: FEATURES['ENABLE_ACCOUNT_DELETION'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: True - # .. toggle_description: Whether to display the account deletion section on Account Settings page. Set to False to - # hide this section. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2018-06-01 - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/18298 - 'ENABLE_ACCOUNT_DELETION': True, - - # Enable feature to remove enrollments and users. Used to reset state of master's integration environments - 'ENABLE_ENROLLMENT_RESET': False, - 'DISABLE_MOBILE_COURSE_AVAILABLE': False, - - # .. toggle_name: FEATURES['ENABLE_CHANGE_USER_PASSWORD_ADMIN'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Set to True to enable changing a user password through django admin. This is disabled by - # default because enabling allows a method to bypass password policy. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2020-02-21 - # .. toggle_tickets: 'https://github.com/openedx/edx-platform/pull/21616' - 'ENABLE_CHANGE_USER_PASSWORD_ADMIN': False, - - # .. toggle_name: FEATURES['ENABLE_AUTHN_MICROFRONTEND'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Supports staged rollout of a new micro-frontend-based implementation of the logistration. - # .. toggle_use_cases: temporary, open_edx - # .. toggle_creation_date: 2020-09-08 - # .. toggle_target_removal_date: None - # .. toggle_tickets: 'https://github.com/openedx/edx-platform/pull/24908' - # .. toggle_warning: Also set settings.AUTHN_MICROFRONTEND_URL for rollout. This temporary feature - # toggle does not have a target removal date. - 'ENABLE_AUTHN_MICROFRONTEND': os.environ.get("EDXAPP_ENABLE_AUTHN_MFE", False), - - # .. toggle_name: FEATURES['ENABLE_CATALOG_MICROFRONTEND'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Supports staged rollout of a new micro-frontend-based implementation of the catalog. - # .. toggle_use_cases: temporary - # .. toggle_creation_date: 2025-05-15 - # .. toggle_target_removal_date: 2025-11-01 - 'ENABLE_CATALOG_MICROFRONTEND': False, - - ### ORA Feature Flags ### - # .. toggle_name: FEATURES['ENABLE_ORA_ALL_FILE_URLS'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: A "work-around" feature toggle meant to help in cases where some file uploads are not - # discoverable. If enabled, will iterate through all possible file key suffixes up to the max for displaying - # file metadata in staff assessments. - # .. toggle_use_cases: temporary - # .. toggle_creation_date: 2020-03-03 - # .. toggle_target_removal_date: None - # .. toggle_tickets: https://openedx.atlassian.net/browse/EDUCATOR-4951 - # .. toggle_warning: This temporary feature toggle does not have a target removal date. - 'ENABLE_ORA_ALL_FILE_URLS': False, - - # .. toggle_name: FEATURES['ENABLE_ORA_USER_STATE_UPLOAD_DATA'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: A "work-around" feature toggle meant to help in cases where some file uploads are not - # discoverable. If enabled, will pull file metadata from StudentModule.state for display in staff assessments. - # .. toggle_use_cases: temporary - # .. toggle_creation_date: 2020-03-03 - # .. toggle_target_removal_date: None - # .. toggle_tickets: https://openedx.atlassian.net/browse/EDUCATOR-4951 - # .. toggle_warning: This temporary feature toggle does not have a target removal date. - 'ENABLE_ORA_USER_STATE_UPLOAD_DATA': False, - - # .. toggle_name: FEATURES['ENABLE_ORA_USERNAMES_ON_DATA_EXPORT'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Set to True to add deanonymized usernames to ORA data - # report. - # .. toggle_use_cases: temporary - # .. toggle_creation_date: 2020-06-11 - # .. toggle_target_removal_date: None - # .. toggle_tickets: https://openedx.atlassian.net/browse/TNL-7273 - # .. toggle_warning: This temporary feature toggle does not have a target removal date. - 'ENABLE_ORA_USERNAMES_ON_DATA_EXPORT': False, - - # .. toggle_name: FEATURES['ENABLE_COURSE_ASSESSMENT_GRADE_CHANGE_SIGNAL'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Set to True to start sending signals for assessment level grade updates. Notably, the only - # handler of this signal at the time of this writing sends assessment updates to enterprise integrated channels. - # .. toggle_use_cases: temporary - # .. toggle_creation_date: 2020-12-09 - # .. toggle_target_removal_date: 2021-02-01 - # .. toggle_tickets: https://openedx.atlassian.net/browse/ENT-3818 - 'ENABLE_COURSE_ASSESSMENT_GRADE_CHANGE_SIGNAL': False, - - # .. toggle_name: FEATURES['ALLOW_ADMIN_ENTERPRISE_COURSE_ENROLLMENT_DELETION'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: If true, allows for the deletion of EnterpriseCourseEnrollment records via Django Admin. - # .. toggle_use_cases: opt_in - # .. toggle_creation_date: 2021-01-27 - # .. toggle_tickets: https://openedx.atlassian.net/browse/ENT-4022 - 'ALLOW_ADMIN_ENTERPRISE_COURSE_ENROLLMENT_DELETION': False, - - # .. toggle_name: FEATURES['ENABLE_BULK_USER_RETIREMENT'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Set to True to enable bulk user retirement through REST API. This is disabled by - # default. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2021-03-11 - # .. toggle_target_removal_date: None - # .. toggle_warning: None - # .. toggle_tickets: 'https://openedx.atlassian.net/browse/OSPR-5290' - 'ENABLE_BULK_USER_RETIREMENT': False, - - # .. toggle_name: FEATURES['ENABLE_INTEGRITY_SIGNATURE'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Whether to display honor code agreement for learners before their first grade assignment - # (https://github.com/edx/edx-name-affirmation) - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2022-02-15 - # .. toggle_target_removal_date: None - # .. toggle_tickets: 'https://openedx.atlassian.net/browse/MST-1348' - 'ENABLE_INTEGRITY_SIGNATURE': False, - - # .. toggle_name: FEATURES['ENABLE_LTI_PII_ACKNOWLEDGEMENT'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Enables the lti pii acknowledgement feature for a course - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2023-10 - # .. toggle_target_removal_date: None - # .. toggle_tickets: 'https://2u-internal.atlassian.net/browse/MST-2055' - 'ENABLE_LTI_PII_ACKNOWLEDGEMENT': False, - - # .. toggle_name: FEATURES['ENABLE_NEW_BULK_EMAIL_EXPERIENCE'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: When true, replaces the bulk email tool found on the - # instructor dashboard with a link to the new communications MFE version instead. - # Setting the tool to false will leave the old bulk email tool experience in place. - # .. toggle_use_cases: opt_in - # .. toggle_creation_date: 2022-03-21 - # .. toggle_target_removal_date: None - # .. toggle_tickets: 'https://openedx.atlassian.net/browse/MICROBA-1758' - 'ENABLE_NEW_BULK_EMAIL_EXPERIENCE': False, - - # .. toggle_name: MARK_LIBRARY_CONTENT_BLOCK_COMPLETE_ON_VIEW - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: If enabled, the Library Content Block is marked as complete when users view it. - # Otherwise (by default), all children of this block must be completed. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2022-03-22 - # .. toggle_target_removal_date: None - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/28268 - # .. toggle_warning: For consistency in user-experience, keep the value in sync with the setting of the same name - # in the LMS and CMS. - 'MARK_LIBRARY_CONTENT_BLOCK_COMPLETE_ON_VIEW': False, - - # .. toggle_name: FEATURES['DISABLE_UNENROLLMENT'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Set to True to disable self-unenrollments via REST API. - # This also hides the "Unenroll" button on the Learner Dashboard. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2021-10-11 - # .. toggle_warning: For consistency in user experience, keep the value in sync with the setting of the same name - # in the LMS and CMS. - # .. toggle_tickets: 'https://github.com/open-craft/edx-platform/pull/429' - 'DISABLE_UNENROLLMENT': False, - - # .. toggle_name: FEATURES['ENABLE_CERTIFICATES_IDV_REQUIREMENT'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Whether to enforce ID Verification requirements for course certificates generation - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2022-04-26 - # .. toggle_target_removal_date: None - # .. toggle_tickets: 'https://openedx.atlassian.net/browse/MST-1458' - 'ENABLE_CERTIFICATES_IDV_REQUIREMENT': False, - - # .. toggle_name: FEATURES['DISABLE_ALLOWED_ENROLLMENT_IF_ENROLLMENT_CLOSED'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Set to True to disable enrollment for user invited to a course - # .. if user is registering before enrollment start date or after enrollment end date - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2022-06-06 - # .. toggle_tickets: 'https://github.com/openedx/edx-platform/pull/29538' - 'DISABLE_ALLOWED_ENROLLMENT_IF_ENROLLMENT_CLOSED': False, - - # .. toggle_name: FEATURES['SEND_LEARNING_CERTIFICATE_LIFECYCLE_EVENTS_TO_BUS'] - # .. toggle_implementation: SettingToggle - # .. toggle_default: False - # .. toggle_description: When True, the system will publish certificate lifecycle signals to the event bus. - # This toggle is used to create the EVENT_BUS_PRODUCER_CONFIG setting. - # .. toggle_warning: The default may be changed in a later release. See - # https://github.com/openedx/openedx-events/issues/265 - # .. toggle_use_cases: opt_in - # .. toggle_creation_date: 2023-10-10 - # .. toggle_tickets: https://github.com/openedx/openedx-events/issues/210 - 'SEND_LEARNING_CERTIFICATE_LIFECYCLE_EVENTS_TO_BUS': False, - - # .. toggle_name: FEATURES['ENABLE_GRADING_METHOD_IN_PROBLEMS'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Enables the grading method feature in capa problems. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2024-03-22 - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/33911 - 'ENABLE_GRADING_METHOD_IN_PROBLEMS': False, - - # .. toggle_name: FEATURES['ENABLE_COURSEWARE_SEARCH_VERIFIED_REQUIRED'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: When enabled, the courseware search feature will only be enabled - # for users in a verified enrollment track. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2024-04-24 - 'ENABLE_COURSEWARE_SEARCH_VERIFIED_ENROLLMENT_REQUIRED': False, - - # .. toggle_name: FEATURES['BADGES_ENABLED'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: Set to True to enable badges functionality. - # .. toggle_use_cases: open_edx - # .. toggle_creation_date: 2024-04-02 - # .. toggle_target_removal_date: None - 'BADGES_ENABLED': False, -} +# FEATURES + +# .. toggle_name: settings.DISPLAY_DEBUG_INFO_TO_STAFF +# .. toggle_implementation: DjangoSetting +# .. toggle_default: True +# .. toggle_description: Add a "Staff Debug" button to course blocks for debugging +# by course staff. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2015-09-04 +# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/2425 +DISPLAY_DEBUG_INFO_TO_STAFF = True + +# .. toggle_name: settings.DISPLAY_HISTOGRAMS_TO_STAFF +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: This displays histograms in the Staff Debug Info panel to course staff. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2014-02-13 +# .. toggle_warning: Generating histograms requires scanning the courseware_studentmodule table on each view. This +# can make staff access to courseware very slow on large courses. +# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/2425 +DISPLAY_HISTOGRAMS_TO_STAFF = False # For large courses this slows down courseware access for staff. + +REROUTE_ACTIVATION_EMAIL = False # nonempty string = address for all activation emails + +# .. toggle_name: settings.DISABLE_START_DATES +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: When True, all courses will be active, regardless of start +# date. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2012-07-24 +# .. toggle_warning: This will cause ALL courses to be immediately visible. +# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/17913 +## DO NOT SET TO True IN THIS FILE +## Doing so will cause all courses to be released on production +DISABLE_START_DATES = False + +# .. toggle_name: settings.ENABLE_DISCUSSION_SERVICE +# .. toggle_implementation: DjangoSetting +# .. toggle_default: True +# .. toggle_description: When True, it will enable the Discussion tab in courseware for all courses. Setting this +# to False will not contain inline discussion components and discussion tab in any courses. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2012-08-14 +# .. toggle_warning: If the discussion panel is present in the course and the value for this flag is False then, +# attempting to expand those components will cause errors. So, this should only be set to False with an LMS that +# is running courses that do not contain discussion components. +# For consistency in user-experience, keep the value in sync with the setting of the same name in the CMS. +ENABLE_DISCUSSION_SERVICE = True + +# .. toggle_name: settings.ENABLE_TEXTBOOK +# .. toggle_implementation: DjangoSetting +# .. toggle_default: True +# .. toggle_description: Add PDF and HTML textbook tabs to the courseware. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2014-03-27 +# .. toggle_warning: For consistency in user-experience, keep the value in sync with the setting of the same name +# in the CMS. +# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/3064 +ENABLE_TEXTBOOK = True + +# .. toggle_name: settings.ENABLE_DISCUSSION_HOME_PANEL +# .. toggle_implementation: DjangoSetting +# .. toggle_default: True +# .. toggle_description: Hides or displays a welcome panel under the Discussion tab, which includes a subscription +# on/off setting for discussion digest emails. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2013-07-30 +# .. toggle_warning: This should remain off in production until digest notifications are online. +# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/520 +ENABLE_DISCUSSION_HOME_PANEL = False + +# .. toggle_name: settings.ENABLE_DISCUSSION_EMAIL_DIGEST +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: Set this to True if you want the discussion digest emails +# enabled automatically for new users. This will be set on all new account +# registrations. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2014-08-19 +# .. toggle_target_removal_date: None +# .. toggle_warning: It is not recommended to enable this feature if ENABLE_DISCUSSION_HOME_PANEL is not enabled, +# since subscribers who receive digests in that case will only be able to unsubscribe via links embedded in +# their emails, and they will have no way to resubscribe. +# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/4891 +ENABLE_DISCUSSION_EMAIL_DIGEST = False + +# .. toggle_name: settings.ENABLE_UNICODE_USERNAME +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: Set this to True to allow unicode characters in username. Enabling this will also +# automatically enable SOCIAL_AUTH_CLEAN_USERNAMES. When this is enabled, usernames will have to match the +# regular expression defined by USERNAME_REGEX_PARTIAL. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2017-06-27 +# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/14729 +ENABLE_UNICODE_USERNAME = False + +# .. toggle_name: settings.ENABLE_DJANGO_ADMIN_SITE +# .. toggle_implementation: DjangoSetting +# .. toggle_default: True +# .. toggle_description: Set to False if you want to disable Django's admin site. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2013-09-26 +# .. toggle_warning: It is not recommended to disable this feature as there are many settings available on +# Django's admin site and will be inaccessible to the superuser. +# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/829 +ENABLE_DJANGO_ADMIN_SITE = True +ENABLE_LMS_MIGRATION = False + +# .. toggle_name: settings.ENABLE_MASQUERADE +# .. toggle_implementation: DjangoSetting +# .. toggle_default: True +# .. toggle_description: None +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2013-04-13 +ENABLE_MASQUERADE = True + +# .. toggle_name: settings.DISABLE_LOGIN_BUTTON +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: Removes the display of the login button in the navigation bar. +# Change is only at the UI level. Used in systems where login is automatic, eg MIT SSL +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2013-12-03 +DISABLE_LOGIN_BUTTON = False + +# .. toggle_name: settings.ENABLE_OAUTH2_PROVIDER +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: Enable this feature to allow this Open edX platform to be an OAuth2 authentication +# provider. This is necessary to enable some other features, such as the REST API for the mobile application. +# .. toggle_use_cases: temporary +# .. toggle_creation_date: 2014-09-09 +# .. toggle_target_removal_date: None +# .. toggle_warning: This temporary feature toggle does not have a target removal date. +ENABLE_OAUTH2_PROVIDER = False + +# .. toggle_name: settings.ENABLE_XBLOCK_VIEW_ENDPOINT +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: Enable an API endpoint, named "xblock_view", to serve rendered XBlock views. This might be +# used by external applications. See for instance jquery-xblock (now unmaintained): +# https://github.com/openedx/jquery-xblock +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2014-03-14 +# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/2968 +ENABLE_XBLOCK_VIEW_ENDPOINT = False + +# Allows to configure the LMS to provide CORS headers to serve requests from other +# domains +ENABLE_CORS_HEADERS = False + +# Can be turned off if course lists need to be hidden. Effects views and templates. +# .. toggle_name: settings.COURSES_ARE_BROWSABLE +# .. toggle_implementation: DjangoSetting +# .. toggle_default: True +# .. toggle_description: When this is set to True, all the courses will be listed on the /courses page and Explore +# Courses link will be visible. Set to False if courses list and Explore Courses link need to be hidden. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2013-09-28 +# .. toggle_warning: This Effects views and templates. +# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/1073 +COURSES_ARE_BROWSABLE = True + +# Can be turned off to disable the help link in the navbar +# .. toggle_name: settings.ENABLE_HELP_LINK +# .. toggle_implementation: DjangoSetting +# .. toggle_default: True +# .. toggle_description: When True, a help link is displayed on the main navbar. Set False to hide it. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2021-03-05 +# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/26106 +ENABLE_HELP_LINK = True + +# .. toggle_name: settings.HIDE_DASHBOARD_COURSES_UNTIL_ACTIVATED +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: When set, it hides the Courses list on the Learner Dashboard page if the learner has not +# yet activated the account and not enrolled in any courses. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2018-05-18 +# .. toggle_tickets: https://openedx.atlassian.net/browse/OSPR-1814 +HIDE_DASHBOARD_COURSES_UNTIL_ACTIVATED = False + +# .. toggle_name: settings.ENABLE_STUDENT_HISTORY_VIEW +# .. toggle_implementation: DjangoSetting +# .. toggle_default: True +# .. toggle_description: This provides a UI to show a student's submission history in a problem by the Staff Debug +# tool. Set to False if you want to hide Submission History from the courseware page. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2013-02-15 +# .. toggle_tickets: https://github.com/openedx/edx-platform/commit/8f17e6ae9ed76fa75b3caf867b65ccb632cb6870 +ENABLE_STUDENT_HISTORY_VIEW = True + +# Turn on a page that lets staff enter Python code to be run in the +# sandbox, for testing whether it's enabled properly. +ENABLE_DEBUG_RUN_PYTHON = False + +# Enable URL that shows information about the status of various services +ENABLE_SERVICE_STATUS = False + +# Don't autoplay videos for students +AUTOPLAY_VIDEOS = False + +# Move the student to next page when a video finishes. Set to True to show +# an auto-advance button in videos. If False, videos never auto-advance. +ENABLE_AUTOADVANCE_VIDEOS = False + +# Enable instructor dash to submit background tasks +ENABLE_INSTRUCTOR_BACKGROUND_TASKS = True + +# Enable instructor to assign individual due dates +# Note: In order for this feature to work, you must also add +# 'lms.djangoapps.courseware.student_field_overrides.IndividualStudentOverrideProvider' to +# the setting FIELD_OVERRIDE_PROVIDERS, in addition to setting this flag to +# True. +INDIVIDUAL_DUE_DATES = False + +# .. toggle_name: CUSTOM_COURSES_EDX +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: Set to True to enable Custom Courses for edX, a feature that is more commonly known as +# CCX. Documentation for configuring and using this feature is available at +# https://docs.openedx.org/en/latest/site_ops/install_configure_run_guide/configuration/enable_ccx.html +# .. toggle_warning: When set to true, 'lms.djangoapps.ccx.overrides.CustomCoursesForEdxOverrideProvider' will +# be added to MODULESTORE_FIELD_OVERRIDE_PROVIDERS +# .. toggle_use_cases: opt_in, circuit_breaker +# .. toggle_creation_date: 2015-04-10 +# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/6636 +CUSTOM_COURSES_EDX = False + +# Toggle to enable certificates of courses on dashboard +ENABLE_VERIFIED_CERTIFICATES = False +# Settings for course import olx validation +ENABLE_COURSE_OLX_VALIDATION = False + +# .. toggle_name: settings.DISABLE_HONOR_CERTIFICATES +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: Set to True to disable honor certificates. Typically used when your installation only +# allows verified certificates, like courses.edx.org. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2019-05-14 +# .. toggle_tickets: https://openedx.atlassian.net/browse/PROD-269 +DISABLE_HONOR_CERTIFICATES = False # Toggle to disable honor certificates + +DISABLE_AUDIT_CERTIFICATES = False # Toggle to disable audit certificates + +# .. toggle_name: settings.AUTOMATIC_AUTH_FOR_TESTING +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: Set to True to perform acceptance and load test. Auto auth view is responsible for load +# testing and is controlled by this feature flag. Session verification (of CacheBackedAuthenticationMiddleware) +# is a security feature, but it can be turned off by enabling this feature flag. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2013-07-25 +# .. toggle_warning: If this has been set to True then the account activation email will be skipped. +# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/417 +AUTOMATIC_AUTH_FOR_TESTING = False + +# .. toggle_name: settings.RESTRICT_AUTOMATIC_AUTH +# .. toggle_implementation: DjangoSetting +# .. toggle_default: True +# .. toggle_description: Prevent auto auth from creating superusers or modifying existing users. Auto auth is a +# mechanism where superusers can simply modify attributes of other users by accessing the "/auto_auth url" with +# the right +# querystring parameters. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2018-05-07 +# .. toggle_tickets: https://openedx.atlassian.net/browse/TE-2545 +RESTRICT_AUTOMATIC_AUTH = True + +# .. toggle_name: settings.ENABLE_LOGIN_MICROFRONTEND +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: Enable the login micro frontend. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2018-05-07 +# .. toggle_warning: The login MFE domain name should be listed in LOGIN_REDIRECT_WHITELIST. +ENABLE_LOGIN_MICROFRONTEND = False + +# .. toggle_name: settings.SKIP_EMAIL_VALIDATION +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: Turn this on to skip sending emails for user validation. +# Beware, as this leaves the door open to potential spam abuse. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2018-05-07 +# .. toggle_warning: The login MFE domain name should be listed in LOGIN_REDIRECT_WHITELIST. +SKIP_EMAIL_VALIDATION = False + +# .. toggle_name: settings.ENABLE_COSMETIC_DISPLAY_PRICE +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: Enable the display of "cosmetic_display_price", set in a course advanced settings. This +# cosmetic price is used when there is no registration price associated to the course. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2014-10-10 +# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/6876 +# .. toggle_warning: The use case of this feature toggle is uncertain. +ENABLE_COSMETIC_DISPLAY_PRICE = False + +# Automatically approve student identity verification attempts +# .. toggle_name: settings.AUTOMATIC_VERIFY_STUDENT_IDENTITY_FOR_TESTING +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: If set to True, then we want to skip posting anything to Software Secure. Bypass posting +# anything to Software Secure if the auto verify feature for testing is enabled. We actually don't even create +# the message because that would require encryption and message signing that rely on settings.VERIFY_STUDENT +# values that aren't set in dev. So we just pretend like we successfully posted and automatically approve student +# identity verification attempts. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2013-10-03 +# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/1184 +AUTOMATIC_VERIFY_STUDENT_IDENTITY_FOR_TESTING = False + +# Maximum number of rows to include in the csv file for downloading problem responses. +MAX_PROBLEM_RESPONSES_COUNT = 5000 + +ENABLED_PAYMENT_REPORTS = [ + "refund_report", + "itemized_purchase_report", + "university_revenue_share", + "certificate_status" +] + +# Turn off account locking if failed login attempts exceeds a limit +# .. toggle_name: settings.ENABLE_MAX_FAILED_LOGIN_ATTEMPTS +# .. toggle_implementation: DjangoSetting +# .. toggle_default: True +# .. toggle_description: This feature will keep track of the number of failed login attempts on a given user's +# email. If the number of consecutive failed login attempts - without a successful login at some point - reaches +# a configurable threshold (default 6), then the account will be locked for a configurable amount of seconds +# (30 minutes) which will prevent additional login attempts until this time period has passed. If a user +# successfully logs in, all the counter which tracks the number of failed attempts will be reset back to 0. If +# set to False then account locking will be disabled for failed login attempts. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2014-01-30 +# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/2331 +ENABLE_MAX_FAILED_LOGIN_ATTEMPTS = True + +# Hide any Personally Identifiable Information from application logs +SQUELCH_PII_IN_LOGS = True + +# .. toggle_name: settings.EMBARGO +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: Turns on embargo functionality, which blocks users from +# the site or courses based on their location. Embargo can restrict users by states +# and whitelist/blacklist (IP Addresses (ie. 10.0.0.0), Networks (ie. 10.0.0.0/24)), or the user profile country. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2014-02-27 +# .. toggle_target_removal_date: None +# .. toggle_warning: reverse proxy should be configured appropriately for example Client IP address headers +# (e.g HTTP_X_FORWARDED_FOR) should be configured. +# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/2749 +EMBARGO = False + +# Whether the Wiki subsystem should be accessible via the direct /wiki/ paths. Setting this to True means +# that people can submit content and modify the Wiki in any arbitrary manner. We're leaving this as True in the +# defaults, so that we maintain current behavior +ALLOW_WIKI_ROOT_ACCESS = True + +# .. toggle_name: settings.ENABLE_THIRD_PARTY_AUTH +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: Turn on third-party auth. Disabled for now because full implementations are not yet +# available. Remember to run migrations if you enable this; we don't create tables by default. This feature can +# be enabled on a per-site basis. When enabling this feature, remember to define the allowed authentication +# backends with the AUTHENTICATION_BACKENDS setting. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2014-09-15 +ENABLE_THIRD_PARTY_AUTH = False + +# .. toggle_name: settings.ENABLE_MKTG_SITE +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: Toggle to enable alternate urls for marketing links. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2014-03-24 +# .. toggle_warning: When this is enabled, the MKTG_URLS setting should be defined. The use case of this feature +# toggle is uncertain. +ENABLE_MKTG_SITE = False + +# Prevent concurrent logins per user +PREVENT_CONCURRENT_LOGINS = True + +# .. toggle_name: settings.ALWAYS_REDIRECT_HOMEPAGE_TO_DASHBOARD_FOR_AUTHENTICATED_USER +# .. toggle_implementation: DjangoSetting +# .. toggle_default: True +# .. toggle_description: When a logged in user goes to the homepage ('/') the user will be redirected to the +# dashboard page when this flag is set to True - this is default Open edX behavior. Set to False to not redirect +# the user. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2014-09-16 +# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/5220 +ALWAYS_REDIRECT_HOMEPAGE_TO_DASHBOARD_FOR_AUTHENTICATED_USER = True + +# .. toggle_name: settings.ENABLE_COURSE_SORTING_BY_START_DATE +# .. toggle_implementation: DjangoSetting +# .. toggle_default: True +# .. toggle_description: When a user goes to the homepage ('/') the user sees the courses listed in the +# announcement dates order - this is default Open edX behavior. Set to True to change the course sorting behavior +# by their start dates, latest first. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2015-03-27 +# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/7548 +ENABLE_COURSE_SORTING_BY_START_DATE = True + +# .. toggle_name: settings.ENABLE_COURSE_HOME_REDIRECT +# .. toggle_implementation: DjangoSetting +# .. toggle_default: True +# .. toggle_description: When enabled, along with the ENABLE_MKTG_SITE feature toggle, users who attempt to access a +# course "about" page will be redirected to the course home url. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2019-01-15 +# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/19604 +ENABLE_COURSE_HOME_REDIRECT = True + +# Expose Mobile REST API. Note that if you use this, you must also set +# ENABLE_OAUTH2_PROVIDER to True +ENABLE_MOBILE_REST_API = False + +# .. toggle_name: settings.ENABLE_COMBINED_LOGIN_REGISTRATION_FOOTER +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: Display the standard footer in the login page. This feature can be overridden by a site- +# specific configuration. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2016-06-24 +# .. toggle_tickets: https://openedx.atlassian.net/browse/OSPR-1320 +ENABLE_COMBINED_LOGIN_REGISTRATION_FOOTER = False + +# Enable organizational email opt-in +ENABLE_MKTG_EMAIL_OPT_IN = False + +# .. toggle_name: settings.ENABLE_FOOTER_MOBILE_APP_LINKS +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: Set to True if you want show the mobile app links (Apple App Store & Google Play Store) in +# the footer. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2015-01-13 +# .. toggle_warning: If you set this to True then you should also set your mobile application's app store and play +# store URLs in the MOBILE_STORE_URLS settings dictionary. These links are not part of the default theme. If you +# want these links on your footer then you should use the edx.org theme. +# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/6588 +ENABLE_FOOTER_MOBILE_APP_LINKS = False + +# Let students save and manage their annotations +# .. toggle_name: settings.ENABLE_EDXNOTES +# .. toggle_implementation: SettingToggle +# .. toggle_default: False +# .. toggle_description: This toggle enables the students to save and manage their annotations in the +# course using the notes service. The bulk of the actual work in storing the notes is done by +# a separate service (see the edx-notes-api repo). +# .. toggle_warning: Requires the edx-notes-api service properly running and to have configured the django settings +# EDXNOTES_INTERNAL_API and EDXNOTES_PUBLIC_API. If you update this setting, also update it in Studio. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2015-01-04 +# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/6321 +ENABLE_EDXNOTES = False + +# Toggle to enable coordination with the Publisher tool (keep in sync with cms/envs/common.py) +ENABLE_PUBLISHER = False + +# Milestones application flag +MILESTONES_APP = False + +# Prerequisite courses feature flag +ENABLE_PREREQUISITE_COURSES = False + +# For easily adding modes to courses during acceptance testing +MODE_CREATION_FOR_TESTING = False + +# For caching programs in contexts where the LMS can only +# be reached over HTTP. +EXPOSE_CACHE_PROGRAMS_ENDPOINT = False + +# Courseware search feature +# .. toggle_name: settings.ENABLE_COURSEWARE_SEARCH +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: When enabled, this adds a Search the course widget on the course outline and courseware +# pages for searching courseware data. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2015-01-29 +# .. toggle_warning: In order to get this working, your courses data should be indexed in Elasticsearch. You will +# see the search widget on the courseware page only if the DISABLE_COURSE_OUTLINE_PAGE_FLAG is set. +# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/6506 +ENABLE_COURSEWARE_SEARCH = False + +# .. toggle_name: settings.ENABLE_COURSEWARE_SEARCH_FOR_COURSE_STAFF +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: When enabled, this adds a Search the course widget on the course outline and courseware +# pages for searching courseware data but for course staff users only. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2019-12-06 +# .. toggle_warning: In order to get this working, your courses data should be indexed in Elasticsearch. If +# ENABLE_COURSEWARE_SEARCH is enabled then the search widget will be visible to all learners and this flag's +# value does not matter in that case. This flag is enabled in devstack by default. +# .. toggle_tickets: https://openedx.atlassian.net/browse/TNL-6931 +ENABLE_COURSEWARE_SEARCH_FOR_COURSE_STAFF = False + +# Dashboard search feature +# .. toggle_name: settings.ENABLE_DASHBOARD_SEARCH +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: When enabled, this adds a Search Your Courses widget on the dashboard page for searching +# courseware data. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2015-01-29 +# .. toggle_warning: In order to get this working, your courses data should be indexed in Elasticsearch. +# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/6506 +ENABLE_DASHBOARD_SEARCH = False + +# log all information from cybersource callbacks +LOG_POSTPAY_CALLBACKS = True + +# .. toggle_name: settings.LICENSING +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: Toggle platform-wide course licensing. The course.license attribute is then used to append +# license information to the courseware. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2015-05-14 +# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/7315 +LICENSING = False + +# .. toggle_name: settings.CERTIFICATES_HTML_VIEW +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: Set to True to enable course certificates on your instance of Open edX. +# .. toggle_warning: You must enable this feature flag in both Studio and the LMS and complete the configuration tasks +# described here: +# https://docs.openedx.org/en/latest/site_ops/install_configure_run_guide/configuration/enable_certificates.html pylint: disable=line-too-long,useless-suppression +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2015-03-13 +# .. toggle_target_removal_date: None +# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/7113 +CERTIFICATES_HTML_VIEW = False + +# .. toggle_name: settings.CUSTOM_CERTIFICATE_TEMPLATES_ENABLED +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: Set to True to enable custom certificate templates which are configured via Django admin. +# .. toggle_warning: None +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2015-08-13 +# .. toggle_target_removal_date: None +# .. toggle_tickets: https://openedx.atlassian.net/browse/SOL-1044 +CUSTOM_CERTIFICATE_TEMPLATES_ENABLED = False + +# .. toggle_name: settings.ENABLE_COURSE_DISCOVERY +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: Add a course search widget to the LMS for searching courses. When this is enabled, the +# latest courses are no longer displayed on the LMS landing page. Also, an "Explore Courses" item is added to the +# navbar. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2015-04-23 +# .. toggle_target_removal_date: None +# .. toggle_warning: The COURSE_DISCOVERY_MEANINGS setting should be properly defined. +# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/7845 +ENABLE_COURSE_DISCOVERY = False + +# .. toggle_name: settings.ENABLE_COURSE_FILENAME_CCX_SUFFIX +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: If set to True, CCX ID will be included in the generated filename for CCX courses. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2021-03-16 +# .. toggle_target_removal_date: None +# .. toggle_tickets: None +# .. toggle_warning: Turning this feature ON will affect all generated filenames which are related to CCX courses. +ENABLE_COURSE_FILENAME_CCX_SUFFIX = False + +# Setting for overriding default filtering facets for Course discovery +# COURSE_DISCOVERY_FILTERS = ["org", "language", "modes"] + +# Software secure fake page feature flag +ENABLE_SOFTWARE_SECURE_FAKE = False + +# Teams feature +ENABLE_TEAMS = True + +# Show video bumper in LMS +ENABLE_VIDEO_BUMPER = False + +# How many seconds to show the bumper again, default is 7 days: +SHOW_BUMPER_PERIODICITY = 7 * 24 * 3600 + +# .. toggle_name: settings.ENABLE_SPECIAL_EXAMS +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: Enable to use special exams, aka timed and proctored exams. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2015-09-04 +# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/9744 +ENABLE_SPECIAL_EXAMS = False + +# .. toggle_name: settings.ENABLE_LTI_PROVIDER +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: When set to True, Open edX site can be used as an LTI Provider to other systems +# and applications. +# .. toggle_warning: After enabling this feature flag there are multiple steps involved to configure edX +# as LTI provider. Full guide is available here: +# https://docs.openedx.org/en/latest/site_ops/install_configure_run_guide/configuration/lti/index.html +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2015-04-24 +# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/7689 +ENABLE_LTI_PROVIDER = False + +# .. toggle_name: settings.SHOW_HEADER_LANGUAGE_SELECTOR +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: When set to True, language selector will be visible in the header. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2017-05-25 +# .. toggle_warning: You should set the languages in the DarkLangConfig table to get this working. If you have +# not set any languages in the DarkLangConfig table then the language selector will not be visible in the header. +# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/15133 +SHOW_HEADER_LANGUAGE_SELECTOR = False + +# At edX it's safe to assume that English transcripts are always available +# This is not the case for all installations. +# The default value in {lms,cms}/envs/common.py and xmodule/tests/test_video.py should be consistent. +FALLBACK_TO_ENGLISH_TRANSCRIPTS = True + +# .. toggle_name: settings.SHOW_FOOTER_LANGUAGE_SELECTOR +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: When set to True, language selector will be visible in the footer. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2017-05-25 +# .. toggle_warning: LANGUAGE_COOKIE_NAME is required to use footer-language-selector, set it if it has not been set. +# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/15133 +SHOW_FOOTER_LANGUAGE_SELECTOR = False + +# .. toggle_name: settings.ENABLE_CSMH_EXTENDED +# .. toggle_implementation: DjangoSetting +# .. toggle_default: True +# .. toggle_description: Write Courseware Student Module History (CSMH) to the extended table: this logs all +# student activities to MySQL, in a separate database. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2020-11-05 +# .. toggle_warning: Even though most Open edX instances run with a separate CSMH database, it may not always be +# the case. When disabling this feature flag, remember to remove "lms.djangoapps.coursewarehistoryextended" +# from the INSTALLED_APPS and the "StudentModuleHistoryExtendedRouter" from the DATABASE_ROUTERS. +ENABLE_CSMH_EXTENDED = True + +# Read from both the CSMH and CSMHE history tables. +# This is the default, but can be disabled if all history +# lives in the Extended table, saving the frontend from +# making multiple queries. +ENABLE_READING_FROM_MULTIPLE_HISTORY_TABLES = True + +# Set this to False to facilitate cleaning up invalid xml from your modulestore. +ENABLE_XBLOCK_XML_VALIDATION = True + +# .. toggle_name: settings.ALLOW_PUBLIC_ACCOUNT_CREATION +# .. toggle_implementation: DjangoSetting +# .. toggle_default: True +# .. toggle_description: Allow public account creation. If this is disabled, users will no longer have access to +# the signup page. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2017-04-12 +# .. toggle_tickets: https://openedx.atlassian.net/browse/YONK-513 +ALLOW_PUBLIC_ACCOUNT_CREATION = True + +# .. toggle_name: settings.SHOW_REGISTRATION_LINKS +# .. toggle_implementation: DjangoSetting +# .. toggle_default: True +# .. toggle_description: Allow registration links. If this is disabled, users will no longer see buttons to the +# the signup page. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2023-03-27 +SHOW_REGISTRATION_LINKS = True + +# .. toggle_name: settings.ENABLE_COOKIE_CONSENT +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: Enable header banner for cookie consent using this service: +# https://cookieconsent.insites.com/ +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2017-03-03 +# .. toggle_tickets: https://openedx.atlassian.net/browse/OSPR-1560 +ENABLE_COOKIE_CONSENT = False + +# Whether or not the dynamic EnrollmentTrackUserPartition should be registered. +ENABLE_ENROLLMENT_TRACK_USER_PARTITION = True + +# Enable one click program purchase +# See LEARNER-493 +ENABLE_ONE_CLICK_PROGRAM_PURCHASE = False + +# .. toggle_name: settings.ALLOW_EMAIL_ADDRESS_CHANGE +# .. toggle_implementation: DjangoSetting +# .. toggle_default: True +# .. toggle_description: Allow users to change their email address on the Account Settings page. If this is +# disabled, users will not be able to change their email address. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2017-06-26 +# .. toggle_tickets: https://openedx.atlassian.net/browse/OSPR-1735 +ALLOW_EMAIL_ADDRESS_CHANGE = True + +# .. toggle_name: settings.ENABLE_BULK_ENROLLMENT_VIEW +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: When set to True the bulk enrollment view is enabled and one can use it to enroll multiple +# users in a course using bulk enrollment API endpoint (/api/bulk_enroll/v1/bulk_enroll). +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2017-07-15 +# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/15006 +ENABLE_BULK_ENROLLMENT_VIEW = False + +# Set to enable Enterprise integration +ENABLE_ENTERPRISE_INTEGRATION = False + +# .. toggle_name: settings.ENABLE_HTML_XBLOCK_STUDENT_VIEW_DATA +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: Whether HTML Block returns HTML content with the Course Blocks API when the API +# is called with student_view_data=html query parameter. +# .. toggle_warning: Because the Course Blocks API caches its data, the cache must be cleared (e.g. by +# re-publishing the course) for changes to this flag to take effect. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2017-08-28 +# .. toggle_tickets: https://openedx.atlassian.net/browse/OSPR-1880 +ENABLE_HTML_XBLOCK_STUDENT_VIEW_DATA = False + +# .. toggle_name: settings.ENABLE_PASSWORD_RESET_FAILURE_EMAIL +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: Whether to send an email for failed password reset attempts or not. This happens when a +# user asks for a password reset but they don't have an account associated to their email. This is useful for +# notifying users that they don't have an account associated with email addresses they believe they've registered +# with. This setting can be overridden by a site-specific configuration. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2017-07-20 +# .. toggle_tickets: https://openedx.atlassian.net/browse/OSPR-1832 +ENABLE_PASSWORD_RESET_FAILURE_EMAIL = False + +# Sets the default browser support. For more information go to http://browser-update.org/customize.html +UNSUPPORTED_BROWSER_ALERT_VERSIONS = "{i:10,f:-3,o:-3,s:-3,c:-3}" + +# .. toggle_name: settings.ENABLE_ACCOUNT_DELETION +# .. toggle_implementation: DjangoSetting +# .. toggle_default: True +# .. toggle_description: Whether to display the account deletion section on Account Settings page. Set to False to +# hide this section. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2018-06-01 +# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/18298 +ENABLE_ACCOUNT_DELETION = True + +# Enable feature to remove enrollments and users. Used to reset state of master's integration environments +ENABLE_ENROLLMENT_RESET = False +DISABLE_MOBILE_COURSE_AVAILABLE = False + +# .. toggle_name: settings.ENABLE_CHANGE_USER_PASSWORD_ADMIN +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: Set to True to enable changing a user password through django admin. This is disabled by +# default because enabling allows a method to bypass password policy. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2020-02-21 +# .. toggle_tickets: 'https://github.com/openedx/edx-platform/pull/21616' +ENABLE_CHANGE_USER_PASSWORD_ADMIN = False + +# .. toggle_name: settings.ENABLE_AUTHN_MICROFRONTEND +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: Supports staged rollout of a new micro-frontend-based implementation of the logistration. +# .. toggle_use_cases: temporary, open_edx +# .. toggle_creation_date: 2020-09-08 +# .. toggle_target_removal_date: None +# .. toggle_tickets: 'https://github.com/openedx/edx-platform/pull/24908' +# .. toggle_warning: Also set settings.AUTHN_MICROFRONTEND_URL for rollout. This temporary feature +# toggle does not have a target removal date. +ENABLE_AUTHN_MICROFRONTEND = os.environ.get("EDXAPP_ENABLE_AUTHN_MFE", False) + +# .. toggle_name: settings.ENABLE_CATALOG_MICROFRONTEND +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: Supports staged rollout of a new micro-frontend-based implementation of the catalog. +# .. toggle_use_cases: temporary +# .. toggle_creation_date: 2025-05-15 +# .. toggle_target_removal_date: 2025-11-01 +ENABLE_CATALOG_MICROFRONTEND = False + +### ORA Feature Flags ### +# .. toggle_name: settings.ENABLE_ORA_ALL_FILE_URLS +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: A "work-around" feature toggle meant to help in cases where some file uploads are not +# discoverable. If enabled, will iterate through all possible file key suffixes up to the max for displaying +# file metadata in staff assessments. +# .. toggle_use_cases: temporary +# .. toggle_creation_date: 2020-03-03 +# .. toggle_target_removal_date: None +# .. toggle_tickets: https://openedx.atlassian.net/browse/EDUCATOR-4951 +# .. toggle_warning: This temporary feature toggle does not have a target removal date. +ENABLE_ORA_ALL_FILE_URLS = False + +# .. toggle_name: settings.ENABLE_ORA_USER_STATE_UPLOAD_DATA +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: A "work-around" feature toggle meant to help in cases where some file uploads are not +# discoverable. If enabled, will pull file metadata from StudentModule.state for display in staff assessments. +# .. toggle_use_cases: temporary +# .. toggle_creation_date: 2020-03-03 +# .. toggle_target_removal_date: None +# .. toggle_tickets: https://openedx.atlassian.net/browse/EDUCATOR-4951 +# .. toggle_warning: This temporary feature toggle does not have a target removal date. +ENABLE_ORA_USER_STATE_UPLOAD_DATA = False + +# .. toggle_name: settings.ENABLE_ORA_USERNAMES_ON_DATA_EXPORT +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: Set to True to add deanonymized usernames to ORA data +# report. +# .. toggle_use_cases: temporary +# .. toggle_creation_date: 2020-06-11 +# .. toggle_target_removal_date: None +# .. toggle_tickets: https://openedx.atlassian.net/browse/TNL-7273 +# .. toggle_warning: This temporary feature toggle does not have a target removal date. +ENABLE_ORA_USERNAMES_ON_DATA_EXPORT = False + +# .. toggle_name: settings.ENABLE_COURSE_ASSESSMENT_GRADE_CHANGE_SIGNAL +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: Set to True to start sending signals for assessment level grade updates. Notably, the only +# handler of this signal at the time of this writing sends assessment updates to enterprise integrated channels. +# .. toggle_use_cases: temporary +# .. toggle_creation_date: 2020-12-09 +# .. toggle_target_removal_date: 2021-02-01 +# .. toggle_tickets: https://openedx.atlassian.net/browse/ENT-3818 +ENABLE_COURSE_ASSESSMENT_GRADE_CHANGE_SIGNAL = False + +# .. toggle_name: settings.ALLOW_ADMIN_ENTERPRISE_COURSE_ENROLLMENT_DELETION +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: If true, allows for the deletion of EnterpriseCourseEnrollment records via Django Admin. +# .. toggle_use_cases: opt_in +# .. toggle_creation_date: 2021-01-27 +# .. toggle_tickets: https://openedx.atlassian.net/browse/ENT-4022 +ALLOW_ADMIN_ENTERPRISE_COURSE_ENROLLMENT_DELETION = False + +# .. toggle_name: settings.ENABLE_BULK_USER_RETIREMENT +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: Set to True to enable bulk user retirement through REST API. This is disabled by +# default. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2021-03-11 +# .. toggle_target_removal_date: None +# .. toggle_warning: None +# .. toggle_tickets: 'https://openedx.atlassian.net/browse/OSPR-5290' +ENABLE_BULK_USER_RETIREMENT = False + +# .. toggle_name: settings.ENABLE_INTEGRITY_SIGNATURE +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: Whether to display honor code agreement for learners before their first grade assignment +# (https://github.com/edx/edx-name-affirmation) +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2022-02-15 +# .. toggle_target_removal_date: None +# .. toggle_tickets: 'https://openedx.atlassian.net/browse/MST-1348' +ENABLE_INTEGRITY_SIGNATURE = False + +# .. toggle_name: settings.ENABLE_LTI_PII_ACKNOWLEDGEMENT +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: Enables the lti pii acknowledgement feature for a course +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2023-10 +# .. toggle_target_removal_date: None +# .. toggle_tickets: 'https://2u-internal.atlassian.net/browse/MST-2055' +ENABLE_LTI_PII_ACKNOWLEDGEMENT = False + +# .. toggle_name: settings.ENABLE_NEW_BULK_EMAIL_EXPERIENCE +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: When true, replaces the bulk email tool found on the +# instructor dashboard with a link to the new communications MFE version instead. +# Setting the tool to false will leave the old bulk email tool experience in place. +# .. toggle_use_cases: opt_in +# .. toggle_creation_date: 2022-03-21 +# .. toggle_target_removal_date: None +# .. toggle_tickets: 'https://openedx.atlassian.net/browse/MICROBA-1758' +ENABLE_NEW_BULK_EMAIL_EXPERIENCE = False + +# .. toggle_name: MARK_LIBRARY_CONTENT_BLOCK_COMPLETE_ON_VIEW +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: If enabled, the Library Content Block is marked as complete when users view it. +# Otherwise (by default), all children of this block must be completed. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2022-03-22 +# .. toggle_target_removal_date: None +# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/28268 +# .. toggle_warning: For consistency in user-experience, keep the value in sync with the setting of the same name +# in the LMS and CMS. +MARK_LIBRARY_CONTENT_BLOCK_COMPLETE_ON_VIEW = False + +# .. toggle_name: settings.DISABLE_UNENROLLMENT +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: Set to True to disable self-unenrollments via REST API. +# This also hides the "Unenroll" button on the Learner Dashboard. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2021-10-11 +# .. toggle_warning: For consistency in user experience, keep the value in sync with the setting of the same name +# in the LMS and CMS. +# .. toggle_tickets: 'https://github.com/open-craft/edx-platform/pull/429' +DISABLE_UNENROLLMENT = False + +# .. toggle_name: settings.ENABLE_CERTIFICATES_IDV_REQUIREMENT +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: Whether to enforce ID Verification requirements for course certificates generation +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2022-04-26 +# .. toggle_target_removal_date: None +# .. toggle_tickets: 'https://openedx.atlassian.net/browse/MST-1458' +ENABLE_CERTIFICATES_IDV_REQUIREMENT = False + +# .. toggle_name: settings.DISABLE_ALLOWED_ENROLLMENT_IF_ENROLLMENT_CLOSED +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: Set to True to disable enrollment for user invited to a course +# .. if user is registering before enrollment start date or after enrollment end date +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2022-06-06 +# .. toggle_tickets: 'https://github.com/openedx/edx-platform/pull/29538' +DISABLE_ALLOWED_ENROLLMENT_IF_ENROLLMENT_CLOSED = False + +# .. toggle_name: settings.SEND_LEARNING_CERTIFICATE_LIFECYCLE_EVENTS_TO_BUS +# .. toggle_implementation: SettingToggle +# .. toggle_default: False +# .. toggle_description: When True, the system will publish certificate lifecycle signals to the event bus. +# This toggle is used to create the EVENT_BUS_PRODUCER_CONFIG setting. +# .. toggle_warning: The default may be changed in a later release. See +# https://github.com/openedx/openedx-events/issues/265 +# .. toggle_use_cases: opt_in +# .. toggle_creation_date: 2023-10-10 +# .. toggle_tickets: https://github.com/openedx/openedx-events/issues/210 +SEND_LEARNING_CERTIFICATE_LIFECYCLE_EVENTS_TO_BUS = False + +# .. toggle_name: settings.ENABLE_GRADING_METHOD_IN_PROBLEMS +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: Enables the grading method feature in capa problems. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2024-03-22 +# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/33911 +ENABLE_GRADING_METHOD_IN_PROBLEMS = False + +# .. toggle_name: settings.ENABLE_COURSEWARE_SEARCH_VERIFIED_REQUIRED +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: When enabled, the courseware search feature will only be enabled +# for users in a verified enrollment track. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2024-04-24 +ENABLE_COURSEWARE_SEARCH_VERIFIED_ENROLLMENT_REQUIRED = False + +# .. toggle_name: settings.BADGES_ENABLED +# .. toggle_implementation: DjangoSetting +# .. toggle_default: False +# .. toggle_description: Set to True to enable badges functionality. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2024-04-02 +# .. toggle_target_removal_date: None +BADGES_ENABLED = False + +################ Enable credit eligibility feature #################### +# .. toggle_name: settings.ENABLE_CREDIT_ELIGIBILITY +# .. toggle_implementation: DjangoSetting +# .. toggle_default: True +# .. toggle_description: When enabled, it is possible to define a credit eligibility criteria in the CMS. A "Credit +# Eligibility" section then appears for those courses in the LMS. +# .. toggle_use_cases: open_edx +# .. toggle_creation_date: 2015-06-17 +# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/8550 +ENABLE_CREDIT_ELIGIBILITY = True + +ENABLE_CROSS_DOMAIN_CSRF_COOKIE = False # .. toggle_name: ENABLE_REQUIRE_THIRD_PARTY_AUTH # .. toggle_implementation: DjangoSetting @@ -1983,7 +1999,7 @@ PAID_COURSE_REGISTRATION_CURRENCY = ['usd', '$'] # .. setting_description: Set the public API endpoint LMS will use in the frontend to # interact with the edx_notes_api service. # .. setting_warning: This setting must be a publicly accessible endpoint. It is only used -# when the setting FEATURES['ENABLE_EDXNOTES'] is activated. +# when the setting settings.ENABLE_EDXNOTES is activated. EDXNOTES_PUBLIC_API = 'http://localhost:18120/api/v1' # .. setting_name: EDXNOTES_INTERNAL_API # .. setting_default: http://localhost:18120/api/v1 @@ -1991,7 +2007,7 @@ EDXNOTES_PUBLIC_API = 'http://localhost:18120/api/v1' # interact with the edx_notes_api service. # .. setting_warning: Normally set to the same value of EDXNOTES_PUBLIC_API. It is not # mandatory for this setting to be a publicly accessible endpoint, but to be accessible -# by the LMS service. It is only used when the setting FEATURES['ENABLE_EDXNOTES'] is +# by the LMS service. It is only used when the setting settings.ENABLE_EDXNOTES is # activated. EDXNOTES_INTERNAL_API = 'http://localhost:18120/api/v1' # .. setting_name: EDXNOTES_CLIENT_NAME @@ -3420,22 +3436,9 @@ VERIFICATION_EXPIRY_EMAIL = { "DEFAULT_EMAILS": 2, } - -################ Enable credit eligibility feature #################### -ENABLE_CREDIT_ELIGIBILITY = True -# .. toggle_name: FEATURES['ENABLE_CREDIT_ELIGIBILITY'] -# .. toggle_implementation: DjangoSetting -# .. toggle_default: True -# .. toggle_description: When enabled, it is possible to define a credit eligibility criteria in the CMS. A "Credit -# Eligibility" section then appears for those courses in the LMS. -# .. toggle_use_cases: open_edx -# .. toggle_creation_date: 2015-06-17 -# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/8550 -FEATURES['ENABLE_CREDIT_ELIGIBILITY'] = ENABLE_CREDIT_ELIGIBILITY - ############# Cross-domain requests ################# -if FEATURES.get('ENABLE_CORS_HEADERS'): +if ENABLE_CORS_HEADERS: CORS_ALLOW_CREDENTIALS = True CORS_ORIGIN_WHITELIST = () CORS_ORIGIN_ALLOW_ALL = False @@ -3915,7 +3918,7 @@ COMMENTS_SERVICE_KEY = '' CHECKPOINT_PATTERN = r'(?P[^/]+)' # For the fields override feature -# If using FEATURES['INDIVIDUAL_DUE_DATES'], you should add +# If using settings.INDIVIDUAL_DUE_DATES, you should add # 'lms.djangoapps.courseware.student_field_overrides.IndividualStudentOverrideProvider' to # this setting. FIELD_OVERRIDE_PROVIDERS = () @@ -4133,7 +4136,7 @@ HELP_TOKENS_BOOKS = { # These configuration settings are specific to the Enterprise service and you should # not find references to them within the edx-platform project. # -# Only used if FEATURES['ENABLE_ENTERPRISE_INTEGRATION'] == True. +# Only used if settings.ENABLE_ENTERPRISE_INTEGRATION == True. ENTERPRISE_PUBLIC_ENROLLMENT_API_URL = Derived( lambda settings: (settings.LMS_ROOT_URL or '') + settings.LMS_ENROLLMENT_API_PATH @@ -4842,13 +4845,13 @@ SIMPLE_HISTORY_DATE_INDEX = False def _should_send_certificate_events(settings): - return settings.FEATURES['SEND_LEARNING_CERTIFICATE_LIFECYCLE_EVENTS_TO_BUS'] + return settings.SEND_LEARNING_CERTIFICATE_LIFECYCLE_EVENTS_TO_BUS #### Event bus producing #### def _should_send_learning_badge_events(settings): - return settings.FEATURES['BADGES_ENABLED'] + return settings.BADGES_ENABLED # .. setting_name: EVENT_BUS_PRODUCER_CONFIG # .. setting_default: all events disabled diff --git a/lms/envs/devstack.py b/lms/envs/devstack.py index a2ee3ea9d8..e2fc7fb6c2 100644 --- a/lms/envs/devstack.py +++ b/lms/envs/devstack.py @@ -142,31 +142,31 @@ PIPELINE['SASS_ARGUMENTS'] = '--debug-info' ########################### VERIFIED CERTIFICATES ################################# -FEATURES['AUTOMATIC_VERIFY_STUDENT_IDENTITY_FOR_TESTING'] = True +AUTOMATIC_VERIFY_STUDENT_IDENTITY_FOR_TESTING = True ########################### External REST APIs ################################# -FEATURES['ENABLE_OAUTH2_PROVIDER'] = True -FEATURES['ENABLE_MOBILE_REST_API'] = True -FEATURES['ENABLE_VIDEO_ABSTRACTION_LAYER_API'] = True +ENABLE_OAUTH2_PROVIDER = True +ENABLE_MOBILE_REST_API = True +ENABLE_VIDEO_ABSTRACTION_LAYER_API = True ########################## SECURITY ####################### -FEATURES['ENABLE_MAX_FAILED_LOGIN_ATTEMPTS'] = False -FEATURES['SQUELCH_PII_IN_LOGS'] = False -FEATURES['PREVENT_CONCURRENT_LOGINS'] = False +ENABLE_MAX_FAILED_LOGIN_ATTEMPTS = False +SQUELCH_PII_IN_LOGS = False +PREVENT_CONCURRENT_LOGINS = False ########################### Milestones ################################# -FEATURES['MILESTONES_APP'] = True +MILESTONES_APP = True ########################### Entrance Exams ################################# -FEATURES['ENTRANCE_EXAMS'] = True +ENTRANCE_EXAMS = True ################################ COURSE LICENSES ################################ -FEATURES['LICENSING'] = True +LICENSING = True ########################## Courseware Search ####################### -FEATURES['ENABLE_COURSEWARE_SEARCH'] = True -FEATURES['ENABLE_COURSEWARE_SEARCH_FOR_COURSE_STAFF'] = True +ENABLE_COURSEWARE_SEARCH = True +ENABLE_COURSEWARE_SEARCH_FOR_COURSE_STAFF = True SEARCH_ENGINE = 'search.elastic.ElasticSearchEngine' SEARCH_COURSEWARE_CONTENT_LOG_PARAMS = True @@ -179,11 +179,11 @@ ELASTIC_SEARCH_CONFIG = [ ] ########################## Dashboard Search ####################### -FEATURES['ENABLE_DASHBOARD_SEARCH'] = False +ENABLE_DASHBOARD_SEARCH = False ########################## Certificates Web/HTML View ####################### -FEATURES['CERTIFICATES_HTML_VIEW'] = True +CERTIFICATES_HTML_VIEW = True ########################## Course Discovery ####################### @@ -205,14 +205,14 @@ COURSE_DISCOVERY_MEANINGS = { 'language': LANGUAGE_MAP, } -FEATURES['ENABLE_COURSE_DISCOVERY'] = False +ENABLE_COURSE_DISCOVERY = False # Setting for overriding default filtering facets for Course discovery # COURSE_DISCOVERY_FILTERS = ["org", "language", "modes"] -FEATURES['COURSES_ARE_BROWSEABLE'] = True +COURSES_ARE_BROWSEABLE = True HOMEPAGE_COURSE_MAX = 9 # Software secure fake page feature flag -FEATURES['ENABLE_SOFTWARE_SECURE_FAKE'] = True +ENABLE_SOFTWARE_SECURE_FAKE = True # Setting for the testing of Software Secure Result Callback VERIFY_STUDENT["SOFTWARE_SECURE"] = { @@ -226,14 +226,14 @@ SEARCH_SKIP_ENROLLMENT_START_DATE_FILTERING = True ########################## Shopping cart ########################## -FEATURES['ENABLE_COSMETIC_DISPLAY_PRICE'] = True +ENABLE_COSMETIC_DISPLAY_PRICE = True ######################### Program Enrollments ##################### -FEATURES['ENABLE_ENROLLMENT_RESET'] = True +ENABLE_ENROLLMENT_RESET = True ########################## Third Party Auth ####################### -if FEATURES.get('ENABLE_THIRD_PARTY_AUTH') and ( +if ENABLE_THIRD_PARTY_AUTH and ( 'common.djangoapps.third_party_auth.dummy.DummyBackend' not in AUTHENTICATION_BACKENDS ): AUTHENTICATION_BACKENDS = ['common.djangoapps.third_party_auth.dummy.DummyBackend'] + list(AUTHENTICATION_BACKENDS) @@ -293,7 +293,7 @@ LEARNING_MICROFRONTEND_URL = os.environ.get("LEARNING_MICROFRONTEND_URL", "http: LEARNING_MICROFRONTEND_NETLOC = os.environ.get("LEARNING_MICROFRONTEND_NETLOC", urlparse(LEARNING_MICROFRONTEND_URL).netloc) ###################### Cross-domain requests ###################### -FEATURES['ENABLE_CORS_HEADERS'] = True +ENABLE_CORS_HEADERS = True CORS_ALLOW_CREDENTIALS = True CORS_ORIGIN_WHITELIST = () CORS_ORIGIN_ALLOW_ALL = True @@ -407,17 +407,15 @@ DISCUSSION_SPAM_URLS = [] ############## Docker based devstack settings ####################### -FEATURES.update({ - 'AUTOMATIC_AUTH_FOR_TESTING': True, - 'ENABLE_DISCUSSION_SERVICE': True, - 'SHOW_HEADER_LANGUAGE_SELECTOR': True, +AUTOMATIC_AUTH_FOR_TESTING = True +ENABLE_DISCUSSION_SERVICE = True +SHOW_HEADER_LANGUAGE_SELECTOR = True - # Enable enterprise integration by default. - # See https://github.com/openedx/edx-enterprise/blob/master/docs/development.rst for - # more background on edx-enterprise. - # Toggle this off if you don't want anything to do with enterprise in devstack. - 'ENABLE_ENTERPRISE_INTEGRATION': True, -}) +# Enable enterprise integration by default. +# See https://github.com/openedx/edx-enterprise/blob/master/docs/development.rst for +# more background on edx-enterprise. +# Toggle this off if you don't want anything to do with enterprise in devstack. +ENABLE_ENTERPRISE_INTEGRATION = True ENABLE_MKTG_SITE = os.environ.get('ENABLE_MARKETING_SITE', False) MARKETING_SITE_ROOT = os.environ.get('MARKETING_SITE_ROOT', 'http://localhost:8080') @@ -463,7 +461,7 @@ SYSTEM_WIDE_ROLE_CLASSES.append( 'system_wide_roles.SystemWideRoleAssignment', ) -if FEATURES.get('ENABLE_ENTERPRISE_INTEGRATION'): +if ENABLE_ENTERPRISE_INTEGRATION: SYSTEM_WIDE_ROLE_CLASSES.append( 'enterprise.SystemWideEnterpriseUserRoleAssignment', ) @@ -498,8 +496,8 @@ DCS_SESSION_COOKIE_SAMESITE_FORCE_ALL = True # LOGGING['loggers']['django.db.backends'] = {'handlers': ['console'], 'level': 'DEBUG', 'propagate': False} ################### Special Exams (Proctoring) and Prereqs ################### -FEATURES['ENABLE_SPECIAL_EXAMS'] = True -FEATURES['ENABLE_PREREQUISITE_COURSES'] = True +ENABLE_SPECIAL_EXAMS = True +ENABLE_PREREQUISITE_COURSES = True # Used in edx-proctoring for ID generation in lieu of SECRET_KEY - dummy value # (ref MST-637) diff --git a/lms/envs/production.py b/lms/envs/production.py index 584ebf726e..0620d4f2c0 100644 --- a/lms/envs/production.py +++ b/lms/envs/production.py @@ -32,6 +32,11 @@ from xmodule.modulestore.modulestore_settings import convert_module_store_settin from .common import * +from openedx.core.lib.features_setting_proxy import FeaturesProxy + +# A proxy for feature flags stored in the settings namespace +FEATURES = FeaturesProxy(globals()) + def get_env_setting(setting): """ Get the environment setting or return exception """ @@ -198,7 +203,7 @@ LOGGING = get_logger_config( service_variant=SERVICE_VARIANT, ) -if FEATURES['ENABLE_CORS_HEADERS'] or FEATURES.get('ENABLE_CROSS_DOMAIN_CSRF_COOKIE'): +if ENABLE_CORS_HEADERS or ENABLE_CROSS_DOMAIN_CSRF_COOKIE: CORS_ALLOW_CREDENTIALS = True CORS_ORIGIN_WHITELIST = _YAML_TOKENS.get('CORS_ORIGIN_WHITELIST', ()) CORS_ORIGIN_ALLOW_ALL = _YAML_TOKENS.get('CORS_ORIGIN_ALLOW_ALL', False) @@ -281,7 +286,7 @@ EVENT_TRACKING_BACKENDS['segmentio']['OPTIONS']['processors'][0]['OPTIONS']['whi EVENT_TRACKING_SEGMENTIO_EMIT_WHITELIST ) -if FEATURES.get('ENABLE_THIRD_PARTY_AUTH'): +if ENABLE_THIRD_PARTY_AUTH: AUTHENTICATION_BACKENDS = _YAML_TOKENS.get('THIRD_PARTY_AUTH_BACKENDS', [ 'social_core.backends.google.GoogleOAuth2', 'social_core.backends.linkedin.LinkedinOAuth2', @@ -318,7 +323,7 @@ if FEATURES.get('ENABLE_THIRD_PARTY_AUTH'): THIRD_PARTY_AUTH_CUSTOM_AUTH_FORMS = _YAML_TOKENS.get('THIRD_PARTY_AUTH_CUSTOM_AUTH_FORMS', {}) ##### OAUTH2 Provider ############## -if FEATURES['ENABLE_OAUTH2_PROVIDER']: +if ENABLE_OAUTH2_PROVIDER: OAUTH_ENFORCE_SECURE = True OAUTH_ENFORCE_CLIENT_SECURE = True # Defaults for the following are defined in lms.envs.common @@ -326,10 +331,10 @@ if FEATURES['ENABLE_OAUTH2_PROVIDER']: OAUTH_EXPIRE_DELTA_PUBLIC = datetime.timedelta(days=OAUTH_EXPIRE_PUBLIC_CLIENT_DAYS) if ( - FEATURES['ENABLE_COURSEWARE_SEARCH'] or - FEATURES['ENABLE_DASHBOARD_SEARCH'] or - FEATURES['ENABLE_COURSE_DISCOVERY'] or - FEATURES['ENABLE_TEAMS'] + ENABLE_COURSEWARE_SEARCH or + ENABLE_DASHBOARD_SEARCH or + ENABLE_COURSE_DISCOVERY or + ENABLE_TEAMS ): # Use ElasticSearch as the search engine herein SEARCH_ENGINE = "search.elastic.ElasticSearchEngine" @@ -341,7 +346,7 @@ XBLOCK_SETTINGS.setdefault("VideoBlock", {})["licensing_enabled"] = FEATURES["LI XBLOCK_SETTINGS.setdefault("VideoBlock", {})['YOUTUBE_API_KEY'] = YOUTUBE_API_KEY ##### Custom Courses for EdX ##### -if FEATURES['CUSTOM_COURSES_EDX']: +if CUSTOM_COURSES_EDX: INSTALLED_APPS += ['lms.djangoapps.ccx', 'openedx.core.djangoapps.ccxcon.apps.CCXConnectorConfig'] MODULESTORE_FIELD_OVERRIDE_PROVIDERS += ( 'lms.djangoapps.ccx.overrides.CustomCoursesForEdxOverrideProvider', @@ -350,7 +355,7 @@ if FEATURES['CUSTOM_COURSES_EDX']: FIELD_OVERRIDE_PROVIDERS = tuple(FIELD_OVERRIDE_PROVIDERS) ##### Individual Due Date Extensions ##### -if FEATURES['INDIVIDUAL_DUE_DATES']: +if INDIVIDUAL_DUE_DATES: FIELD_OVERRIDE_PROVIDERS += ( 'lms.djangoapps.courseware.student_field_overrides.IndividualStudentOverrideProvider', ) @@ -375,7 +380,7 @@ PROFILE_IMAGE_DEFAULT_FILENAME = 'images/profiles/default' ##### Credit Provider Integration ##### ##################### LTI Provider ##################### -if FEATURES['ENABLE_LTI_PROVIDER']: +if ENABLE_LTI_PROVIDER: INSTALLED_APPS.append('lms.djangoapps.lti_provider.apps.LtiProviderConfig') AUTHENTICATION_BACKENDS.append('lms.djangoapps.lti_provider.users.LtiBackend') diff --git a/lms/envs/test.py b/lms/envs/test.py index c78604c0c1..c2b2b15569 100644 --- a/lms/envs/test.py +++ b/lms/envs/test.py @@ -27,10 +27,15 @@ from openedx.core.lib.derived import derive_settings from openedx.core.lib.tempdir import mkdtemp_clean from xmodule.modulestore.modulestore_settings import update_module_store_settings # lint-amnesty, pylint: disable=wrong-import-order +from openedx.core.lib.features_setting_proxy import FeaturesProxy + from .common import * from common.djangoapps.util.testing import patch_sessions, patch_testcase # pylint: disable=wrong-import-order +# A proxy for feature flags stored in the settings namespace +FEATURES = FeaturesProxy(globals()) + # This patch disables the commit_on_success decorator during tests # in TestCase subclasses. patch_testcase() @@ -55,33 +60,33 @@ MONGO_HOST = os.environ.get('EDXAPP_TEST_MONGO_HOST', 'localhost') THIS_UUID = uuid4().hex[:5] -FEATURES['DISABLE_SET_JWT_COOKIES_FOR_TESTS'] = True +DISABLE_SET_JWT_COOKIES_FOR_TESTS = True # can't test start dates with this True, but on the other hand, # can test everything else :) -FEATURES['DISABLE_START_DATES'] = True +DISABLE_START_DATES = True # Most tests don't use the discussion service, so we turn it off to speed them up. # Tests that do can enable this flag, but must use the UrlResetMixin class to force urls.py # to reload. For consistency in user-experience, keep the value of this setting in sync with # the one in cms/envs/test.py -FEATURES['ENABLE_DISCUSSION_SERVICE'] = False +ENABLE_DISCUSSION_SERVICE = False -FEATURES['ENABLE_SERVICE_STATUS'] = True +ENABLE_SERVICE_STATUS = True -FEATURES['ENABLE_VERIFIED_CERTIFICATES'] = True +ENABLE_VERIFIED_CERTIFICATES = True # Toggles embargo on for testing -FEATURES['EMBARGO'] = True +EMBARGO = True # Enable the milestones app in tests to be consistent with it being enabled in production -FEATURES['MILESTONES_APP'] = True +MILESTONES_APP = True -FEATURES['ENABLE_ENROLLMENT_TRACK_USER_PARTITION'] = True +ENABLE_ENROLLMENT_TRACK_USER_PARTITION = True -FEATURES['ENABLE_BULK_ENROLLMENT_VIEW'] = True +ENABLE_BULK_ENROLLMENT_VIEW = True -FEATURES['ENABLE_BULK_USER_RETIREMENT'] = True +ENABLE_BULK_USER_RETIREMENT = True DEFAULT_MOBILE_AVAILABLE = True @@ -221,13 +226,13 @@ CACHES = { ############################# SECURITY SETTINGS ################################ # Default to advanced security in common.py, so tests can reset here to use # a simpler security model -FEATURES['ENFORCE_PASSWORD_POLICY'] = False -FEATURES['ENABLE_MAX_FAILED_LOGIN_ATTEMPTS'] = False -FEATURES['SQUELCH_PII_IN_LOGS'] = False -FEATURES['PREVENT_CONCURRENT_LOGINS'] = False +ENFORCE_PASSWORD_POLICY = False +ENABLE_MAX_FAILED_LOGIN_ATTEMPTS = False +SQUELCH_PII_IN_LOGS = False +PREVENT_CONCURRENT_LOGINS = False ######### Third-party auth ########## -FEATURES['ENABLE_THIRD_PARTY_AUTH'] = True +ENABLE_THIRD_PARTY_AUTH = True AUTHENTICATION_BACKENDS = [ 'social_core.backends.google.GoogleOAuth2', @@ -250,12 +255,12 @@ THIRD_PARTY_AUTH_CUSTOM_AUTH_FORMS = { } ############################## OAUTH2 Provider ################################ -FEATURES['ENABLE_OAUTH2_PROVIDER'] = True +ENABLE_OAUTH2_PROVIDER = True OAUTH_ENFORCE_SECURE = False ########################### External REST APIs ################################# -FEATURES['ENABLE_MOBILE_REST_API'] = True -FEATURES['ENABLE_VIDEO_ABSTRACTION_LAYER_API'] = True +ENABLE_MOBILE_REST_API = True +ENABLE_VIDEO_ABSTRACTION_LAYER_API = True ################################# CELERY ###################################### @@ -343,7 +348,7 @@ PASSWORD_HASHERS = [ ] ### This enables the Metrics tab for the Instructor dashboard ########### -FEATURES['CLASS_DASHBOARD'] = True +CLASS_DASHBOARD = True ################### Make tests quieter @@ -393,13 +398,13 @@ MONGODB_LOG = { NOTES_DISABLED_TABS = [] # Enable EdxNotes for tests. -FEATURES['ENABLE_EDXNOTES'] = True +ENABLE_EDXNOTES = True # Enable courseware search for tests -FEATURES['ENABLE_COURSEWARE_SEARCH'] = True +ENABLE_COURSEWARE_SEARCH = True # Enable dashboard search for tests -FEATURES['ENABLE_DASHBOARD_SEARCH'] = True +ENABLE_DASHBOARD_SEARCH = True # Use MockSearchEngine as the search engine for test scenario SEARCH_ENGINE = "search.tests.mock_search_engine.MockSearchEngine" @@ -410,7 +415,7 @@ FACEBOOK_API_VERSION = "v2.8" ######### custom courses ######### INSTALLED_APPS += ['lms.djangoapps.ccx', 'openedx.core.djangoapps.ccxcon.apps.CCXConnectorConfig'] -FEATURES['CUSTOM_COURSES_EDX'] = True +CUSTOM_COURSES_EDX = True # Set dummy values for profile image settings. PROFILE_IMAGE_BACKEND = { @@ -427,12 +432,12 @@ PROFILE_IMAGE_MAX_BYTES = 1024 * 1024 PROFILE_IMAGE_MIN_BYTES = 100 # Enable the LTI provider feature for testing -FEATURES['ENABLE_LTI_PROVIDER'] = True +ENABLE_LTI_PROVIDER = True INSTALLED_APPS.append('lms.djangoapps.lti_provider.apps.LtiProviderConfig') AUTHENTICATION_BACKENDS.append('lms.djangoapps.lti_provider.users.LtiBackend') # Financial assistance page -FEATURES['ENABLE_FINANCIAL_ASSISTANCE_FORM'] = True +ENABLE_FINANCIAL_ASSISTANCE_FORM = True COURSE_BLOCKS_API_EXTRA_FIELDS = [ ('course', 'course_visibility'), diff --git a/openedx/core/djangoapps/ace_common/settings/common.py b/openedx/core/djangoapps/ace_common/settings/common.py index 634ab328ba..5d10766ede 100644 --- a/openedx/core/djangoapps/ace_common/settings/common.py +++ b/openedx/core/djangoapps/ace_common/settings/common.py @@ -24,7 +24,7 @@ def plugin_settings(settings): # lint-amnesty, pylint: disable=missing-function settings.ACE_ROUTING_KEY = ACE_ROUTING_KEY - settings.FEATURES['test_django_plugin'] = True + settings.test_django_plugin = True settings.FCM_APP_NAME = 'fcm-edx-platform' settings.ACE_CHANNEL_DEFAULT_PUSH = 'push_notification' diff --git a/openedx/core/djangoapps/models/course_details.py b/openedx/core/djangoapps/models/course_details.py index c00d7d0b88..344be4ea75 100644 --- a/openedx/core/djangoapps/models/course_details.py +++ b/openedx/core/djangoapps/models/course_details.py @@ -71,9 +71,8 @@ class CourseDetails: self.pre_requisite_courses = [] # pre-requisite courses self.entrance_exam_enabled = "" # is entrance exam enabled self.entrance_exam_id = "" # the content location for the entrance exam - self.entrance_exam_minimum_score_pct = settings.FEATURES.get( - 'ENTRANCE_EXAM_MIN_SCORE_PCT', - '50' + self.entrance_exam_minimum_score_pct = str( + settings.ENTRANCE_EXAM_MIN_SCORE_PCT ) # minimum passing score for entrance exam content module/tree, self.self_paced = None self.learning_info = [] diff --git a/openedx/core/lib/features_setting_proxy.py b/openedx/core/lib/features_setting_proxy.py new file mode 100644 index 0000000000..9de2b3c44d --- /dev/null +++ b/openedx/core/lib/features_setting_proxy.py @@ -0,0 +1,106 @@ +""" +Features Proxy Implementation +""" +import warnings + +from collections.abc import MutableMapping, Mapping + + +class FeaturesProxy(MutableMapping): + """ + A proxy for feature flags stored in the settings namespace. + + Features: + - Flattens features from configuration (e.g., YAML or env) into the local settings namespace. + - Automatically updates `django.conf.settings` when a feature is modified. + - Acts like a dict (get, set, update, etc.). + + Example usage: + fp = FeaturesProxy(LocalNamespace) + fp["NEW_FEATURE"] = True + val = fp.get("EXISTING_FLAG", False) + """ + + def __init__(self, namespace=None): + """Store the namespace (as a dict)""" + self.ns = namespace or {} + + def __getitem__(self, key): + """Retrieve a feature flag by key""" + return self.ns[key] + + def __setitem__(self, key, value): + """Sets a key-value pair while emitting a deprecation warning about using FEATURES as a dict.""" + warnings.warn( + f"Accessing FEATURES as a dict is deprecated. " + f"Add '{key} = {value!r}' to your Django settings module instead of modifying FEATURES.", + DeprecationWarning, + stacklevel=2 + ) + self.ns[key] = value + + def __delitem__(self, key): + """Remove a feature flag from the namespace.""" + del self.ns[key] + + def __iter__(self): + return iter(self.ns) + + def __len__(self): + return len(self.ns) + + def __contains__(self, key): + return key in self.ns + + def clear(self): + """Remove all feature flags from the namespace.""" + self.ns.clear() + + def get(self, key, default=None): + """Standard dict-style get with default""" + return self.ns.get(key, default) + + def update(self, other=(), /, **kwds): + """ + Update multiple features at once, ensuring each goes through __setitem__ + to emit deprecation warnings. + + Mirrors dict.update() behavior: + - If `other` is a mapping, uses its keys. + - If `other` is iterable of pairs, updates from those. + - Then applies any keyword arguments. + + Examples: + proxy.update({'FEATURE_A': True}) + -> other = {'FEATURE_A': True} + + proxy.update([('FEATURE_A', True)]) + -> other = [('FEATURE_A', True)] + + proxy.update(FEATURE_B=False) + -> kwds = {'FEATURE_B': False} + + proxy.update({'FEATURE_A': True}, FEATURE_B=False) + -> other={'FEATURE_A': True}; kwds = {'FEATURE_B': False} + """ + if isinstance(other, Mapping): + # Handles objects that formally conform to the Mapping interface + # Mapping-like types: defaultdict, OrderedDict, Counter + for key in other: + self[key] = other[key] + elif hasattr(other, "keys"): + # Fallback for objects that implement a .keys() method but + # may not formally subclass Mapping + for key in other.keys(): + self[key] = other[key] + else: + for key, value in other: + self[key] = value + for key, value in kwds.items(): + self[key] = value + + def copy(self): + """ + Return a shallow copy of the underlying namespace wrapped in a new FeaturesProxy. + """ + return FeaturesProxy(self.ns.copy()) diff --git a/openedx/envs/common.py b/openedx/envs/common.py index c888ec8fd7..f6a9a8647a 100644 --- a/openedx/envs/common.py +++ b/openedx/envs/common.py @@ -884,3 +884,5 @@ API_DOCUMENTATION_URL = 'https://course-catalog-api-guide.readthedocs.io/en/late AUTH_DOCUMENTATION_URL = 'https://course-catalog-api-guide.readthedocs.io/en/latest/authentication/index.html' CSRF_TRUSTED_ORIGINS = [] + +ENTRANCE_EXAM_MIN_SCORE_PCT = 50 diff --git a/openedx/features/announcements/settings/common.py b/openedx/features/announcements/settings/common.py index 1a1a5ca497..4de3740d2d 100644 --- a/openedx/features/announcements/settings/common.py +++ b/openedx/features/announcements/settings/common.py @@ -16,6 +16,6 @@ def plugin_settings(settings): .. toggle_creation_date: 2017-11-08 .. toggle_tickets: https://github.com/openedx/edx-platform/pull/16496 """ - settings.FEATURES['ENABLE_ANNOUNCEMENTS'] = False + settings.ENABLE_ANNOUNCEMENTS = False # Configure number of announcements to show per page - settings.FEATURES['ANNOUNCEMENTS_PER_PAGE'] = 5 + settings.ANNOUNCEMENTS_PER_PAGE = 5 diff --git a/openedx/features/announcements/settings/test.py b/openedx/features/announcements/settings/test.py index 47d57ca3dc..8c8406d23f 100644 --- a/openedx/features/announcements/settings/test.py +++ b/openedx/features/announcements/settings/test.py @@ -5,4 +5,4 @@ def plugin_settings(settings): """ Test settings for Announcements """ - settings.FEATURES['ENABLE_ANNOUNCEMENTS'] = True + settings.ENABLE_ANNOUNCEMENTS = True From 9a31db098e8b758acad2bbec32959a6708f00be3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 10 Sep 2025 20:39:35 +0000 Subject: [PATCH 04/18] fix(deps): update dependency webpack-bundle-tracker to v3 --- package-lock.json | 45 +++++---------------------------------------- package.json | 2 +- 2 files changed, 6 insertions(+), 41 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6bc1261774..4e5be31004 100644 --- a/package-lock.json +++ b/package-lock.json @@ -72,7 +72,7 @@ "underscore": "1.13.7", "underscore.string": "3.3.6", "webpack": "^5.90.3", - "webpack-bundle-tracker": "0.4.3", + "webpack-bundle-tracker": "3.2.1", "webpack-merge": "4.2.2", "which-country": "1.0.0" }, @@ -7369,15 +7369,6 @@ "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", "license": "MIT" }, - "node_modules/deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "license": "MIT", - "engines": { - "node": ">=4.0.0" - } - }, "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", @@ -20494,36 +20485,10 @@ } }, "node_modules/webpack-bundle-tracker": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/webpack-bundle-tracker/-/webpack-bundle-tracker-0.4.3.tgz", - "integrity": "sha512-Sl/+OsNhFAH3/c6XADupRu8jLvGojfXX0pZIIm3O5ZcJqkHHqlY4nLG+NVRcbDgM/jOeWimKDGQMVEa8FBeJ2g==", - "license": "MIT", - "dependencies": { - "deep-extend": "^0.6.0", - "mkdirp": "^0.5.1", - "strip-ansi": "^5.2.0" - } - }, - "node_modules/webpack-bundle-tracker/node_modules/ansi-regex": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", - "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/webpack-bundle-tracker/node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^4.1.0" - }, - "engines": { - "node": ">=6" - } + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/webpack-bundle-tracker/-/webpack-bundle-tracker-3.2.1.tgz", + "integrity": "sha512-N1bi1Kok4kexXUvez2Jwrq2SpA4xm6JZfqK9L5hXNbe3E5pR4oS7UYgOq1ALapP89oRjHXc3fzblqDqo+zag2A==", + "license": "MIT" }, "node_modules/webpack-cli": { "version": "5.1.4", diff --git a/package.json b/package.json index b9eb483e9c..5d7736cc34 100644 --- a/package.json +++ b/package.json @@ -97,7 +97,7 @@ "underscore": "1.13.7", "underscore.string": "3.3.6", "webpack": "^5.90.3", - "webpack-bundle-tracker": "0.4.3", + "webpack-bundle-tracker": "3.2.1", "webpack-merge": "4.2.2", "which-country": "1.0.0" }, From 438397d7b26fe097ab5c0f25fc4e8982cb907df5 Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Fri, 12 Sep 2025 11:25:21 -0400 Subject: [PATCH 05/18] fix: Upgrade django-webpack-loader to match webpack-bundle-tracker The versions of these two tools is now kept in sync. As a part of the migration, the method signature for render_bundle changes which we needed to update in our Mako templates where it doesn't automatically pass context. --- .../djangoapps/pipeline_mako/templates/static_content.html | 6 +++--- requirements/constraints.txt | 5 ----- requirements/edx/base.txt | 3 +-- requirements/edx/development.txt | 3 +-- requirements/edx/doc.txt | 3 +-- requirements/edx/testing.txt | 3 +-- 6 files changed, 7 insertions(+), 16 deletions(-) diff --git a/common/djangoapps/pipeline_mako/templates/static_content.html b/common/djangoapps/pipeline_mako/templates/static_content.html index a5a2a575b0..fc80c77e9e 100644 --- a/common/djangoapps/pipeline_mako/templates/static_content.html +++ b/common/djangoapps/pipeline_mako/templates/static_content.html @@ -147,7 +147,7 @@ if not source: <% body = capture(caller.body) %> - ${HTML(render_bundle(entry, extension=None, config='DEFAULT', attrs=attrs))} + ${HTML(render_bundle(context, entry, extension=None, config='DEFAULT', attrs=attrs))} % if body: