From ac9ac77458419d6a555b181ecbb25f8121e9d182 Mon Sep 17 00:00:00 2001
From: Taras Lytvynenko <69678257+Inferato@users.noreply.github.com>
Date: Thu, 9 Nov 2023 10:28:40 +0200
Subject: [PATCH] fix: [RGOeX-26199] Course mode is used to show the correct
bulk email options
---
src/components/bulk-email-tool/BulkEmailTool.jsx | 2 +-
.../bulk-email-form/BulkEmailForm.jsx | 3 ++-
.../bulk-email-recipient/BulkEmailRecipient.jsx | 14 +-------------
src/components/page-container/PageContainer.jsx | 3 ++-
4 files changed, 6 insertions(+), 16 deletions(-)
diff --git a/src/components/bulk-email-tool/BulkEmailTool.jsx b/src/components/bulk-email-tool/BulkEmailTool.jsx
index 8db13776..aa5729a9 100644
--- a/src/components/bulk-email-tool/BulkEmailTool.jsx
+++ b/src/components/bulk-email-tool/BulkEmailTool.jsx
@@ -33,7 +33,7 @@ export default function BulkEmailTool() {
-
+
diff --git a/src/components/bulk-email-tool/bulk-email-form/BulkEmailForm.jsx b/src/components/bulk-email-tool/bulk-email-form/BulkEmailForm.jsx
index f0bdc316..58bfea01 100644
--- a/src/components/bulk-email-tool/bulk-email-form/BulkEmailForm.jsx
+++ b/src/components/bulk-email-tool/bulk-email-form/BulkEmailForm.jsx
@@ -47,7 +47,7 @@ const FORM_ACTIONS = {
};
function BulkEmailForm(props) {
- const { courseId, cohorts, intl } = props;
+ const { courseId, cohorts, courseModes, intl } = props;
const [{ editor }, dispatch] = useContext(BulkEmailContext);
const [emailFormStatus, setEmailFormStatus] = useState(FORM_SUBMIT_STATES.DEFAULT);
const [emailFormValidation, setEmailFormValidation] = useState({
@@ -272,6 +272,7 @@ function BulkEmailForm(props) {
handleCheckboxes={onRecipientChange}
additionalCohorts={cohorts}
isValid={emailFormValidation.recipients}
+ courseModes={courseModes}
/>
{intl.formatMessage(messages.bulkEmailSubjectLabel)}
diff --git a/src/components/bulk-email-tool/bulk-email-form/bulk-email-recipient/BulkEmailRecipient.jsx b/src/components/bulk-email-tool/bulk-email-form/bulk-email-recipient/BulkEmailRecipient.jsx
index dc75a34e..26729fd5 100644
--- a/src/components/bulk-email-tool/bulk-email-form/bulk-email-recipient/BulkEmailRecipient.jsx
+++ b/src/components/bulk-email-tool/bulk-email-form/bulk-email-recipient/BulkEmailRecipient.jsx
@@ -14,7 +14,7 @@ const DEFAULT_GROUPS = {
};
export default function BulkEmailRecipient(props) {
- const { handleCheckboxes, selectedGroups, additionalCohorts } = props;
+ const { handleCheckboxes, selectedGroups, additionalCohorts, courseModes } = props;
return (
@@ -86,18 +86,6 @@ export default function BulkEmailRecipient(props) {
))
}
- group === DEFAULT_GROUPS.ALL_LEARNERS)}
- className="col col-lg-4 col-sm-6 col-12"
- >
-
-
name),
});