-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: send email after course reset completion (#34460)
* feat: send email after course reset completion * fix: lint test * fix: clean code * fix: correct expected email parts * fix: logs * fix: email assertion
- Loading branch information
Showing
8 changed files
with
145 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
""" | ||
ACE message types for support-related emails. | ||
""" | ||
|
||
from openedx.core.djangoapps.ace_common.message import BaseMessageType | ||
|
||
|
||
class WholeCourseReset(BaseMessageType): | ||
""" | ||
A message to the user when whole course reset was successful. | ||
""" | ||
|
||
APP_LABEL = 'support' | ||
Name = 'wholecoursereset' | ||
|
||
def __init__(self, *args, **kwargs): | ||
super().__init__(*args, **kwargs) | ||
self.options['transactional'] = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
lms/templates/support/edx_ace/wholecoursereset/email/body.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{% extends 'ace_common/edx_ace/common/base_body.html' %} | ||
|
||
{% load i18n %} | ||
{% load static %} | ||
{% block content %} | ||
<table width="100%" align="left" border="0" cellpadding="0" cellspacing="0" role="presentation"> | ||
<tr> | ||
<td> | ||
<h1> | ||
{% trans "The course {{ course_title }} has been reset !" as tmsg %}{{ tmsg | force_escape }} | ||
</h1> | ||
<p style="color: rgba(0,0,0,.75);"> | ||
{% filter force_escape %} | ||
{% blocktrans %}Hello {{ full_name }},{% endblocktrans %} | ||
{% endfilter %} | ||
</p> | ||
<p style="color: rgba(0,0,0,.75);"> | ||
{% filter force_escape %} | ||
{% blocktrans %}Your progress in course {{course_title}} has been reset on your behalf.{% endblocktrans %} | ||
{% endfilter %} | ||
|
||
{% filter force_escape %} | ||
{% blocktrans %}You will be able to re-attempt this course and earn a verified certificate upon successful completion.{% endblocktrans %} | ||
{% endfilter %} | ||
<br/> | ||
</p> | ||
|
||
<p> | ||
{% trans "Best," as tmsg %}{{ tmsg | force_escape }} | ||
<br/> | ||
{% filter force_escape %} | ||
{% blocktrans %}The {{ platform_name }} Team {% endblocktrans %} | ||
{% endfilter %} | ||
</p> | ||
|
||
</td> | ||
</tr> | ||
</table> | ||
{% endblock %} |
8 changes: 8 additions & 0 deletions
8
lms/templates/support/edx_ace/wholecoursereset/email/body.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{% load i18n %}{% autoescape off %} | ||
{% blocktrans %}Hello {{full_name}}, {% endblocktrans %} | ||
{% blocktrans %}Your progress in course {{course_title}} has been reset on your behalf.{% endblocktrans %} | ||
{% blocktrans %}You will be able to re-attempt this course and earn a verified certificate upon successful completion.{% endblocktrans %} | ||
|
||
{% trans "Best," %} | ||
{% blocktrans %}The {{ platform_name }} Team {% endblocktrans %} | ||
{% endautoescape %} |
1 change: 1 addition & 0 deletions
1
lms/templates/support/edx_ace/wholecoursereset/email/from_name.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{{ platform_name }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{% extends 'ace_common/edx_ace/common/base_head.html' %} |
4 changes: 4 additions & 0 deletions
4
lms/templates/support/edx_ace/wholecoursereset/email/subject.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{% load i18n %} | ||
{% autoescape off %} | ||
{% blocktrans trimmed %}The course {{ course_title }} has been reset !{% endblocktrans %} | ||
{% endautoescape %} |