Skip to content

Commit

Permalink
Peter's and Dennis's edits
Browse files Browse the repository at this point in the history
  • Loading branch information
Alison Hodges committed Dec 17, 2015
1 parent c49eee5 commit 0301dcf
Showing 1 changed file with 39 additions and 29 deletions.
68 changes: 39 additions & 29 deletions analytics_data_api/v0/views/learners.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,11 @@ class LearnerView(CourseViewMixin, generics.RetrieveAPIView):
**Response Values**
Returns metadata and engagement data for the learner.
Returns metadata and engagement data for the learner in JSON format.
* username: User's username.
* enrollment_mode: Enrollment mode (for example, "verified").
* enrollment_mode: The user's learning track (for example, "audit"
or "verified").
* name: User's full name.
* email: User's email address.
* segments: Classification, based on engagement, of this learner's
Expand All @@ -50,15 +51,18 @@ class LearnerView(CourseViewMixin, generics.RetrieveAPIView):
* problems_completed: Number of unique problems the learner
answered correctly.
* problems_attempted: Number of unique problems attempted.
This is a count of the different problems the learner tried.
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**
You can specify the course ID for which you want data.
course_id -- The course for 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
Expand All @@ -81,7 +85,7 @@ def get_object(self, queryset=None):

class LearnerListView(CourseViewMixin, generics.ListAPIView):
"""
Get a paginated list of data for all learners in a particular course.
Get a paginated list of data for all learners in a course.
**Example Request**
Expand All @@ -104,9 +108,10 @@ class LearnerListView(CourseViewMixin, generics.ListAPIView):
each learner there is a JSON object that contains the following keys.
* username: User's username.
* enrollment_mode: Enrollment mode (for example, "verified").
* enrollment_mode: The user's learning track (for example, "audit"
or "verified").
* name: User's full name.
* email: User's email.
* email: User's email address.
* segments: Classification, based on engagement, of each learner's
work in this course (for example, "highly_engaged" or
"struggling").
Expand All @@ -115,7 +120,9 @@ class LearnerListView(CourseViewMixin, generics.ListAPIView):
* problems_completed: Number of unique problems the learner
answered correctly.
* problems_attempted: Number of unique problems attempted.
This is a count of the different problems the learner tried.
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.
Expand All @@ -126,23 +133,23 @@ class LearnerListView(CourseViewMixin, generics.ListAPIView):
control the page size and page number of the response, as well as sort
the learners in the response.
course_id -- The course for which user data is requested.
course_id -- The course identifier for which user data is requested.
For example, edX/DemoX/Demo_Course.
page -- The page of results that should be returned.
page_size -- The maximum number of results to return per page.
text_search -- An alphanumeric string that is used to search name,
username, and email values to find learners.
segments -- A comma-separated string of segment names that is used
to select only those learners who are categorized in those
segments. Segments are connected by OR statements. Cannot be
used in combination with the `ignore_segments` argument.
ignore_segments -- A comma-separated string of segment names that is
used to select only those learners who are NOT categorized
as belonging to those segments. Segments are connected by OR
statements. Cannot be used in combination with the `segments`
argument.
username, and email address values to find learners.
segments -- A comma-separated list of segment names that is used
to select learners. Only learners who are categorized in one of
the segments are returned. Cannot be used in combination with
the `ignore_segments` argument.
ignore_segments -- A comma-separated list of segment names that is
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
belong.
enrollment_mode -- The enrollment mode to which all returned
enrollment_mode -- The learning track to which all returned
learners must belong.
order_by -- The field for sorting the response. Defaults to 'username'.
sort_order -- The sort direction. One of 'asc' (ascending) or 'desc'
Expand Down Expand Up @@ -217,11 +224,13 @@ class EngagementTimelineView(CourseViewMixin, generics.ListAPIView):
**Response Values**
Returns the engagement timeline.
Returns the engagement timeline in a JSON array.
* days: Array of the learner's daily engagement timeline.
* days: An array of the learner's daily engagement timeline.
* problems_attempted: Number of unique problems attempted.
This is a count of the different problems the learner tried.
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.
* problems_completed: Number of unique problems the learner
answered correctly.
* discussions_contributed: Number of posts, responses, or
Expand All @@ -232,7 +241,8 @@ class EngagementTimelineView(CourseViewMixin, generics.ListAPIView):
You can specify the course ID for which you want data.
course_id -- The course for 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
Expand All @@ -259,7 +269,7 @@ def get_queryset(self):
class CourseLearnerMetadata(CourseViewMixin, generics.RetrieveAPIView):
"""
Get metadata for the learners in a course. Includes data on segments,
cohorts, and enrollment modes, and an engagement rubric.
cohorts, and enrollment modes. Also includes an engagement rubric.
**Example Request**
Expand All @@ -275,9 +285,9 @@ class CourseLearnerMetadata(CourseViewMixin, generics.RetrieveAPIView):
to the number of learners belonging to those segments. The
current set of segments is "highly_engaged", "disengaging",
"struggling", "inactive", and "unenrolled".
* enrollment_modes: An object that maps the names of enrollment
modes in the course to the number of learners belonging to those
enrollment modes. Examples include "audit" and "verified".
* enrollment_modes: An object that maps the names of learning
tracks in the course to the number of learners belonging to those
tracks. Examples include "audit" and "verified".
* engagement_ranges: An object containing ranges of learner
engagement with the courseware. Each range has 'below_average',
'average', and 'above_average' keys. These keys map to
Expand All @@ -286,7 +296,7 @@ class CourseLearnerMetadata(CourseViewMixin, generics.RetrieveAPIView):
(exclusive). It has the following keys.
* date_range: The time period to which this data applies.
* problems_attempted: Engagement ranges for the number of
unique problems attempted in the date range.
unique problems tried in the date range.
* problems_completed: Engagement ranges for the number of
unique problems answered correctly in the date range.
* problem_attempts_per_completed: Engagement ranges for the
Expand Down

0 comments on commit 0301dcf

Please sign in to comment.