Commit 9a55497e by Kelketek

Merge pull request #8417 from open-craft/badges-events-rename

Tweaked names of badge events.
parents 96a9a7e7 ada51a3b
......@@ -157,7 +157,7 @@ class BadgeHandler(object):
Send an analytics event to record the creation of a badge assertion.
"""
tracker.emit(
'edx.badges.assertion.created', {
'edx.badge.assertion.created', {
'user_id': user.id,
'course_id': unicode(self.course_key),
'enrollment_mode': assertion.mode,
......
......@@ -190,7 +190,7 @@ class BadgeHandlerTestCase(ModuleStoreTestCase, EventTrackingTestCase):
'evidence': 'https://edx.org/certificates/user/2/course/edX/course_test/test_run?evidence_visit=1'
})
assert_event_matches({
'name': 'edx.badges.assertion.created',
'name': 'edx.badge.assertion.created',
'data': {
'user_id': self.user.id,
'course_id': unicode(self.course.location.course_key),
......
......@@ -439,7 +439,7 @@ class CertificatesViewsTests(ModuleStoreTestCase, EventTrackingTestCase):
self.assertEqual(response.status_code, 200)
assert_event_matches(
{
'name': 'edx.badges.assertion.evidence_visit',
'name': 'edx.badge.assertion.evidence_visited',
'data': {
'course_id': 'testorg/run1/refundable_course',
# pylint: disable=no-member
......@@ -491,7 +491,7 @@ class TrackShareRedirectTest(ModuleStoreTestCase, EventTrackingTestCase):
self.assertEqual(response['Location'], 'http://www.example.com/image.png')
assert_event_matches(
{
'name': 'edx.badges.assertion.shared',
'name': 'edx.badge.assertion.shared',
'data': {
'course_id': 'testorg/run1/trackable_course',
'social_network': 'social_network',
......
......@@ -531,7 +531,7 @@ def render_html_view(request, user_id, course_id):
try:
badge = BadgeAssertion.objects.get(user=user, course_id=course_key)
tracker.emit(
'edx.badges.assertion.evidence_visit',
'edx.badge.assertion.evidence_visited',
{
'user_id': user.id,
'course_id': unicode(course_key),
......@@ -581,7 +581,7 @@ def track_share_redirect(request__unused, course_id, network, student_username):
course_id = CourseLocator.from_string(course_id)
assertion = get_object_or_404(BadgeAssertion, user__username=student_username, course_id=course_id)
tracker.emit(
'edx.badges.assertion.shared', {
'edx.badge.assertion.shared', {
'course_id': unicode(course_id),
'social_network': network,
'assertion_id': assertion.id,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment