@extends('layouts.student_dashboard') @section('title', 'MCQ Performance Report') @section('content')
@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif

Your MCQ Performance Report

{{ $course_name }} {{ $module_name }} {{ $topic_name }}
@csrf
@php $progressPercentage = $total_allocated > 0 ? round(($completed_count / $total_allocated) * 100) : 0; $accuracyPercentage = $completed_count > 0 ? round(($correct_count / $completed_count) * 100) : 0; // Determine progress level if ($progressPercentage >= 80) { $progressLevel = 'Excellent'; $progressColor = '#10b981'; } elseif ($progressPercentage >= 50) { $progressLevel = 'Good'; $progressColor = '#f59e0b'; } else { $progressLevel = 'Need Practice'; $progressColor = '#ef4444'; } // Determine accuracy level if ($accuracyPercentage >= 80) { $accuracyLevel = 'Excellent'; $accuracyColor = '#10b981'; } elseif ($accuracyPercentage >= 50) { $accuracyLevel = 'Good'; $accuracyColor = '#f59e0b'; } else { $accuracyLevel = 'Need Practice'; $accuracyColor = '#ef4444'; } @endphp

{{ $total_allocated }}

Total Questions

{{ $completed_count }}

Completed

{{ $progressPercentage }}% ({{ $progressLevel }})

{{ $correct_count }}

Correct Answers

{{ $accuracyPercentage }}% ({{ $accuracyLevel }})

{{ $percentage_score }}%

Overall Score

Question-wise Performance

{{-- ✅ This block will be replaced by AJAX on pagination click --}}
@include('student.course.partials.mcqreport_table')
{{-- ✅ POST-only Keyset Pagination JS (clean URL, best concurrency) --}} @endsection