Following #423 , introduce a model that indicates a "correct" answer to a question when the Campaign is used as a quiz (we are only interested in questions with an default_unit of type SYSTEM_ENUMERATED at this point).
Then modify the "complete" API endpoint (survey_api_sample_freeze_index / djaopsp.api.samples.AssessmentCompleteIndexAPIView) to calculate a score based on the answers in the sample and correct answers as defined in the database. Instead of having, say 1 point per correct answer, specify the number of points in the CorrectAnswer model.
Following #423 , introduce a model that indicates a "correct" answer to a question when the
Campaign
is used as a quiz (we are only interested in questions with andefault_unit
of typeSYSTEM_ENUMERATED
at this point). Then modify the "complete" API endpoint (survey_api_sample_freeze_index
/ djaopsp.api.samples.AssessmentCompleteIndexAPIView) to calculate a score based on the answers in the sample and correct answers as defined in the database. Instead of having, say 1 point per correct answer, specify the number of points in the CorrectAnswer model.