canvas-lms/gems/canvas_quiz_statistics
Kacey Roberts ff10b28e43 Added User List to responses on all questions for quiz statistics.
test case:
1. Create a Quiz with a question for each type.
2. Add at a few users to the course.
3. Create student submissions for the quiz with varying responses
4. When you log in as a teacher navigate to that quizzes statistics,
  and click on the expansion button for a question.
5. Click on the response ratio for that question and a modal will show
displaying all the users that have responded to that question.

Change-Id: I5e23b42f6982683902124d734c36eedb9c5da7f7
Fixes: PFS-2227
Reviewed-on: https://gerrit.instructure.com/59720
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2015-09-24 20:56:42 +00:00
..
lib Added User List to responses on all questions for quiz statistics. 2015-09-24 20:56:42 +00:00
spec cleanup refactor of Rubocop's Lint/DeprecatedClassMethods 2015-04-28 18:38:24 +00:00
.rspec Quiz Stats [Backend] - Gem & Essays 2014-05-12 15:02:45 +00:00
CHANGELOG.md Quiz Stats [Backend] - Gem & Essays 2014-05-12 15:02:45 +00:00
Gemfile fix iconv and syck dependencies for vendored gems and ruby 2.2 2015-06-11 15:49:31 +00:00
Guardfile Quiz Stats [Backend] - Gem & Essays 2014-05-12 15:02:45 +00:00
LICENSE.txt Quiz Stats [Backend] - Gem & Essays 2014-05-12 15:02:45 +00:00
README.md Quiz Stats [Backend] - Gem & Essays 2014-05-12 15:02:45 +00:00
Rakefile Quiz Stats [Backend] - Gem & Essays 2014-05-12 15:02:45 +00:00
TODO.md Quiz Stats [Backend] - Gem & Essays 2014-05-12 15:02:45 +00:00
canvas_quiz_statistics.gemspec Quiz Stats - Multiple Choice & True/False 2014-06-05 00:10:40 +00:00
test.sh do some cleanup on gem test runs 2015-05-18 22:39:17 +00:00

README.md

CanvasQuizStatistics

A bunch of objects that can generate statistics from a set of responses to a quiz.

Work In Progress.

Extending

Adding support for a new question type

Implementing the analyzer

  • define an answer analyzer in answer_analyzers/question_type.rb
  • make sure your analyzer implements the common interface, which is defined by the AnswerAnalyzer::Base class
  • please document both output and input formats that you expect to generate the stats

Registering it

Edit lib/canvas_quiz_statistics/answer_analyzers.rb and:

  • require your analyzer
  • add it to the list of available analyzers in CanvasQuizStatistics::AnswerAnalyzers::AVAILABLE_ANALYZERS where the key should be the question type (with the _question suffix) and the value would be your analyzer

Covering it

You will probably need to simulate question data to cover your analyzer. Grab a JSON snapshot of the question_data construct for your question and save it in spec/support/fixtures/ and check out the fixture helpers in spec/support/question_helpers.rb for more information on how to use the fixture.