Skip to content

Commit

Permalink
fix: unhide discussions when enabling it
Browse files Browse the repository at this point in the history
  • Loading branch information
viadanna committed Sep 9, 2024
1 parent f52c08a commit 9ea51d7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions openedx/core/djangoapps/discussions/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,12 @@ def _update_course_configuration(
key not in LegacySettingsSerializer.Meta.fields_cohorts
)
}
# toogle discussion tab is_hidden
for tab in course.tabs:
if tab.tab_id == 'discussion' and tab.is_hidden == instance.enabled:
tab.is_hidden = not instance.enabled
save = True
break
if save:
modulestore().update_item(course, self.context['user_id'])
return instance
Expand Down

0 comments on commit 9ea51d7

Please sign in to comment.