Skip to content

Commit 0a969fc

Browse files
Merge pull request #279 from guillermoscript/feat/entitlements-model
feat(enrollment): entitlements model — decouple access from enrollments
2 parents 6e286ae + 2ab971a commit 0a969fc

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • app/[locale]/dashboard/student/courses/[courseId]/exams/[examId]/result

app/[locale]/dashboard/student/courses/[courseId]/exams/[examId]/result/page.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,10 @@ export default async function ExamResultPage({ params }: PageProps) {
132132
const answer = answersByQuestionId[q.question_id]
133133
if (answer) {
134134
const selectedOpt = findSelectedOption(q.question_options, answer.answer_text)
135-
acc[q.question_id] = !!selectedOpt?.is_correct
135+
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
136139
}
137140
}
138141
return acc

0 commit comments

Comments
 (0)