-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Ability to configure edx-ace with course emails #29900
Conversation
f8a3260
to
2540dc5
Compare
fix: fix typo fix: Fixed broken unit tests and added new unit tests fix: Fixed quality violations fix: Fixed quality violations related to translations
2540dc5
to
b7ad137
Compare
Hi @ziafazal, At first glance these changes look look good. However, I am confused on one point about the implementation. How do we send an email through ACE and keep our custom email templates? I pulled the branch as I wanted to try this out myself and found that when I set My assumption here would be that this setting would control the mechanism that sends the email, not the template used. I find that to be confusing. Am I missing any additional configuration to have my message send through ACE and use the customized templates? |
self.connection.send_messages([self.message]) | ||
|
||
|
||
class ACEEmail(CourseEmailMessage): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm no expert on the use of edx-ace
, but I am used to seeing ACE messages inheriting from a common base message class named BaseMessageType
. Example:
class VerificationApproved(BaseMessageType): |
It's not apparent to me why we used a different (abstract) base class. Why is that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it to have a common send()
function between the DjangoEmail and ACE implementations?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes to achieve polymorphism or have single method to send both types of emails.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BaseMessageType
is limited to defining message types of edx-ace emails whereas CourseEmailMessage
is base class for two types of course emails we have
- Emails using Custom templates
- Emails using edx-ace templates
@justinhynes Thanks for reviewing it. when we set when we set
|
Hi @ziafazal, The ACE template that is being used would be an unbranded, Open edX template, no? Is there a way to override that template and use a branded one? My understanding is that setting I would think that the |
Hi @justinhynes No. edx-ace templates would be branded see course email template is inheriting from When we send emails via edx-ace we have to define our email templates in relevant app directory. Now if we want to customize those templates we can either change those html and txt files inside that directory( |
@justinhynes do you need anything else from me to review this PR? |
@ziafazal Sorry, this fell off my list of things last week. Sorry, I have a couple of additional questions.
Thanks. |
|
@ziafazal Thanks for all the answers to my questions. You've alleviated most of my concerns.
This is true now, but in the past we've supported multiple templates, maybe this isn't as much of a concern now that the multi-tenancy/whitelabel features are gone. Thanks for your patience. |
EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production. |
EdX Release Notice: This PR has been deployed to the production environment. |
Bulk course emails used to contain many references to edX. This is resolved here by switching to edx-ace for sending emails. See: openedx/wg-build-test-release#100 https://edx.readthedocs.io/projects/edx-platform-technical/en/latest/featuretoggles.html#featuretoggle-BULK_EMAIL_SEND_USING_EDX_ACE openedx/edx-platform#29900
Bulk course emails used to contain many references to edX. This is resolved here by switching to edx-ace for sending emails. See: openedx/wg-build-test-release#100 https://edx.readthedocs.io/projects/edx-platform-technical/en/latest/featuretoggles.html#featuretoggle-BULK_EMAIL_SEND_USING_EDX_ACE openedx/edx-platform#29900
Bulk course emails used to contain many references to edX. This is resolved here by switching to edx-ace for sending emails. See: openedx/wg-build-test-release#100 https://edx.readthedocs.io/projects/edx-platform-technical/en/latest/featuretoggles.html#featuretoggle-BULK_EMAIL_SEND_USING_EDX_ACE openedx/edx-platform#29900
This PR has changes to configure edx-ace with course emails.
Steps to test
BULK_EMAIL_SEND_USING_EDX_ACE
setting to True for LMSlms/templates/bulk_email/edx_ace/bulkemail/email
Fixes openedx/wg-build-test-release#100