Problem Information API#
Get the Grade Distribution for a Course#
- class analytics_data_api.v0.views.problems.GradeDistributionView(**kwargs)[source]#
Get the distribution of grades for a specific problem.
Example request
GET /api/v0/problems/{problem_id}/grade_distribution
Response Values
Returns a collection for each unique grade given to a specified problem. Each collection contains:
course_id: The ID of the course for which data is returned.
module_id: The ID of the problem.
grade: The grade being counted in this collection.
count: The number of times the grade in this collection was given.
max_grade: The highest possible grade for this problem.
created: The date the count was computed.
Example Response
HTTP 200 OK
Vary: Accept
Content-Type: text/html; charset=utf-8
Allow: GET, HEAD, OPTIONS
[
{
"module_id": "i4x://edX/DemoX/Demo_Course/problem/97fd93e33a18495488578e9e74fa4cae",
"course_id": "edX/DemoX/Demo_Course",
"grade": 1,
"max_grade": 2,
"count": 5,
"created": "2014-09-12T114957"
},
{
"module_id": "i4x://edX/DemoX/Demo_Course/problem/97fd93e33a18495488578e9e74fa4cae",
"course_id": "edX/DemoX/Demo_Course",
"grade": 2,
"max_grade": 2,
"count": 256,
"created": "2014-09-12T114957"
}
]
Get the Answer Distribution for a Problem#
- class analytics_data_api.v0.views.problems.ProblemResponseAnswerDistributionView(**kwargs)[source]#
Get the distribution of student answers to a specific problem.
Example request
GET /api/v0/problems/{problem_id}/answer_distribution
Response Values
Returns a collection for each unique answer given to specified problem. Each collection contains:
course_id: The ID of the course for which data is returned.
module_id: The ID of the problem.
part_id: The ID for the part of the problem. For multi-part problems, a collection is returned for each part.
correct: Whether the answer was correct (
true
) or not (false
).count: The number of times the answer in this collection was given.
value_id: The ID of the answer in this collection.
answer_value: An answer for this problem.
problem_display_name: The display name for the specified problem.
question_text: The question for the specified problem.
variant: For randomized problems, the random seed used. If problem is not randomized, value is null.
created: The date the count was computed.
Example Response
HTTP 200 OK
Vary: Accept
Content-Type: text/html; charset=utf-8
Allow: GET, HEAD, OPTIONS
[
{
"course_id": "edX/DemoX/Demo_Course",
"module_id": "i4x://edX/DemoX/Demo_Course/problem/
268b43628e6d45f79c52453a590f9829",
"part_id": "i4x-edX-DemoX-Demo_Course-problem-
268b43628e6d45f79c52453a590f9829_2_1",
"correct": false,
"count": 9,
"value_id": "choice_0",
"answer_value_text": "Russia",
"answer_value_numeric": null,
"problem_display_name": "Multiple Choice Problem",
"question_text": "Which of the following countries has the largest
population?",
"variant": null,
"created": "2014-12-05T225026"
},
{
"course_id": "edX/DemoX/Demo_Course",
"module_id": "i4x://edX/DemoX/Demo_Course/problem/
268b43628e6d45f79c52453a590f9829",
"part_id": "i4x-edX-DemoX-Demo_Course-problem-
268b43628e6d45f79c52453a590f9829_2_1",
"correct": true,
"count": 15,
"value_id": "choice_1",
"answer_value_text": "Indonesia",
"answer_value_numeric": null,
"problem_display_name": "Multiple Choice Problem",
"question_text": "Which of the following countries has the largest
population?",
"variant": null,
"created": "2014-12-05T225026"
}
]
Get the View Count for a Subsection#
- class analytics_data_api.v0.views.problems.SequentialOpenDistributionView(**kwargs)[source]#
Get the number of views of a subsection, or sequential, in the course.
Example request
GET /api/v0/problems/{module_id}/sequential_open_distribution
Response Values
Returns a collection that contains the number of views of the specified problem. The collection contains:
course_id: The ID of the course for which data is returned.
module_id: The ID of the subsection, or sequential.
count: The number of times the subsection was viewed.
created: The date the count computed.
Example Response
HTTP 200 OK
Vary: Accept
Content-Type: text/html; charset=utf-8
Allow: GET, HEAD, OPTIONS
[
{
"module_id": "i4x://edX/DemoX/Demo_Course/sequential/5c6c207e16dd47208c29bd8d3e68861e",
"course_id": "edX/DemoX/Demo_Course",
"count": 23,
"created": "2014-09-12T114838"
}
]