@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')