Refactoring the generation of quiz question statistics into its own gem.
This patch adds support for Essay question statistics.
Closes CNVS-12725
TEST PLAN
---- ----
- create a quiz with an essay question
- perform an API request to retrieve the quiz statistics
- ensure that the following metrics are generated and correct:
- "graded": number of students whose answers have been graded by the
teacher
- "full_credit": number of students who received a full score
- "point_distribution": a list of scores and the number of students
who received them (so if 2 students got graded for 3 points, it
should have a key of 2 and a value of 3), un-graded submissions
should be keyed under null
- "responses": number of students who answered the question
(wrote anything)
- "user_ids": IDs of those students
- documentation for QuizStatistics -> Essay should be updated with the
new stats
> Other things to test
- verify that the old statistics page still renders:
/courses/:course_id/quizzes/:quiz_id/statistics
- verify that you can still generate both student and item analysis
CSV reports
API endpoint for quiz stats:
/api/v1/courses/:courseid/quizzes/:quiz_id/statistics [GET]
Change-Id: Ib15434ff4cef89ac211c1f4602d1ee609ef48ec4
Reviewed-on: https://gerrit.instructure.com/33990
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
Closes CNVS-8989
CHANGES
-------
- ItemAnalysis can now be generated to a Hash as well as CSV
TEST PLAN
---- ----
- create a quiz with a number of questions (true/false and
multiple-choice a must-have)
- take the quiz by 2-3 students
- perform an API request as described below and verify that you get a
statistics object that matches the API docs
- do it once in legacy JSON format, e.g:
"Accept: application/json"
- do it once in JSON-API format, e.g:
"Accept: application/vnd.api+json"
- read the API docs and report any mistakes or stuff that's not clear,
the stuff is written in the QuizStatistics module
Endpoint: [GET] /api/v1/courses/:course_id/quizzes/:quiz_id/statistics
Change-Id: I1588e1cdc8955b890c739df4c730507dad7118d1
Reviewed-on: https://gerrit.instructure.com/31141
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>