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
9a55497e
Commit
9a55497e
authored
Jun 08, 2015
by
Kelketek
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8417 from open-craft/badges-events-rename
Tweaked names of badge events.
parents
96a9a7e7
ada51a3b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
+6
-6
lms/djangoapps/certificates/badge_handler.py
+1
-1
lms/djangoapps/certificates/tests/test_badge_handler.py
+1
-1
lms/djangoapps/certificates/tests/test_views.py
+2
-2
lms/djangoapps/certificates/views.py
+2
-2
No files found.
lms/djangoapps/certificates/badge_handler.py
View file @
9a55497e
...
...
@@ -157,7 +157,7 @@ class BadgeHandler(object):
Send an analytics event to record the creation of a badge assertion.
"""
tracker
.
emit
(
'edx.badge
s
.assertion.created'
,
{
'edx.badge.assertion.created'
,
{
'user_id'
:
user
.
id
,
'course_id'
:
unicode
(
self
.
course_key
),
'enrollment_mode'
:
assertion
.
mode
,
...
...
lms/djangoapps/certificates/tests/test_badge_handler.py
View file @
9a55497e
...
...
@@ -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.badge
s
.assertion.created'
,
'name'
:
'edx.badge.assertion.created'
,
'data'
:
{
'user_id'
:
self
.
user
.
id
,
'course_id'
:
unicode
(
self
.
course
.
location
.
course_key
),
...
...
lms/djangoapps/certificates/tests/test_views.py
View file @
9a55497e
...
...
@@ -439,7 +439,7 @@ class CertificatesViewsTests(ModuleStoreTestCase, EventTrackingTestCase):
self
.
assertEqual
(
response
.
status_code
,
200
)
assert_event_matches
(
{
'name'
:
'edx.badge
s.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.badge
s
.assertion.shared'
,
'name'
:
'edx.badge.assertion.shared'
,
'data'
:
{
'course_id'
:
'testorg/run1/trackable_course'
,
'social_network'
:
'social_network'
,
...
...
lms/djangoapps/certificates/views.py
View file @
9a55497e
...
...
@@ -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.badge
s.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.badge
s
.assertion.shared'
,
{
'edx.badge.assertion.shared'
,
{
'course_id'
:
unicode
(
course_id
),
'social_network'
:
network
,
'assertion_id'
:
assertion
.
id
,
...
...
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