Skip to content

Commit

Permalink
feat: vertical discussion sidedbar disable by default
Browse files Browse the repository at this point in the history
  • Loading branch information
kaustavb12 committed Aug 31, 2024
1 parent a7da071 commit 2eecaed
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions cms/envs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,14 @@
# .. toggle_creation_date: 2024-04-10
'BADGES_ENABLED': False,

# .. toggle_name: FEATURES['UNIT_DISCUSSION_SIDEBAR_ENABLED_BY_DEFAULT']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: True
# .. toggle_description: Set to False to not enable discussion sidebar by default for new units.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2024-08-31
'UNIT_DISCUSSION_SIDEBAR_ENABLED_BY_DEFAULT': True,

# .. toggle_name: FEATURES['ENABLE_LEGACY_MD5_HASH_FOR_ANONYMOUS_USER_ID']
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
Expand Down
3 changes: 2 additions & 1 deletion xmodule/vertical_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from functools import reduce

import pytz
from django.conf import settings
from lxml import etree
from openedx_filters.learning.filters import VerticalBlockChildRenderStarted, VerticalBlockRenderCompleted
from web_fragments.fragment import Fragment
Expand Down Expand Up @@ -43,7 +44,7 @@ class VerticalFields:
discussion_enabled = Boolean(
display_name=_("Enable in-context discussions for the Unit"),
help=_("Add discussion for the Unit."),
default=True,
default=settings.FEATURES.get('UNIT_DISCUSSION_SIDEBAR_ENABLED_BY_DEFAULT', True),
scope=Scope.settings,
)

Expand Down

0 comments on commit 2eecaed

Please sign in to comment.