From 5a4cbc56ae29c09e43432a7503f7d8bc6bbfc011 Mon Sep 17 00:00:00 2001 From: Awais Ansari <79941147+awais-ansari@users.noreply.github.com> Date: Tue, 15 Feb 2022 17:28:03 +0500 Subject: [PATCH] feat: link discussions feedback URL with feedback button (#29919) * feat: link discussions feedback URL with feedback button --- cms/envs/common.py | 1 + cms/envs/devstack.py | 3 +++ cms/envs/production.py | 3 +++ lms/envs/common.py | 6 ++++-- lms/envs/devstack.py | 3 +++ lms/envs/production.py | 3 +++ lms/templates/discussion/_switch_experience_fragment.html | 2 +- 7 files changed, 18 insertions(+), 3 deletions(-) diff --git a/cms/envs/common.py b/cms/envs/common.py index 3ce7783438..efdec46117 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -495,6 +495,7 @@ IDA_LOGOUT_URI_LIST = [] ############################# MICROFRONTENDS ################################### COURSE_AUTHORING_MICROFRONTEND_URL = None DISCUSSIONS_MICROFRONTEND_URL = None +DISCUSSIONS_MFE_FEEDBACK_URL = None LIBRARY_AUTHORING_MICROFRONTEND_URL = None # .. toggle_name: ENABLE_AUTHN_RESET_PASSWORD_HIBP_POLICY # .. toggle_implementation: DjangoSetting diff --git a/cms/envs/devstack.py b/cms/envs/devstack.py index 469bc20454..6b632ddaf1 100644 --- a/cms/envs/devstack.py +++ b/cms/envs/devstack.py @@ -165,6 +165,9 @@ COURSE_AUTHORING_MICROFRONTEND_URL = 'http://localhost:2001' ################### FRONTEND APPLICATION DISCUSSIONS ################### DISCUSSIONS_MICROFRONTEND_URL = 'http://localhost:2002' +################### FRONTEND APPLICATION DISCUSSIONS FEEDBACK URL################### +DISCUSSIONS_MFE_FEEDBACK_URL = None + ################################# DJANGO-REQUIRE ############################### # Whether to run django-require in debug mode. diff --git a/cms/envs/production.py b/cms/envs/production.py index b100bbf3bd..28895ba74f 100644 --- a/cms/envs/production.py +++ b/cms/envs/production.py @@ -626,3 +626,6 @@ LANGUAGE_COOKIE_NAME = ENV_TOKENS.get('LANGUAGE_COOKIE', None) or ENV_TOKENS.get ################# Discussions micro frontend URL ######################## DISCUSSIONS_MICROFRONTEND_URL = ENV_TOKENS.get('DISCUSSIONS_MICROFRONTEND_URL', DISCUSSIONS_MICROFRONTEND_URL) + +################### Discussions micro frontend Feedback URL################### +DISCUSSIONS_MFE_FEEDBACK_URL = ENV_TOKENS.get('DISCUSSIONS_MFE_FEEDBACK_URL', DISCUSSIONS_MFE_FEEDBACK_URL) diff --git a/lms/envs/common.py b/lms/envs/common.py index 91636cb629..8bac719afb 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -4771,6 +4771,10 @@ ORA_GRADING_MICROFRONTEND_URL = None # .. setting_description: Base URL of the micro-frontend-based discussions page. # .. setting_warning: Also set site's courseware.discussions_mfe waffle flag. DISCUSSIONS_MICROFRONTEND_URL = None +# .. setting_name: DISCUSSIONS_MFE_FEEDBACK_URL = None +# .. setting_default: None +# .. setting_description: Base URL of the discussions micro-frontend google form based feedback. +DISCUSSIONS_MFE_FEEDBACK_URL = None # .. toggle_name: ENABLE_AUTHN_RESET_PASSWORD_HIBP_POLICY # .. toggle_implementation: DjangoSetting # .. toggle_default: False @@ -4944,5 +4948,3 @@ CUSTOM_PAGES_HELP_URL = "https://edx.readthedocs.io/projects/open-edx-building-a # The expected value is an Integer representing the cutoff point (in months) for inclusion to the message. Example: # a value of `3` would include learners who have logged in within the past 3 months. BULK_COURSE_EMAIL_LAST_LOGIN_ELIGIBILITY_PERIOD = None - -DISCUSSIONS_MFE_FEEDBACK_URL = None diff --git a/lms/envs/devstack.py b/lms/envs/devstack.py index be26f49719..933bda8e37 100644 --- a/lms/envs/devstack.py +++ b/lms/envs/devstack.py @@ -342,6 +342,9 @@ AUTHN_MICROFRONTEND_DOMAIN = 'localhost:1999' ################### FRONTEND APPLICATION DISCUSSIONS ################### DISCUSSIONS_MICROFRONTEND_URL = 'http://localhost:2002' +################### FRONTEND APPLICATION DISCUSSIONS FEEDBACK URL################### +DISCUSSIONS_MFE_FEEDBACK_URL = None + ############## Docker based devstack settings ####################### FEATURES.update({ diff --git a/lms/envs/production.py b/lms/envs/production.py index c0c218af37..1e54dca63a 100644 --- a/lms/envs/production.py +++ b/lms/envs/production.py @@ -1061,3 +1061,6 @@ SHOW_ACCOUNT_ACTIVATION_CTA = ENV_TOKENS.get('SHOW_ACCOUNT_ACTIVATION_CTA', SHOW ################# Discussions micro frontend URL ######################## DISCUSSIONS_MICROFRONTEND_URL = ENV_TOKENS.get('DISCUSSIONS_MICROFRONTEND_URL', DISCUSSIONS_MICROFRONTEND_URL) + +################### Discussions micro frontend Feedback URL################### +DISCUSSIONS_MFE_FEEDBACK_URL = ENV_TOKENS.get('DISCUSSIONS_MFE_FEEDBACK_URL', DISCUSSIONS_MFE_FEEDBACK_URL) diff --git a/lms/templates/discussion/_switch_experience_fragment.html b/lms/templates/discussion/_switch_experience_fragment.html index ec68007985..2e1cbb531e 100644 --- a/lms/templates/discussion/_switch_experience_fragment.html +++ b/lms/templates/discussion/_switch_experience_fragment.html @@ -17,7 +17,7 @@ from django.utils.translation import ugettext as _ ${_("View legacy experience")} % if share_feedback_url: - + ${_("Share feedback")} % endif