Skip to content
Merged
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
4 changes: 2 additions & 2 deletions cms/djangoapps/contentstore/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,8 +455,8 @@ def sync_discussion_settings(course_key, user):

if (
ENABLE_NEW_STRUCTURE_DISCUSSIONS.is_enabled()
and not course.discussions_settings['provider_type'] == Provider.OPEN_EDX
and not course.discussions_settings['provider'] == Provider.OPEN_EDX
and not course.discussions_settings.get('provider_type', None) == Provider.OPEN_EDX
and not course.discussions_settings.get('provider', None) == Provider.OPEN_EDX
):
LOGGER.info(f"New structure is enabled, also updating {course_key} to use new provider")
course.discussions_settings['enable_graded_units'] = False
Expand Down
4 changes: 4 additions & 0 deletions openedx/core/djangoapps/discussions/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,10 @@ def update_unit_discussion_state_from_discussion_blocks(course_key: CourseKey, u
"""
store = modulestore()
course = store.get_course(course_key)
# The provider information has been written to both `provider_type` and `provider`.
# Both of these serve the same purpose and this is an accident of early development.
# The `provider_type` key is now treated as read-only to allow existing values
# to be respected while moving to the `provider` key in the future.
provider = course.discussions_settings.get(
'provider_type',
course.discussions_settings.get('provider', None),
Expand Down
Loading