diff --git a/lms/djangoapps/instructor/views/instructor_dashboard.py b/lms/djangoapps/instructor/views/instructor_dashboard.py index 994320d350..d10c4f80b6 100644 --- a/lms/djangoapps/instructor/views/instructor_dashboard.py +++ b/lms/djangoapps/instructor/views/instructor_dashboard.py @@ -702,6 +702,10 @@ def _section_send_email(course, access): 'list_email_content', kwargs={'course_id': str(course_key)} ), } + if settings.FEATURES.get("ENABLE_NEW_BULK_EMAIL_EXPERIENCE", False) is not False: + section_data[ + "communications_mfe_url" + ] = f"{settings.COMMUNICATIONS_MICROFRONTEND_URL}/courses/{str(course_key)}/bulk_email" return section_data diff --git a/lms/envs/common.py b/lms/envs/common.py index 8b969b746b..b9acb1094c 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -960,6 +960,18 @@ FEATURES = { # .. toggle_target_removal_date: None # .. toggle_tickets: 'https://openedx.atlassian.net/browse/MST-1348' 'ENABLE_INTEGRITY_SIGNATURE': False, + + # .. toggle_name: FEATURES['ENABLE_NEW_BULK_EMAIL_EXPERIENCE'] + # .. toggle_implementation: DjangoSetting + # .. toggle_default: False + # .. toggle_description: When true, replaces the bulk email tool found on the + # instructor dashboard with a link to the new communications MFE version instead. + # Stting the tool to false will leave the old bulk email tool experience in place. + # .. toggle_use_cases: opt_in + # .. toggle_creation_date: 2022-03-21 + # .. toggle_target_removal_date: None + # .. toggle_tickets: 'https://openedx.atlassian.net/browse/MICROBA-1758' + 'ENABLE_NEW_BULK_EMAIL_EXPERIENCE': False, } # Specifies extra XBlock fields that should available when requested via the Course Blocks API diff --git a/lms/envs/devstack.py b/lms/envs/devstack.py index 933bda8e37..f30bf716d2 100644 --- a/lms/envs/devstack.py +++ b/lms/envs/devstack.py @@ -336,6 +336,7 @@ EDXNOTES_CLIENT_NAME = 'edx_notes_api-backend-service' ############## Settings for Microfrontends ######################### LEARNING_MICROFRONTEND_URL = 'http://localhost:2000' ACCOUNT_MICROFRONTEND_URL = 'http://localhost:1997' +COMMUNICATIONS_MICROFRONTEND_URL = 'http://localhost:1984' AUTHN_MICROFRONTEND_URL = 'http://localhost:1999' AUTHN_MICROFRONTEND_DOMAIN = 'localhost:1999' diff --git a/lms/templates/instructor/instructor_dashboard_2/send_email.html b/lms/templates/instructor/instructor_dashboard_2/send_email.html index b19d1ef4ed..51a67443bb 100644 --- a/lms/templates/instructor/instructor_dashboard_2/send_email.html +++ b/lms/templates/instructor/instructor_dashboard_2/send_email.html @@ -4,8 +4,16 @@ from django.utils.translation import ugettext as _ from openedx.core.djangolib.markup import HTML %> +
+ + ${_("To use the email tool, visit the")} ${_("new experience")}. + +
+ %else: