Skip to content

Commit

Permalink
fix: update activation email (#34136)
Browse files Browse the repository at this point in the history
update account activation email message copy in body

VAN-1800
  • Loading branch information
mubbsharanwar authored Feb 20, 2024
1 parent 79d692d commit 9fd5157
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions common/djangoapps/student/views/management.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,9 @@ def compose_activation_email(user, user_registration=None, route_enabled=False,
Construct all the required params for the activation email
through celery task
"""
registration_flow = True
if user_registration is None:
registration_flow = False
user_registration = Registration.objects.get(user=user)

message_context = generate_activation_email_context(user, user_registration)
Expand All @@ -187,6 +189,7 @@ def compose_activation_email(user, user_registration=None, route_enabled=False,
'routed_user': user.username,
'routed_user_email': user.email,
'routed_profile_name': profile_name,
'registration_flow': registration_flow,
})

if route_enabled:
Expand Down
1 change: 1 addition & 0 deletions openedx/core/djangoapps/user_authn/tests/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def test_ComposeEmail(self):
assert self.msg.context['routed_user'] == self.student.username
assert self.msg.context['routed_user_email'] == self.student.email
assert self.msg.context['routed_profile_name'] == ''
assert self.msg.context['registration_flow'] is True

@mock.patch('time.sleep', mock.Mock(return_value=None))
@mock.patch('openedx.core.djangoapps.user_authn.tasks.log')
Expand Down

0 comments on commit 9fd5157

Please sign in to comment.