We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6e286ae + 2ab971a commit 0a969fcCopy full SHA for 0a969fc
1 file changed
app/[locale]/dashboard/student/courses/[courseId]/exams/[examId]/result/page.tsx
@@ -132,7 +132,10 @@ export default async function ExamResultPage({ params }: PageProps) {
132
const answer = answersByQuestionId[q.question_id]
133
if (answer) {
134
const selectedOpt = findSelectedOption(q.question_options, answer.answer_text)
135
- acc[q.question_id] = !!selectedOpt?.is_correct
+ if (selectedOpt !== null) {
136
+ acc[q.question_id] = !!selectedOpt?.is_correct
137
+ }
138
+ // If no matching option found, leave undefined — let ?? fall through to qScore
139
}
140
141
return acc
0 commit comments