Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions frontend/src/components/ui/PerformanceReportView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ export default function PerformanceReportView({ report, isLoading, headerTitle,
label: `Q${i + 1} — ${q.question_text}`,
detail: q.is_correct
? `Selected: ${q.selected_answer} ✓`
: `Selected: ${q.selected_answer ?? ''} ✗ (Correct: ${q.correct_answer ?? '—'})`,
: `Selected: ${q.selected_answer ?? 'No Answer'} ✗ (Correct: ${q.correct_answer ?? '—'})`,
type: toQuestionType(q.question_type),
result: (q.is_correct ? 'pass' : 'fail') as 'pass' | 'fail',
points: q.points,
verified: aiVerified[i] ?? false,
correctAnswer: q.correct_answer,
selectedAnswer: q.selected_answer ?? '',
selectedAnswer: q.selected_answer ?? 'No Answer',
}))
: [];

Expand Down
13 changes: 10 additions & 3 deletions frontend/src/pages/learner/performance/InvestigationSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,19 @@ export default function InvestigationSection({
<tr key={i} className='border-t border-gray-100 align-top'>
<td className='px-5 py-3'>
<p className='text-sm text-gray-900'>{q.label}</p>
<span className={`inline-block mt-1 font-mono text-[10px] px-1.5 py-0.5 rounded ${typeBadgeClass(q.type)}`}>{q.type}</span>
<div className='flex items-center gap-1.5 mt-1'>
<span className={`font-mono text-[10px] px-1.5 py-0.5 rounded ${typeBadgeClass(q.type)}`}>{q.type}</span>
{q.verified && (
<span className='font-mono text-[10px] px-1.5 py-0.5 rounded bg-green-100 text-green-700'>AI verified</span>
)}
</div>
</td>
<td className='px-4 py-3'>
<p className='text-sm text-gray-700'>{q.selectedAnswer}</p>
<p className={`text-sm ${q.selectedAnswer === 'No Answer' ? 'text-gray-400 italic' : 'text-gray-700'}`}>
{q.selectedAnswer}
</p>
{q.result === 'fail' && q.correctAnswer && (
<p className='font-mono text-xs text-gray-400 mt-0.5'>correct: {q.correctAnswer}</p>
<p className='font-mono text-xs text-gray-600 mt-0.5'>correct: {q.correctAnswer}</p>
)}
</td>
<td className='px-5 py-3 text-right'>
Expand Down