diff --git a/frontend/src/views/QuizView.vue b/frontend/src/views/QuizView.vue
index a1b374b..79681c6 100644
--- a/frontend/src/views/QuizView.vue
+++ b/frontend/src/views/QuizView.vue
@@ -286,8 +286,11 @@
{{ isCorrect ? '답을 맞췄어요!' : '이런 틀렸군요ㅠㅜ' }}
-
@@ -556,8 +559,7 @@ function skipToExplanations() {
userDescriptiveAnswer.value = ''
descriptiveGradingResult.value = null
selectedChoiceIndex.value = -1
- isCorrect.value = true
- score.value++
+ isCorrect.value = false
showFeedback.value = true
}
@@ -947,12 +949,20 @@ function submitOXAnswer(val: string) {
showFeedback.value = true
}
+function formatCorrectAnswer(ans: string): string {
+ if (!ans) return ''
+ return ans.split(';;').join(', ')
+}
+
function submitTextAnswer() {
if (showFeedback.value || !userTextAnswer.value.trim()) return
- const user = userTextAnswer.value.trim().toLowerCase()
- const correct = currentQuestion.value.correctAnswerStr.toLowerCase()
- isCorrect.value = user === correct
+ const userClean = userTextAnswer.value.trim().replace(/\s+/g, '').toLowerCase()
+ const correctAnswers = (currentQuestion.value.correctAnswerStr || '')
+ .split(';;')
+ .map(ans => ans.trim().replace(/\s+/g, '').toLowerCase())
+
+ isCorrect.value = correctAnswers.includes(userClean)
if (isCorrect.value) score.value++
showFeedback.value = true