-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
MA-1985 add analytics event to thread/comment vote #11450
Conversation
9631e1d
to
3076776
Compare
@jcdyer @nasthagiri kindly review |
@@ -515,6 +516,7 @@ def _do_extra_actions(api_content, cc_content, request_fields, actions_form, con | |||
else: | |||
context["cc_requester"].unvote(cc_content) | |||
api_content["vote_count"] -= 1 | |||
track_voted_event(request, context["course"], cc_content, "up", False if form_value else True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lots of opaque args. Use kwargs instead. request
and context
are self-documenting, but "up"
and the boolean are particularly hard to understand, and cc_content
only slightly easier.
(pass complete) |
b0d66e6
to
88b3f2d
Compare
@jcdyer updated |
@muzaffaryousaf @symbolist @muhammad-ammar need one more reviewer on this |
@@ -9,6 +9,7 @@ | |||
from django.core.urlresolvers import reverse | |||
from django.http import Http404 | |||
import itertools | |||
from lms.djangoapps.django_comment_client.base.views import track_voted_event |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are imports for the track functions on line 29. Can you merge this with those?
@wajeeha-khalid We should add tests to verify that the correct event data is emitted. I see some tests for the other events in |
@wajeeha-khalid I have completed a pass. |
88b3f2d
to
7bfda1d
Compare
7bfda1d
to
72aeb2c
Compare
jenkins run bokchoy |
@jcdyer @symbolist incorporated feedback |
👍 |
1 similar comment
👍 |
MA-1985 add analytics event to thread/comment vote
MA-1985 add analytics event to thread/comment vote