|
|
@@ -542,7 +542,7 @@ export const useExam = () => {
|
|
|
answer1 = answer1 || '';
|
|
|
answer2 = answer2 || '';
|
|
|
if ([EnumQuestionType.SINGLE_CHOICE, EnumQuestionType.JUDGMENT].includes(typeId)) {
|
|
|
- return answer1.includes(answers[0]);
|
|
|
+ return answer1.trim() === answers[0];
|
|
|
} else if ([EnumQuestionType.MULTIPLE_CHOICE].includes(typeId)) {
|
|
|
return answers.length === answer1.length && answers.every(item => answer1.includes(item));
|
|
|
} else {
|
|
|
@@ -561,7 +561,7 @@ export const useExam = () => {
|
|
|
const isOptionCorrect = (question: Study.Question, option: Study.QuestionOption) => {
|
|
|
const { answers, answer1, typeId } = question;
|
|
|
if ([EnumQuestionType.SINGLE_CHOICE, EnumQuestionType.JUDGMENT].includes(typeId)) {
|
|
|
- return answer1?.trim() === answers[0];
|
|
|
+ return answer1?.includes(option.no);
|
|
|
} else if ([EnumQuestionType.MULTIPLE_CHOICE].includes(typeId)) {
|
|
|
return answer1?.includes(option.no);
|
|
|
} else {
|