Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cms/envs/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def get_env_setting(setting):
# TODO: Once we have successfully upgraded to ES7, switch this back to ELASTIC_SEARCH_CONFIG.
ELASTIC_SEARCH_CONFIG = _YAML_TOKENS.get('ELASTIC_SEARCH_CONFIG_ES7', [{}])

XBLOCK_SETTINGS.setdefault("VideoBlock", {})["licensing_enabled"] = FEATURES["LICENSING"] # noqa: F405
XBLOCK_SETTINGS.setdefault("VideoBlock", {})["licensing_enabled"] = LICENSING # noqa: F405
XBLOCK_SETTINGS.setdefault("VideoBlock", {})['YOUTUBE_API_KEY'] = YOUTUBE_API_KEY # noqa: F405

############################ OAUTH2 Provider ###################################
Expand Down
2 changes: 1 addition & 1 deletion lms/envs/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ def get_env_setting(setting):
# TODO: Once we have successfully upgraded to ES7, switch this back to ELASTIC_SEARCH_CONFIG.
ELASTIC_SEARCH_CONFIG = _YAML_TOKENS.get('ELASTIC_SEARCH_CONFIG_ES7', [{}])

XBLOCK_SETTINGS.setdefault("VideoBlock", {})["licensing_enabled"] = FEATURES["LICENSING"] # noqa: F405
XBLOCK_SETTINGS.setdefault("VideoBlock", {})["licensing_enabled"] = LICENSING # noqa: F405
XBLOCK_SETTINGS.setdefault("VideoBlock", {})['YOUTUBE_API_KEY'] = YOUTUBE_API_KEY # noqa: F405

##### Custom Courses for EdX #####
Expand Down
11 changes: 11 additions & 0 deletions openedx/envs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -1213,6 +1213,17 @@ def add_optional_apps(optional_apps, installed_apps):
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/9744
ENABLE_SPECIAL_EXAMS = False

# .. toggle_name: ENABLE_EXAM_SETTINGS_HTML_VIEW
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Enable the "Exam Settings" view in Studio's course settings. When enabled,
# the corresponding legacy proctored/timed-exam fields on the course are marked deprecated in the
# advanced settings editor so they are edited via the dedicated view instead.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2020-07-09
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/24405
ENABLE_EXAM_SETTINGS_HTML_VIEW = False

# .. toggle_name: SHOW_HEADER_LANGUAGE_SELECTOR
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
Expand Down
23 changes: 7 additions & 16 deletions xmodule/course_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,11 @@
CATALOG_VISIBILITY_ABOUT = "about"
CATALOG_VISIBILITY_NONE = "none"

DEFAULT_COURSE_VISIBILITY_IN_CATALOG = getattr(
settings,
'DEFAULT_COURSE_VISIBILITY_IN_CATALOG',
'both'
)
DEFAULT_COURSE_VISIBILITY_IN_CATALOG = settings.DEFAULT_COURSE_VISIBILITY_IN_CATALOG

DEFAULT_MOBILE_AVAILABLE = getattr(settings, 'DEFAULT_MOBILE_AVAILABLE', False)
# Note: updating assets does not have settings defined, so using `getattr`.
EXAM_SETTINGS_HTML_VIEW_ENABLED = getattr(settings, 'FEATURES', {}).get('ENABLE_EXAM_SETTINGS_HTML_VIEW', False)
SPECIAL_EXAMS_ENABLED = getattr(settings, 'ENABLE_SPECIAL_EXAMS', False)
DEFAULT_MOBILE_AVAILABLE = settings.DEFAULT_MOBILE_AVAILABLE
EXAM_SETTINGS_HTML_VIEW_ENABLED = settings.ENABLE_EXAM_SETTINGS_HTML_VIEW
SPECIAL_EXAMS_ENABLED = settings.ENABLE_SPECIAL_EXAMS

COURSE_VISIBILITY_PRIVATE = 'private'
COURSE_VISIBILITY_PUBLIC_OUTLINE = 'public_outline'
Expand Down Expand Up @@ -236,7 +231,7 @@ def from_json(self, value, validate_providers=False):
and include any inherited values from the platform default.
"""
value = super().from_json(value)
if getattr(settings, 'ENABLE_PROCTORED_EXAMS', False):
if settings.ENABLE_PROCTORED_EXAMS:
# Only validate the provider value if ProctoredExams are enabled on the environment
# Otherwise, the passed in provider does not matter. We should always return default
if validate_providers:
Expand Down Expand Up @@ -275,7 +270,7 @@ def default(self):
"""
default = super().default

proctoring_backend_settings = getattr(settings, 'PROCTORING_BACKENDS', None)
proctoring_backend_settings = settings.PROCTORING_BACKENDS

if proctoring_backend_settings:
return proctoring_backend_settings.get('DEFAULT', None)
Expand All @@ -287,11 +282,7 @@ def get_available_providers() -> list[str]:
"""
Return list of available proctoring providers.
"""
proctoring_backend_settings = getattr(
settings,
'PROCTORING_BACKENDS',
{}
)
proctoring_backend_settings = settings.PROCTORING_BACKENDS

available_providers = [provider for provider in proctoring_backend_settings if provider != 'DEFAULT']
available_providers.append('lti_external')
Expand Down
Loading