@php $pageInfo = $page_info ?? [ 'has_next' => false, 'has_prev' => false, 'next_cursor' => null, 'prev_cursor' => null, ]; @endphp @if($completed_count > 0)
@foreach($completed_questions as $question) @php $questionDetail = $question['details'] ?? null; $isCorrect = (bool) $question['is_correct']; $resultColor = $isCorrect ? '#10b981' : '#ef4444'; $resultIcon = $isCorrect ? 'fa-check-circle' : 'fa-times-circle'; $resultText = $isCorrect ? 'Correct' : 'Incorrect'; // ✅ keyset pagination has no page number; keep simple row number per page $rowNo = $loop->iteration; @endphp @endforeach
# Question Difficulty Your Answer Correct Answer Result Submitted On
{{ $rowNo }} @if($questionDetail) {{ \Illuminate\Support\Str::limit(strip_tags($questionDetail->question), 100) }} @else Question #{{ $question['question_id'] }} @endif @if($questionDetail) @if(strtolower($questionDetail->level) == 'easy') Easy @elseif(strtolower($questionDetail->level) == 'medium') Medium @else Hard @endif @else Unknown @endif {{ $question['selected_answer'] }} {{ $question['correct_answer'] }} {{ $resultText }} {{ date('d M Y, h:i A', strtotime($question['submitted_at'])) }}
{{-- ✅ POST Prev/Next pagination --}} @include('student.course.partials.mcqreport_pagination', [ 'pageInfo' => $pageInfo ]) @else

No MCQ Attempts Yet

You haven't attempted any MCQ questions for this topic yet.

@endif