diff --git a/cms/templates/widgets/header.html b/cms/templates/widgets/header.html index 36665df0ff..4594f113b1 100644 --- a/cms/templates/widgets/header.html +++ b/cms/templates/widgets/header.html @@ -236,9 +236,11 @@ ${_("Account Navigation")} - - ${_("Help")} - + % if settings.FEATURES.get('ENABLE_HELP_LINK'): + + ${_("Help")} + + % endif <%include file="user_dropdown.html" args="online_help_token=online_help_token" /> diff --git a/lms/envs/common.py b/lms/envs/common.py index fa90ab3dd5..b3de500e2f 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -263,6 +263,17 @@ FEATURES = { # .. toggle_tickets: https://github.com/edx/edx-platform/pull/1073 'COURSES_ARE_BROWSABLE': True, + # Can be turned off to disable the help link in the navbar + # .. toggle_name: FEATURES['ENABLE_HELP_LINK'] + # .. toggle_implementation: DjangoSetting + # .. toggle_default: True + # .. toggle_description: When True, a help link is displayed on the main navbar. Set False to hide it. + # .. toggle_use_cases: open_edx + # .. toggle_creation_date: 2021-03-05 + # .. toggle_tickets: https://github.com/edx/edx-platform/pull/26106 + 'ENABLE_HELP_LINK': True, + + # .. toggle_name: FEATURES['HIDE_DASHBOARD_COURSES_UNTIL_ACTIVATED'] # .. toggle_implementation: DjangoSetting # .. toggle_default: False diff --git a/lms/templates/header/navbar-authenticated.html b/lms/templates/header/navbar-authenticated.html index 24c7cfc219..4c52282441 100644 --- a/lms/templates/header/navbar-authenticated.html +++ b/lms/templates/header/navbar-authenticated.html @@ -14,6 +14,7 @@ from openedx.core.djangoapps.site_configuration import helpers as configuration_ show_explore_courses = settings.FEATURES.get('COURSES_ARE_BROWSABLE') show_sysadmin_dashboard = settings.FEATURES.get('ENABLE_SYSADMIN_DASHBOARD','') and user.is_staff self.real_user = getattr(user, 'real_user', user) + enable_help_link = settings.FEATURES.get('ENABLE_HELP_LINK') support_link = configuration_helpers.get_value('SUPPORT_SITE_LINK', settings.SUPPORT_SITE_LINK) doc_link = get_online_help_info(online_help_token)['doc_url'] @@ -60,9 +61,11 @@ from openedx.core.djangoapps.site_configuration import helpers as configuration_ % endif - - ${_("Help")} - + % if enable_help_link: + + ${_("Help")} + + % endif <%include file="user_dropdown.html"/> diff --git a/lms/templates/navigation/bootstrap/navbar-authenticated.html b/lms/templates/navigation/bootstrap/navbar-authenticated.html index 529f7984e2..d895f4d9a8 100644 --- a/lms/templates/navigation/bootstrap/navbar-authenticated.html +++ b/lms/templates/navigation/bootstrap/navbar-authenticated.html @@ -57,12 +57,14 @@ from django.utils.translation import ugettext as _ - - ${_("Help")} - + % if settings.FEATURES.get('ENABLE_HELP_LINK'): + + ${_("Help")} + + % endif <%include file="../../user_dropdown.html"/> diff --git a/lms/templates/navigation/navbar-authenticated.html b/lms/templates/navigation/navbar-authenticated.html index b27f17bd42..1873805ec9 100644 --- a/lms/templates/navigation/navbar-authenticated.html +++ b/lms/templates/navigation/navbar-authenticated.html @@ -41,7 +41,9 @@ from django.utils.translation import ugettext as _ <%include file="../user_dropdown.html"/> -${_("Help")} +% if settings.FEATURES.get('ENABLE_HELP_LINK'): + ${_("Help")} +% endif diff --git a/themes/edx.org/lms/templates/header/navbar-authenticated.html b/themes/edx.org/lms/templates/header/navbar-authenticated.html index 5d595aadb7..1e54026ca9 100644 --- a/themes/edx.org/lms/templates/header/navbar-authenticated.html +++ b/themes/edx.org/lms/templates/header/navbar-authenticated.html @@ -14,6 +14,7 @@ from openedx.core.djangoapps.site_configuration import helpers as configuration_ show_explore_courses = settings.FEATURES.get('COURSES_ARE_BROWSABLE') show_sysadmin_dashboard = settings.FEATURES.get('ENABLE_SYSADMIN_DASHBOARD','') and user.is_staff self.real_user = getattr(user, 'real_user', user) + enable_help_link = settings.FEATURES.get('ENABLE_HELP_LINK') %> @@ -58,13 +59,15 @@ from openedx.core.djangoapps.site_configuration import helpers as configuration_ - - % if online_help_token == "instructor": - ${_("Help")} - % else: - ${_("Help")} - % endif - + % if enable_help_link: + + % if online_help_token == "instructor": + ${_("Help")} + % else: + ${_("Help")} + % endif + + % endif <%include file="user_dropdown.html"/>