Commit b185a686 by muzaffaryousaf

Removing course_title from email subject.

TNL-1877
parent 9a55497e
...@@ -475,7 +475,6 @@ def _send_course_email(entry_id, email_id, to_list, global_email_context, subtas ...@@ -475,7 +475,6 @@ def _send_course_email(entry_id, email_id, to_list, global_email_context, subtas
subtask_status.increment(skipped=num_optout) subtask_status.increment(skipped=num_optout)
course_title = global_email_context['course_title'] 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 # 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 \ 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 ...@@ -511,7 +510,7 @@ def _send_course_email(entry_id, email_id, to_list, global_email_context, subtas
# Create email: # Create email:
email_msg = EmailMultiAlternatives( email_msg = EmailMultiAlternatives(
subject, course_email.subject,
plaintext_msg, plaintext_msg,
from_addr, from_addr,
[email], [email],
......
...@@ -129,10 +129,7 @@ class TestEmailSendFromDashboardMockedHtmlToText(EmailSendFromDashboardTestCase) ...@@ -129,10 +129,7 @@ class TestEmailSendFromDashboardMockedHtmlToText(EmailSendFromDashboardTestCase)
self.assertEqual(len(mail.outbox), 1) self.assertEqual(len(mail.outbox), 1)
self.assertEqual(len(mail.outbox[0].to), 1) self.assertEqual(len(mail.outbox[0].to), 1)
self.assertEquals(mail.outbox[0].to[0], self.instructor.email) self.assertEquals(mail.outbox[0].to[0], self.instructor.email)
self.assertEquals( self.assertEquals(mail.outbox[0].subject, 'test subject for myself')
mail.outbox[0].subject,
'[' + self.course.display_name + ']' + ' test subject for myself'
)
def test_send_to_staff(self): def test_send_to_staff(self):
""" """
...@@ -240,10 +237,7 @@ class TestEmailSendFromDashboardMockedHtmlToText(EmailSendFromDashboardTestCase) ...@@ -240,10 +237,7 @@ class TestEmailSendFromDashboardMockedHtmlToText(EmailSendFromDashboardTestCase)
[e.to[0] for e in mail.outbox], [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.instructor.email] + [s.email for s in self.staff] + [s.email for s in self.students]
) )
self.assertEquals( self.assertEquals(mail.outbox[0].subject, uni_subject)
mail.outbox[0].subject,
'[' + self.course.display_name + '] ' + uni_subject
)
def test_unicode_students_send_to_all(self): def test_unicode_students_send_to_all(self):
""" """
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment