feat: seperate single and multi choice questions
This commit is contained in:
@@ -131,7 +131,7 @@ export class AnswerAuthenticatedProvider {
|
||||
});
|
||||
|
||||
if (
|
||||
currentQuestion.type === QuestionType.MULTI_CHOICE &&
|
||||
currentQuestion.type === QuestionType.SINGLE_CHOICE &&
|
||||
answerSubmissionDto.choiceId !== undefined
|
||||
) {
|
||||
const choice = currentQuestion.choices.find(
|
||||
|
||||
@@ -126,7 +126,7 @@ export class AnswerGuestProvider {
|
||||
};
|
||||
|
||||
if (
|
||||
currentQuestion.type === QuestionType.MULTI_CHOICE &&
|
||||
currentQuestion.type === QuestionType.SINGLE_CHOICE &&
|
||||
answerSubmissionDto.choiceId !== undefined
|
||||
) {
|
||||
const choice = currentQuestion.choices.find(
|
||||
|
||||
@@ -162,7 +162,7 @@ export class CalculateResultProvider {
|
||||
if (!question) continue;
|
||||
|
||||
if (
|
||||
question.type === QuestionType.MULTI_CHOICE &&
|
||||
question.type === QuestionType.SINGLE_CHOICE &&
|
||||
answer.choiceId !== undefined
|
||||
) {
|
||||
const choice =
|
||||
@@ -192,7 +192,7 @@ export class CalculateResultProvider {
|
||||
questions.forEach((question) => {
|
||||
const answerScores: number[] = [];
|
||||
|
||||
if (question.type === QuestionType.MULTI_CHOICE) {
|
||||
if (question.type === QuestionType.SINGLE_CHOICE) {
|
||||
question.choices.forEach((choice) => {
|
||||
answerScores.push(choice.score);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user