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
0d192ca3
Commit
0d192ca3
authored
Aug 28, 2012
by
Rocky Duan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prototype
parent
8d9e098d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
lms/djangoapps/django_comment_client/callback/views.py
+3
-6
No files found.
lms/djangoapps/django_comment_client/callback/views.py
View file @
0d192ca3
...
...
@@ -48,7 +48,7 @@ def process_replies(replies):
def
process_topics
(
topics
):
def
process
(
notification
):
thread_id
=
notification
[
'info'
][
'thread_id'
]
course_id
=
notification
[
'
info'
][
'
course_id'
]
course_id
=
notification
[
'course_id'
]
commentable_id
=
notification
[
'info'
][
'commentable_id'
]
return
{
'post_topic'
:
True
,
...
...
@@ -64,7 +64,7 @@ def process_topics(topics):
def
process_at_users
(
at_users
):
def
process
(
notification
):
thread_id
=
notification
[
'info'
][
'thread_id'
]
course_id
=
notification
[
'
info'
][
'
course_id'
]
course_id
=
notification
[
'course_id'
]
commentable_id
=
notification
[
'info'
][
'commentable_id'
]
content_type
=
notification
[
'info'
][
'content_type'
]
data
=
{
...
...
@@ -107,8 +107,6 @@ def notifications_callback(request):
since_time
=
notifications
[
0
][
'happened_at'
]
.
strftime
(
"
%
H:
%
M
%
p"
)
import
pdb
;
pdb
.
set_trace
()
for
user_id
in
user_ids
:
try
:
user
=
User
.
objects
.
get
(
id
=
user_id
)
...
...
@@ -119,8 +117,7 @@ def notifications_callback(request):
'since_time'
:
since_time
,
}
# composes notifications email
message
=
utils
.
render_mustache
(
'discussion/emails/notifications_email.txt.mustache'
,
context
)
print
message
message
=
utils
.
render_mustache
(
'discussion/emails/notifications_email.html.mustache'
,
context
)
subject
=
utils
.
render_mustache
(
'discussion/emails/notifications_email_subject.txt.mustache'
,
context
)
# Email subject *must not* contain newlines
subject
=
''
.
join
(
subject
.
splitlines
())
...
...
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