7
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-06-01 22:00:48 +00:00
tutor/tutor/templates/apps/openedx/settings/partials/common_lms.py
Régis Behmo 2d6b9c1767 feat: hide TOS link during registration
Registering a user was causing a 400 error because the LMS expected the
TOS checkbox to be checked, but it's not displayed in the frontend. So
we just disable it.

Close https://github.com/openedx/wg-build-test-release/issues/262
2023-06-14 19:40:58 +02:00

48 lines
1.4 KiB
Python

{% include "apps/openedx/settings/partials/common_all.py" %}
######## Common LMS settings
LOGIN_REDIRECT_WHITELIST = ["{{ CMS_HOST }}"]
# Better layout of honor code/tos links during registration
REGISTRATION_EXTRA_FIELDS["terms_of_service"] = "hidden"
REGISTRATION_EXTRA_FIELDS["honor_code"] = "hidden"
# Fix media files paths
PROFILE_IMAGE_BACKEND["options"]["location"] = os.path.join(
MEDIA_ROOT, "profile-images/"
)
COURSE_CATALOG_VISIBILITY_PERMISSION = "see_in_catalog"
COURSE_ABOUT_VISIBILITY_PERMISSION = "see_about_page"
# Allow insecure oauth2 for local interaction with local containers
OAUTH_ENFORCE_SECURE = False
# Email settings
DEFAULT_EMAIL_LOGO_URL = LMS_ROOT_URL + "/theming/asset/images/logo.png"
BULK_EMAIL_SEND_USING_EDX_ACE = True
FEATURES["ENABLE_FOOTER_MOBILE_APP_LINKS"] = False
# Branding
MOBILE_STORE_ACE_URLS = {}
SOCIAL_MEDIA_FOOTER_ACE_URLS = {}
# Make it possible to hide courses by default from the studio
SEARCH_SKIP_SHOW_IN_CATALOG_FILTERING = False
# Caching
CACHES["staticfiles"] = {
"KEY_PREFIX": "staticfiles_lms",
"BACKEND": "django.core.cache.backends.locmem.LocMemCache",
"LOCATION": "staticfiles_lms",
}
# Create folders if necessary
for folder in [DATA_DIR, LOG_DIR, MEDIA_ROOT, STATIC_ROOT_BASE, ORA2_FILEUPLOAD_ROOT]:
if not os.path.exists(folder):
os.makedirs(folder, exist_ok=True)
{{ patch("openedx-lms-common-settings") }}
######## End of common LMS settings