Skip to content

Commit

Permalink
fix: remove username and change the subject in emails
Browse files Browse the repository at this point in the history
Description: Remove username and change the subject in emails
VAN-1865
  • Loading branch information
ahtesham-quraish committed Mar 12, 2024
1 parent f9bec2f commit 71a0ddf
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
10 changes: 3 additions & 7 deletions edx_proctoring/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1748,16 +1748,13 @@ def create_proctoring_attempt_status_email(user_id, exam_attempt_obj, course_nam
status = exam_attempt_obj.status
if status == ProctoredExamStudentAttemptStatus.submitted:
template_name = 'proctoring_attempt_submitted_email.html'
email_subject = (
_('Proctoring Review In Progress For {course_name} {exam_name}').format(
course_name=course_name,
exam_name=exam_attempt_obj.proctored_exam.exam_name
)
)
email_subject = 'Proctoring attempt submitted'
elif status == ProctoredExamStudentAttemptStatus.verified:
template_name = 'proctoring_attempt_satisfactory_email.html'
email_subject = 'Proctoring attempt verified'
elif status == ProctoredExamStudentAttemptStatus.rejected:
template_name = 'proctoring_attempt_unsatisfactory_email.html'
email_subject = 'Proctoring attempt rejected'
else:
# Don't send an email for any other attempt status codes
return None
Expand Down Expand Up @@ -1788,7 +1785,6 @@ def create_proctoring_attempt_status_email(user_id, exam_attempt_obj, course_nam
contact_url_text = contact_url

body = email_template.render({
'username': user.username,
'course_url': course_home_url,
'course_name': course_name,
'exam_name': exam_name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<p>
{% block introduction %}
{% blocktrans %}
Hello {{ username }},
Hello,
{% endblocktrans %}
{% endblock %}
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<p>
{% block introduction %}
{% blocktrans %}
Hello {{ username }},
Hello,
{% endblocktrans %}
{% endblock %}
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<p>
{% block introduction %}
{% blocktrans %}
Hello {{ username }},
Hello,
{% endblocktrans %}
{% endblock %}
</p>
Expand Down

0 comments on commit 71a0ddf

Please sign in to comment.