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
504ef4cd
Commit
504ef4cd
authored
Jan 21, 2015
by
Dennis Jen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Problem answer distribution will only return the answer_value.
parent
f0ca9978
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
37 deletions
+18
-37
analytics_data_api/fixtures/problem_response_answer_distribution.json
+15
-30
analytics_data_api/v0/models.py
+1
-2
analytics_data_api/v0/serializers.py
+1
-2
analytics_data_api/v0/views/problems.py
+1
-3
No files found.
analytics_data_api/fixtures/problem_response_answer_distribution.json
View file @
504ef4cd
[
{
"fields"
:
{
"answer_value_numeric"
:
36.02736
,
"answer_value_text"
:
"36.02736"
,
"answer_value"
:
"36.02736"
,
"correct"
:
false
,
"count"
:
1
,
"course_id"
:
"EarthSciences/GP202/Spring2014"
,
...
...
@@ -19,8 +18,7 @@
},
{
"fields"
:
{
"answer_value_numeric"
:
33.0
,
"answer_value_text"
:
"33.0"
,
"answer_value"
:
"33.0"
,
"correct"
:
false
,
"count"
:
1
,
"course_id"
:
"EarthSciences/GP202/Spring2014"
,
...
...
@@ -37,8 +35,7 @@
},
{
"fields"
:
{
"answer_value_numeric"
:
27.51936482
,
"answer_value_text"
:
"27.51936482"
,
"answer_value"
:
"27.51936482"
,
"correct"
:
true
,
"count"
:
1
,
"course_id"
:
"EarthSciences/GP202/Spring2014"
,
...
...
@@ -55,8 +52,7 @@
},
{
"fields"
:
{
"answer_value_numeric"
:
28.65
,
"answer_value_text"
:
"28.65"
,
"answer_value"
:
"28.65"
,
"correct"
:
true
,
"count"
:
1
,
"course_id"
:
"EarthSciences/GP202/Spring2014"
,
...
...
@@ -73,8 +69,7 @@
},
{
"fields"
:
{
"answer_value_numeric"
:
null
,
"answer_value_text"
:
"line 15: mean(glm.pred==Direction)"
,
"answer_value"
:
"line 15: mean(glm.pred==Direction)"
,
"correct"
:
true
,
"count"
:
95
,
"course_id"
:
"HumanitiesScience/StatLearning/Winter2014"
,
...
...
@@ -91,8 +86,7 @@
},
{
"fields"
:
{
"answer_value_numeric"
:
null
,
"answer_value_text"
:
"line 22: Direction.2005=Smarket$Direction[!train]"
,
"answer_value"
:
"line 22: Direction.2005=Smarket$Direction[!train]"
,
"correct"
:
false
,
"count"
:
1
,
"course_id"
:
"HumanitiesScience/StatLearning/Winter2014"
,
...
...
@@ -109,8 +103,7 @@
},
{
"fields"
:
{
"answer_value_numeric"
:
null
,
"answer_value_text"
:
"line 30: table(glm.pred,Direction.2005)"
,
"answer_value"
:
"line 30: table(glm.pred,Direction.2005)"
,
"correct"
:
false
,
"count"
:
1
,
"course_id"
:
"HumanitiesScience/StatLearning/Winter2014"
,
...
...
@@ -127,8 +120,7 @@
},
{
"fields"
:
{
"answer_value_numeric"
:
5.02
,
"answer_value_text"
:
null
,
"answer_value"
:
"5.02"
,
"correct"
:
true
,
"count"
:
95
,
"course_id"
:
"edX/DemoX/Demo_Course"
,
...
...
@@ -145,8 +137,7 @@
},
{
"fields"
:
{
"answer_value_numeric"
:
62
,
"answer_value_text"
:
null
,
"answer_value"
:
"62"
,
"correct"
:
false
,
"count"
:
13
,
"course_id"
:
"edX/DemoX/Demo_Course"
,
...
...
@@ -163,8 +154,7 @@
},
{
"fields"
:
{
"answer_value_numeric"
:
10.2
,
"answer_value_text"
:
null
,
"answer_value"
:
"10.2"
,
"correct"
:
false
,
"count"
:
100
,
"course_id"
:
"edX/DemoX/Demo_Course"
,
...
...
@@ -181,8 +171,7 @@
},
{
"fields"
:
{
"answer_value_numeric"
:
5.02
,
"answer_value_text"
:
null
,
"answer_value"
:
null
,
"correct"
:
true
,
"count"
:
5
,
"course_id"
:
"edX/DemoX/Demo_Course"
,
...
...
@@ -199,8 +188,7 @@
},
{
"fields"
:
{
"answer_value_numeric"
:
null
,
"answer_value_text"
:
null
,
"answer_value"
:
null
,
"correct"
:
true
,
"count"
:
213
,
"course_id"
:
"edX/DemoX/Demo_Course"
,
...
...
@@ -218,8 +206,7 @@
{
"fields"
:
{
"answer_value_numeric"
:
null
,
"answer_value_text"
:
"North America"
,
"answer_value"
:
"North America"
,
"correct"
:
true
,
"count"
:
95
,
"course_id"
:
"edX/DemoX/Demo_Course"
,
...
...
@@ -236,8 +223,7 @@
},
{
"fields"
:
{
"answer_value_numeric"
:
null
,
"answer_value_text"
:
"Africa"
,
"answer_value"
:
"Africa"
,
"correct"
:
false
,
"count"
:
13
,
"course_id"
:
"edX/DemoX/Demo_Course"
,
...
...
@@ -254,8 +240,7 @@
},
{
"fields"
:
{
"answer_value_numeric"
:
null
,
"answer_value_text"
:
"Asia"
,
"answer_value"
:
"Asia"
,
"correct"
:
false
,
"count"
:
100
,
"course_id"
:
"edX/DemoX/Demo_Course"
,
...
...
analytics_data_api/v0/models.py
View file @
504ef4cd
...
...
@@ -105,8 +105,7 @@ class ProblemResponseAnswerDistribution(models.Model):
correct
=
models
.
NullBooleanField
()
count
=
models
.
IntegerField
()
value_id
=
models
.
CharField
(
db_index
=
True
,
max_length
=
255
,
null
=
True
)
answer_value_text
=
models
.
TextField
(
null
=
True
)
answer_value_numeric
=
models
.
FloatField
(
null
=
True
)
answer_value
=
models
.
TextField
(
null
=
True
,
db_column
=
'answer_value_text'
)
variant
=
models
.
IntegerField
(
null
=
True
)
problem_display_name
=
models
.
TextField
(
null
=
True
)
question_text
=
models
.
TextField
(
null
=
True
)
...
...
analytics_data_api/v0/serializers.py
View file @
504ef4cd
...
...
@@ -67,8 +67,7 @@ class ProblemResponseAnswerDistributionSerializer(ModelSerializerWithCreatedFiel
'correct'
,
'count'
,
'value_id'
,
'answer_value_text'
,
'answer_value_numeric'
,
'answer_value'
,
'problem_display_name'
,
'question_text'
,
'variant'
,
...
...
analytics_data_api/v0/views/problems.py
View file @
504ef4cd
...
...
@@ -30,9 +30,7 @@ class ProblemResponseAnswerDistributionView(generics.ListAPIView):
* count: The number of times the answer in this collection was
given.
* value_id: The ID of the answer in this collection.
* answer_value_text: The text of this answer, for text problems.
* answer_value_numeric: The number for this answer, for numeric
problems.
* 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
...
...
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