Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
3706949e
Commit
3706949e
authored
Jun 11, 2015
by
Muzaffar yousaf
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8432 from edx/muzaffar/bulk-emails
Remove course_title from bulk email.
parents
e99a56f3
0881cdf3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
11 deletions
+4
-11
lms/djangoapps/bulk_email/tasks.py
+2
-3
lms/djangoapps/bulk_email/tests/test_email.py
+2
-8
No files found.
lms/djangoapps/bulk_email/tasks.py
View file @
3706949e
...
...
@@ -159,7 +159,7 @@ def _get_course_email_context(course):
'course_url'
:
course_url
,
'course_image_url'
:
image_url
,
'course_end_date'
:
course_end_date
,
'account_settings_url'
:
'https://{}{}'
.
format
(
settings
.
SITE_NAME
,
reverse
(
'
dashboard
'
)),
'account_settings_url'
:
'https://{}{}'
.
format
(
settings
.
SITE_NAME
,
reverse
(
'
account_settings
'
)),
'platform_name'
:
settings
.
PLATFORM_NAME
,
}
return
email_context
...
...
@@ -475,7 +475,6 @@ def _send_course_email(entry_id, email_id, to_list, global_email_context, subtas
subtask_status
.
increment
(
skipped
=
num_optout
)
course_title
=
global_email_context
[
'course_title'
]
subject
=
"["
+
course_title
+
"] "
+
course_email
.
subject
# use the email from address in the CourseEmail, if it is present, otherwise compute it
from_addr
=
course_email
.
from_addr
if
course_email
.
from_addr
else
\
...
...
@@ -511,7 +510,7 @@ def _send_course_email(entry_id, email_id, to_list, global_email_context, subtas
# Create email:
email_msg
=
EmailMultiAlternatives
(
subject
,
course_email
.
subject
,
plaintext_msg
,
from_addr
,
[
email
],
...
...
lms/djangoapps/bulk_email/tests/test_email.py
View file @
3706949e
...
...
@@ -129,10 +129,7 @@ class TestEmailSendFromDashboardMockedHtmlToText(EmailSendFromDashboardTestCase)
self
.
assertEqual
(
len
(
mail
.
outbox
),
1
)
self
.
assertEqual
(
len
(
mail
.
outbox
[
0
]
.
to
),
1
)
self
.
assertEquals
(
mail
.
outbox
[
0
]
.
to
[
0
],
self
.
instructor
.
email
)
self
.
assertEquals
(
mail
.
outbox
[
0
]
.
subject
,
'['
+
self
.
course
.
display_name
+
']'
+
' test subject for myself'
)
self
.
assertEquals
(
mail
.
outbox
[
0
]
.
subject
,
'test subject for myself'
)
def
test_send_to_staff
(
self
):
"""
...
...
@@ -240,10 +237,7 @@ class TestEmailSendFromDashboardMockedHtmlToText(EmailSendFromDashboardTestCase)
[
e
.
to
[
0
]
for
e
in
mail
.
outbox
],
[
self
.
instructor
.
email
]
+
[
s
.
email
for
s
in
self
.
staff
]
+
[
s
.
email
for
s
in
self
.
students
]
)
self
.
assertEquals
(
mail
.
outbox
[
0
]
.
subject
,
'['
+
self
.
course
.
display_name
+
'] '
+
uni_subject
)
self
.
assertEquals
(
mail
.
outbox
[
0
]
.
subject
,
uni_subject
)
def
test_unicode_students_send_to_all
(
self
):
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment