Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: replace username with full name in attemp emails #250

Merged
merged 1 commit into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion edx_exams/apps/core/email.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -44,7 +47,6 @@ 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}'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why can we not leave the exam name in?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually we have discussed subject line with UX team and they suggested us that we can remove the exam name from subject but if you still think we should get it back we can then discuss with UX again. Thanks

body = email_template.render({
'exam_name': exam.exam_name,
'course_url': course_url,
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
Loading