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
2e3a154d
Commit
2e3a154d
authored
Dec 16, 2015
by
Alison Hodges
Committed by
Daniel Friedman
Apr 11, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Copy editing pass through the descriptive strings.
parent
08e412bf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
113 additions
and
87 deletions
+113
-87
analytics_data_api/v0/views/learners.py
+113
-87
No files found.
analytics_data_api/v0/views/learners.py
View file @
2e3a154d
...
@@ -28,7 +28,7 @@ from analytics_data_api.v0.views.utils import split_query_argument
...
@@ -28,7 +28,7 @@ from analytics_data_api.v0.views.utils import split_query_argument
class
LearnerView
(
CourseViewMixin
,
generics
.
RetrieveAPIView
):
class
LearnerView
(
CourseViewMixin
,
generics
.
RetrieveAPIView
):
"""
"""
Get
a particular student's data for
a particular course.
Get
data for a particular learner in
a particular course.
**Example Request**
**Example Request**
...
@@ -36,24 +36,33 @@ class LearnerView(CourseViewMixin, generics.RetrieveAPIView):
...
@@ -36,24 +36,33 @@ class LearnerView(CourseViewMixin, generics.RetrieveAPIView):
**Response Values**
**Response Values**
Returns
the learner metadata and engagement data:
Returns
metadata and engagement data for the learner in JSON format.
* username: User's username.
* username: The username of the enrolled learner.
* enrollment_mode: Enrollment mode (e.g. "honor).
* enrollment_mode: The learner's selected learning track (for
* name: User's full name.
example, "audit" or "verified").
* email: User's email.
* name: The learner's full name.
* segments: Classification for this course based on engagement, (e.g. "has_potential").
* email: The learner's email address.
* segments: Classification, based on engagement, of this learner's
work in this course (for example, "highly_engaged" or
"struggling").
* engagements: Summary of engagement events for a time span.
* engagements: Summary of engagement events for a time span.
* videos_viewed: Number of times a video was played.
* videos_viewed: Number of times any course video was played.
* problems_completed: Unique number of problems completed.
* problems_completed: Number of unique problems the learner
* problems_attempted: Unique number of problems attempted.
answered correctly.
* discussions_contributed: Number of discussions (e.g. forum posts).
* problems_attempted: Number of unique problems attempted.
This is a count of the individual problems the learner
tried. Each problem in a course can increment this count by
a maximum of 1.
* discussions_contributed: Number of posts, responses, or
comments the learner contributed to course discussions.
**Parameters**
**Parameters**
You can specify the course ID for which you want data.
You can specify the course ID for which you want data.
course_id -- The course within which user data is requested.
course_id -- The course identifier for which user data is requested.
For example, edX/DemoX/Demo_Course.
"""
"""
serializer_class
=
LearnerSerializer
serializer_class
=
LearnerSerializer
...
@@ -76,7 +85,7 @@ class LearnerView(CourseViewMixin, generics.RetrieveAPIView):
...
@@ -76,7 +85,7 @@ class LearnerView(CourseViewMixin, generics.RetrieveAPIView):
class
LearnerListView
(
CourseViewMixin
,
generics
.
ListAPIView
):
class
LearnerListView
(
CourseViewMixin
,
generics
.
ListAPIView
):
"""
"""
Get a paginated list of
student data for a particular
course.
Get a paginated list of
data for all learners in a
course.
**Example Request**
**Example Request**
...
@@ -85,55 +94,66 @@ class LearnerListView(CourseViewMixin, generics.ListAPIView):
...
@@ -85,55 +94,66 @@ class LearnerListView(CourseViewMixin, generics.ListAPIView):
**Response Values**
**Response Values**
Returns a paginated list of learner metadata and engagement data.
Returns a paginated list of learner metadata and engagement data.
Pagination data is returned in the top
-
level of the returned JSON
Pagination data is returned in the top
level of the returned JSON
object
:
object
.
* count: The number of learners
matching
the query.
* count: The number of learners
that match
the query.
* page: The current one-indexed page number.
* page: The current one-indexed page number.
* next: A hyperlink to the next page if one exists, otherwise null.
* next: A hyperlink to the next page if one exists, otherwise null.
* previous: A hyperlink to the previous page if one exists, otherwise null.
* previous: A hyperlink to the previous page if one exists,
otherwise null.
The 'results' key in the returned JSON object maps to an array of
learners which contains at most a full page's worth of learners. Each
The 'results' key in the returned object maps to an array of
learner is a JSON object containing the following keys:
learners that contains, at most, a full page's worth of learners. For
each learner there is an object that contains the following keys.
* username: User's username.
* enrollment_mode: Enrollment mode (e.g. "honor).
* username: The username of an enrolled learner.
* name: User's full name.
* enrollment_mode: The learner's selected learning track (for
* email: User's email.
example, "audit" or "verified").
* segments: Classification for this course based on engagement, (e.g. "has_potential").
* name: The learner's full name.
* email: The learner's email address.
* segments: Classification, based on engagement, of each learner's
work in this course (for example, "highly_engaged" or
"struggling").
* engagements: Summary of engagement events for a time span.
* engagements: Summary of engagement events for a time span.
* videos_viewed: Number of times a video was played.
* videos_viewed: Number of times any course video was played.
* problems_completed: Unique number of problems completed.
* problems_completed: Number of unique problems the learner
* problems_attempted: Unique number of problems attempted.
answered correctly.
* discussions_contributed: Number of discussions (e.g. forum posts).
* problems_attempted: Number of unique problems attempted.
This is a count of the individual problems the learner
tried. Each problem in a course can increment this count by
a maximum of 1.
* discussions_contributed: Number of posts, responses, or
comments the learner contributed to course discussions.
**Parameters**
**Parameters**
You can filter the list of learners by course ID and other parameters
You can filter the list of learners by course ID and by other
such as enrollment mode and text search. You can also control the
parameters, including enrollment mode and text search. You can also
page size and page number of the response, as well as sort the learners
control the page size and page number of the response, as well as sort
in the response.
the learners in the response.
course_id -- The course within which user data is requested.
course_id -- The course identifier for which user data is requested.
page -- The page of results which should be returned.
For example, edX/DemoX/Demo_Course.
page_size -- The maximum number of results which should be returned per page.
page -- The page of results that should be returned.
text_search -- A string to search over the name, username, and email of learners.
page_size -- The maximum number of results to return per page.
segments -- A comma-separated string of segments to which
text_search -- An alphanumeric string that is used to search name,
learners should belong. Semgents are "OR"-ed together.
username, and email address values to find learners.
Cannot use in combination with `ignore_segments`
segments -- A comma-separated list of segment names that is used
argument.
to select learners. Only learners who are categorized in at least
ignore_segments -- A comma-separated string of segments to
one of the segments are returned. Cannot be used in combination
which learners should NOT belong. Semgents are "OR"-ed
with the `ignore_segments` argument.
together. Cannot use in combination with `segments`
ignore_segments -- A comma-separated list of segment names that is
argument.
used to exclude learners. Only learners who are NOT categorized
in any of the segments are returned. Cannot be used in combination
with the `segments` argument.
cohort -- The cohort to which all returned learners must
cohort -- The cohort to which all returned learners must
belong.
belong.
enrollment_mode -- The
enrollment mode
to which all returned
enrollment_mode -- The
learning track
to which all returned
learners must belong.
learners must belong.
order_by -- The field for sorting the response.
Defaults to 'username'.
order_by -- The field for sorting the response. Defaults to 'username'.
sort_order -- The sort direction. One of 'asc'
or 'desc'.
sort_order -- The sort direction. One of 'asc'
(ascending) or 'desc'
Defaults to 'asc'.
(descending).
Defaults to 'asc'.
"""
"""
serializer_class
=
LearnerSerializer
serializer_class
=
LearnerSerializer
...
@@ -210,8 +230,8 @@ class LearnerListView(CourseViewMixin, generics.ListAPIView):
...
@@ -210,8 +230,8 @@ class LearnerListView(CourseViewMixin, generics.ListAPIView):
class
EngagementTimelineView
(
CourseViewMixin
,
generics
.
ListAPIView
):
class
EngagementTimelineView
(
CourseViewMixin
,
generics
.
ListAPIView
):
"""
"""
Get a particular learner's engagement timeline for a particular course.
Days
Get a particular learner's engagement timeline for a particular course.
without data will not be
returned.
Days without data are not
returned.
**Example Request**
**Example Request**
...
@@ -219,20 +239,26 @@ class EngagementTimelineView(CourseViewMixin, generics.ListAPIView):
...
@@ -219,20 +239,26 @@ class EngagementTimelineView(CourseViewMixin, generics.ListAPIView):
**Response Values**
**Response Values**
Returns the engagement timeline.
Returns the engagement timeline in an array.
* days: Array of the learner's daily engagement timeline.
* days: An array of the learner's daily engagement timeline.
* problems_attempted: Unique number of unique problems attempted.
* problems_attempted: Number of unique problems attempted.
* problems_completed: Unique number of problems completed.
This is a count of the individual problems the learner
* discussions_contributed: Number of discussions participated in (e.g. forum posts)
tried. Each problem in a course can increment this count by
* videos_viewed: Number of videos watched.
a maximum of 1.
* problems_completed: Number of unique problems the learner
answered correctly.
* discussions_contributed: Number of posts, responses, or
comments the learner contributed to course discussions.
* videos_viewed: Number of times any course video was played.
* problem_attempts_per_completed: TBD
* problem_attempts_per_completed: TBD
**Parameters**
**Parameters**
You can specify course ID for which you want data.
You can specify
the
course ID for which you want data.
course_id -- The course within which user data is requested.
course_id -- The course identifier for which user data is requested.
For example, edX/DemoX/Demo_Course.
"""
"""
serializer_class
=
EngagementDaySerializer
serializer_class
=
EngagementDaySerializer
...
@@ -258,8 +284,8 @@ class EngagementTimelineView(CourseViewMixin, generics.ListAPIView):
...
@@ -258,8 +284,8 @@ class EngagementTimelineView(CourseViewMixin, generics.ListAPIView):
class
CourseLearnerMetadata
(
CourseViewMixin
,
generics
.
RetrieveAPIView
):
class
CourseLearnerMetadata
(
CourseViewMixin
,
generics
.
RetrieveAPIView
):
"""
"""
Get metadata
on learners with
in a course. Includes data on segments,
Get metadata
about the learners
in a course. Includes data on segments,
cohorts,
enrollment modes, and
an engagement rubric.
cohorts,
and enrollment modes. Also includes
an engagement rubric.
**Example Request**
**Example Request**
...
@@ -267,33 +293,33 @@ class CourseLearnerMetadata(CourseViewMixin, generics.RetrieveAPIView):
...
@@ -267,33 +293,33 @@ class CourseLearnerMetadata(CourseViewMixin, generics.RetrieveAPIView):
**Response Values**
**Response Values**
Returns a
JSON object with the following keys:
Returns a
n object with the following keys.
* cohorts: An object
mapping the names of cohorts in the course to
* cohorts: An object
that maps the names of cohorts in the course
t
he number of student
s belonging to those cohorts.
t
o the number of learner
s belonging to those cohorts.
* segments: An object
mapping
the names of segments in the course
* segments: An object
that maps
the names of segments in the course
to the number of
students belonging to those segments.
The
to the number of
learners belonging to those segments.
The
current set of segments
are:
"highly_engaged", "disengaging",
current set of segments
is
"highly_engaged", "disengaging",
"struggling", "inactive", and "unenrolled".
"struggling", "inactive", and "unenrolled".
* enrollment_modes: An object
mapping the names of enrollment modes
* enrollment_modes: An object
that maps the names of learning
in the course to the number of student
s belonging to those
tracks in the course to the number of learner
s belonging to those
enrollment modes. Examples include "honor
" and "verified".
tracks. Examples include "audit
" and "verified".
* engagement_ranges: An object containing ranges of learner
* engagement_ranges: An object containing ranges of learner
engagement with the courseware.
Each range has 'below_average',
engagement with the courseware. Each range has 'below_average',
'average', and 'above_average' keys
which map to two-element
'average', and 'above_average' keys
. These keys map to
arrays of which the first element is the lower bound (inclusive)
two-element arrays, in which the first element is the lower bound
and the second element is the upper bound (exclusive). It has
(inclusive) and the second element is the upper bound
the following keys:
(exclusive). It has the following keys.
* date_range: The time
duration for which this data applies
* date_range: The time
period to which this data applies.
* problems_attempted:
e
ngagement ranges for the number of
* problems_attempted:
E
ngagement ranges for the number of
problems attempt
ed in the date range.
unique problems tri
ed in the date range.
* problems_completed:
e
ngagement ranges for the number of
* problems_completed:
E
ngagement ranges for the number of
problems completed
in the date range.
unique problems answered correctly
in the date range.
* problem_attempts_per_completed:
e
ngagement ranges for the
* problem_attempts_per_completed:
E
ngagement ranges for the
number of problem attempts per completed problem in the date
number of problem attempts per completed problem in the date
range.
range.
* discussions_contributed:
e
ngagement ranges for the number of
* discussions_contributed:
E
ngagement ranges for the number of
discussions contributed
in the date range.
times learners participated in discussions
in the date range.
"""
"""
serializer_class
=
CourseLearnerMetadataSerializer
serializer_class
=
CourseLearnerMetadataSerializer
...
...
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