Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
91c1049b
Commit
91c1049b
authored
Sep 06, 2016
by
Awais Jibran
Committed by
GitHub
Sep 06, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #13390 from edx/aj/improve-registration-activation-logging
Aj/improve registration activation logging
parents
0bc4f4e0
98f01ebc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
common/djangoapps/student/models.py
+1
-0
common/djangoapps/student/views.py
+5
-6
No files found.
common/djangoapps/student/models.py
View file @
91c1049b
...
...
@@ -545,6 +545,7 @@ class Registration(models.Model):
self
.
user
.
is_active
=
True
self
.
_track_activation
()
self
.
user
.
save
()
log
.
info
(
u'User
%
s (
%
s) account is successfully activated.'
,
self
.
user
.
username
,
self
.
user
.
email
)
def
_track_activation
(
self
):
""" Update the isActive flag in mailchimp for activated users."""
...
...
common/djangoapps/student/views.py
View file @
91c1049b
...
...
@@ -2282,16 +2282,15 @@ def reactivation_email_for_user(user):
subject
=
render_to_string
(
'emails/activation_email_subject.txt'
,
context
)
subject
=
''
.
join
(
subject
.
splitlines
())
message
=
render_to_string
(
'emails/activation_email.txt'
,
context
)
from_address
=
configuration_helpers
.
get_value
(
'email_from_address'
,
settings
.
DEFAULT_FROM_EMAIL
)
try
:
user
.
email_user
(
subject
,
message
,
configuration_helpers
.
get_value
(
'email_from_address'
,
settings
.
DEFAULT_FROM_EMAIL
,
))
user
.
email_user
(
subject
,
message
,
from_address
)
except
Exception
:
# pylint: disable=broad-except
log
.
error
(
u'Unable to send reactivation email from "
%
s"'
,
configuration_helpers
.
get_value
(
'email_from_address'
,
settings
.
DEFAULT_FROM_EMAIL
),
u'Unable to send reactivation email from "
%
s" to "
%
s"'
,
from_address
,
user
.
email
,
exc_info
=
True
)
return
JsonResponse
({
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment