diff --git a/edx_exams/apps/core/email.py b/edx_exams/apps/core/email.py index 478190f2..2901e549 100644 --- a/edx_exams/apps/core/email.py +++ b/edx_exams/apps/core/email.py @@ -26,10 +26,13 @@ def send_attempt_status_email(attempt, escalation_email=None): if attempt.status == ExamAttemptStatus.submitted: email_template = 'email/proctoring_attempt_submitted.html' + email_subject = 'Proctoring attempt submitted' elif attempt.status == ExamAttemptStatus.verified: email_template = 'email/proctoring_attempt_verified.html' + email_subject = 'Proctoring attempt verified' elif attempt.status == ExamAttemptStatus.rejected: email_template = 'email/proctoring_attempt_rejected.html' + email_subject = 'Proctoring attempt rejected' else: return # do not send emails for other statuses @@ -44,12 +47,12 @@ def send_attempt_status_email(attempt, escalation_email=None): contact_url = f'{settings.LMS_ROOT_URL}/support/contact_us' contact_url_text = contact_url - email_subject = f'Proctored exam {exam.exam_name} for user {attempt.user.username}' body = email_template.render({ 'exam_name': exam.exam_name, 'course_url': course_url, 'contact_url': contact_url, 'contact_url_text': contact_url_text, + 'full_name': attempt.user.full_name, }) email = EmailMessage( diff --git a/edx_exams/apps/core/templates/email/proctoring_attempt_rejected.html b/edx_exams/apps/core/templates/email/proctoring_attempt_rejected.html index 1765c310..b9da8696 100644 --- a/edx_exams/apps/core/templates/email/proctoring_attempt_rejected.html +++ b/edx_exams/apps/core/templates/email/proctoring_attempt_rejected.html @@ -3,7 +3,7 @@
{% block introduction %} {% blocktrans %} - Hello {{ username }}, + Hello {{ full_name }}, {% endblocktrans %} {% endblock %}
diff --git a/edx_exams/apps/core/templates/email/proctoring_attempt_submitted.html b/edx_exams/apps/core/templates/email/proctoring_attempt_submitted.html index c635a2bd..5b436f0f 100644 --- a/edx_exams/apps/core/templates/email/proctoring_attempt_submitted.html +++ b/edx_exams/apps/core/templates/email/proctoring_attempt_submitted.html @@ -3,7 +3,7 @@{% block introduction %} {% blocktrans %} - Hello {{ username }}, + Hello {{ full_name }}, {% endblocktrans %} {% endblock %}
diff --git a/edx_exams/apps/core/templates/email/proctoring_attempt_verified.html b/edx_exams/apps/core/templates/email/proctoring_attempt_verified.html index a8b5fa4b..8d308e69 100644 --- a/edx_exams/apps/core/templates/email/proctoring_attempt_verified.html +++ b/edx_exams/apps/core/templates/email/proctoring_attempt_verified.html @@ -3,7 +3,7 @@{% block introduction %} {% blocktrans %} - Hello {{ username }}, + Hello {{ full_name }}, {% endblocktrans %} {% endblock %}