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
cf5d276a
Commit
cf5d276a
authored
Aug 24, 2015
by
Sven Marnach
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Emit events when users vote on forum posts.
parent
3f76da0b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
21 deletions
+3
-21
lms/djangoapps/discussion_api/api.py
+3
-21
lms/djangoapps/django_comment_client/base/views.py
+0
-0
No files found.
lms/djangoapps/discussion_api/api.py
View file @
cf5d276a
...
...
@@ -25,13 +25,7 @@ from discussion_api.permissions import (
get_initializable_thread_fields
,
)
from
discussion_api.serializers
import
CommentSerializer
,
ThreadSerializer
,
get_context
from
django_comment_client.base.views
import
(
THREAD_CREATED_EVENT_NAME
,
get_comment_created_event_data
,
get_comment_created_event_name
,
get_thread_created_event_data
,
track_forum_event
,
)
from
django_comment_client.base.views
import
track_comment_created_event
,
track_thread_created_event
from
django_comment_common.signals
import
(
thread_created
,
thread_edited
,
...
...
@@ -566,13 +560,7 @@ def create_thread(request, thread_data):
api_thread
=
serializer
.
data
_do_extra_actions
(
api_thread
,
cc_thread
,
thread_data
.
keys
(),
actions_form
,
context
)
track_forum_event
(
request
,
THREAD_CREATED_EVENT_NAME
,
course
,
cc_thread
,
get_thread_created_event_data
(
cc_thread
,
followed
=
actions_form
.
cleaned_data
[
"following"
])
)
track_thread_created_event
(
request
,
course
,
cc_thread
,
actions_form
.
cleaned_data
[
"following"
])
return
api_thread
...
...
@@ -616,13 +604,7 @@ def create_comment(request, comment_data):
api_comment
=
serializer
.
data
_do_extra_actions
(
api_comment
,
cc_comment
,
comment_data
.
keys
(),
actions_form
,
context
)
track_forum_event
(
request
,
get_comment_created_event_name
(
cc_comment
),
context
[
"course"
],
cc_comment
,
get_comment_created_event_data
(
cc_comment
,
cc_thread
[
"commentable_id"
],
followed
=
False
)
)
track_comment_created_event
(
request
,
context
[
"course"
],
cc_comment
,
cc_thread
[
"commentable_id"
],
followed
=
False
)
return
api_comment
...
...
lms/djangoapps/django_comment_client/base/views.py
View file @
cf5d276a
This diff is collapsed.
Click to expand it.
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