Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-analytics-data-api
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-analytics-data-api
Commits
1dbec29c
Commit
1dbec29c
authored
Jun 08, 2016
by
ajpal
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #120 from edx/ajpal/fix-attempts-per-completed
Fix bug where problem attempts per completed was not showing
parents
600a7574
489e0f6d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletions
+13
-1
analytics_data_api/constants/engagement_events.py
+2
-1
analytics_data_api/v0/tests/views/test_learners.py
+11
-0
No files found.
analytics_data_api/constants/engagement_events.py
View file @
1dbec29c
from
analytics_data_api.constants
import
engagement_entity_types
from
analytics_data_api.constants
import
engagement_entity_types
ATTEMPTED
=
'attempted'
ATTEMPTED
=
'attempted'
ATTEMPTS_PER_COMPLETED
=
'attempts_per_completed'
COMPLETED
=
'completed'
COMPLETED
=
'completed'
CONTRIBUTED
=
'contributed'
CONTRIBUTED
=
'contributed'
VIEWED
=
'viewed'
VIEWED
=
'viewed'
...
@@ -8,7 +9,7 @@ VIEWED = 'viewed'
...
@@ -8,7 +9,7 @@ VIEWED = 'viewed'
# map entity types to events
# map entity types to events
EVENTS
=
{
EVENTS
=
{
engagement_entity_types
.
DISCUSSION
:
[
CONTRIBUTED
],
engagement_entity_types
.
DISCUSSION
:
[
CONTRIBUTED
],
engagement_entity_types
.
PROBLEM
:
[
ATTEMPTED
,
COMPLETED
],
engagement_entity_types
.
PROBLEM
:
[
ATTEMPTED
,
ATTEMPTS_PER_COMPLETED
,
COMPLETED
],
engagement_entity_types
.
PROBLEMS
:
[
ATTEMPTED
,
COMPLETED
],
engagement_entity_types
.
PROBLEMS
:
[
ATTEMPTED
,
COMPLETED
],
engagement_entity_types
.
VIDEO
:
[
VIEWED
],
engagement_entity_types
.
VIDEO
:
[
VIEWED
],
engagement_entity_types
.
VIDEOS
:
[
VIEWED
],
engagement_entity_types
.
VIDEOS
:
[
VIEWED
],
...
...
analytics_data_api/v0/tests/views/test_learners.py
View file @
1dbec29c
...
@@ -647,3 +647,14 @@ class CourseLearnerMetadataTests(DemoCourseMixin, VerifyCourseIdMixin,
...
@@ -647,3 +647,14 @@ class CourseLearnerMetadataTests(DemoCourseMixin, VerifyCourseIdMixin,
response
=
self
.
_get
(
self
.
course_id
)
response
=
self
.
_get
(
self
.
course_id
)
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertDictContainsSubset
(
expected
,
json
.
loads
(
response
.
content
))
self
.
assertDictContainsSubset
(
expected
,
json
.
loads
(
response
.
content
))
def
test_engagement_ranges_fields
(
self
):
actual_entity_types
=
engagement_entity_types
.
INDIVIDUAL_TYPES
expected_entity_types
=
[
'discussion'
,
'problem'
,
'video'
]
self
.
assertEqual
(
actual_entity_types
,
expected_entity_types
)
actual_events
=
[]
for
entity_type
in
actual_entity_types
:
for
event
in
engagement_events
.
EVENTS
[
entity_type
]:
actual_events
.
append
(
event
)
expected_events
=
[
'contributed'
,
'attempted'
,
'attempts_per_completed'
,
'completed'
,
'viewed'
]
self
.
assertEqual
(
actual_events
,
expected_events
)
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