feat: add multi choice submission logic
This commit is contained in:
@@ -147,6 +147,15 @@ export class AnswerAuthenticatedProvider {
|
||||
}
|
||||
|
||||
submissionAnswer.choice = choice;
|
||||
} else if (
|
||||
currentQuestion.type === QuestionType.MULTI_CHOICE &&
|
||||
answerSubmissionDto.choiceIds !== undefined
|
||||
) {
|
||||
const choices = currentQuestion.choices.filter((el) =>
|
||||
answerSubmissionDto.choiceIds?.includes(el.id),
|
||||
);
|
||||
|
||||
submissionAnswer.choices = choices;
|
||||
} else if (
|
||||
currentQuestion.type === QuestionType.NUMERIC &&
|
||||
answerSubmissionDto.numericValue !== undefined
|
||||
|
||||
Reference in New Issue
Block a user