rage / quizzes

Apache License 2.0
5 stars 5 forks source link

Multiple choice grading policy for multiple selectable answers: You need select n correct options to get the quiz item right. #767

Open HegePI opened 3 years ago

HegePI commented 3 years ago
enum MultipleSelectedOptionsGradingPolicy {
  NeedToSelectAllCorrectOptions,
  NeedToSelectNCorrectOptions,
}

quiz_item:

multiple_selected_options_grading_policy MultipleSelectedOptionsGradingPolicy
integer multiple_selected_options_grading_policy_n

min 1 oikein

[x] Oikein [x] Oikein [ ] Oikein [ ] Väärin [ ] Väärin

The relevant code branch is where the quizItem.multi is true: https://github.com/rage/quizzes/blob/bca2515b942b9b623c437d1b3b08543bf10e772f/packages/backendv2/src/models/quiz_answer.ts#L692