-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Although we originally designed quizzes such that user scores were stored in aggregate by number wrong and right answers, a business need now exists for us to identify which questions users get wrong so that we can look to improve the curriculum.
Proposed Solution:
- Rename
toynet_quiz_scores
totoynet_submissions
- Create a new table called
toynet_submission_results
which has:
- a primary key of (
quiz_id
,submission_id
,question_id
) - another field called
answer
which holds the student's answer (one of the 4 multiple choice options) - a foreign key to the primary key of
toynet_submissions
(submission_id
) - a foreign key to the primary key of
toynet_quiz_options
(quiz_id
,question_id
,option_id
) whereanswer
is mapped tooption_id
- Alter toynet_quiz_score to make it possible to send an array of
answers
, and writetoynet_submission_results
if array is populated with data. If array is empty, do not write totoynet_submission_results
. - Add thorough unit tests
- Create an issue in toynet-react to start using this data.
Please Note:
that quiz_id
is redundant here from a pure data perspective as it can be deduced from submission_id
, but it makes the toynet_quizzes
table a lot more queryable for very little extra information (we can find all answers to a particular question without joins. This decision is negotiable.
Design doc: https://docs.google.com/document/d/14I8HlklMHjxC23IoFRS9nPnzXAslZbdGzGU3mN_qsW0/edit#heading=h.vtrimkf7p9v8
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request