Skip to content

Commit

Permalink
fix: unhide discussion tab when enabling it (#677)
Browse files Browse the repository at this point in the history
  • Loading branch information
viadanna committed Sep 4, 2024
1 parent 14777af commit 8c4abae
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 8c4abae

Please sign in to comment.