Skip to content
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

Merged
merged 3 commits into from
Feb 12, 2016
Merged

Conversation

wajeeha-khalid
Copy link
Contributor

MA-1985 add analytics event to thread/comment vote

@wajeeha-khalid wajeeha-khalid force-pushed the jia/MA-1985 branch 2 times, most recently from 9631e1d to 3076776 Compare February 7, 2016 10:39
@wajeeha-khalid
Copy link
Contributor Author

@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)
Copy link
Contributor

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.

@jcdyer
Copy link
Contributor

jcdyer commented Feb 9, 2016

(pass complete)

@wajeeha-khalid wajeeha-khalid force-pushed the jia/MA-1985 branch 2 times, most recently from b0d66e6 to 88b3f2d Compare February 10, 2016 13:10
@wajeeha-khalid
Copy link
Contributor Author

@jcdyer updated

@wajeeha-khalid
Copy link
Contributor Author

@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
Copy link
Contributor

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?

@symbolist
Copy link
Contributor

@wajeeha-khalid We should add tests to verify that the correct event data is emitted. I see some tests for the other events in test_api.py.

@symbolist
Copy link
Contributor

@wajeeha-khalid I have completed a pass.

@wajeeha-khalid
Copy link
Contributor Author

jenkins run bokchoy

@wajeeha-khalid
Copy link
Contributor Author

@jcdyer @symbolist incorporated feedback

@jcdyer
Copy link
Contributor

jcdyer commented Feb 11, 2016

👍

1 similar comment
@symbolist
Copy link
Contributor

👍

wajeeha-khalid added a commit that referenced this pull request Feb 12, 2016
MA-1985 add analytics event to thread/comment vote
@wajeeha-khalid wajeeha-khalid merged commit 7a9fea0 into master Feb 12, 2016
@wajeeha-khalid wajeeha-khalid deleted the jia/MA-1985 branch April 11, 2016 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants