{{ session('success') }}
@endif
@php
$pendingAssignments = $pendingAssignments ?? collect();
@endphp
Welcome to Your Dashboard
📈 Overall Performance
Your academic performance across all courses
{{ round($overallAvgScore, 1) }}
/ 100
@if($overallGrade)
({{ $overallGrade }})
@endif
Completion Rate
{{ $overallCompletion }}%
Assignments Graded
{{ $totalGraded }}
Total Assignments
{{ $totalAssignments }}
@if ($pendingAssignments->isEmpty())
@endif
You have no pending assignments. You're all caught up!
@else
| Assignment | Due Date | Status |
|---|---|---|
|
@if ($assignment->course)
{{ $assignment->course->course_name }}
@endif
|
{{ $assignment->due_date ? $assignment->due_date->format('M d, Y g:ia') : 'No due date set' }} | {{ $status }} |
Enrolled courses
My Courses
@foreach($courses as $index => $course)
@php
// Calculate progress based on assignments
$totalAssignments = $course->assignments_count ?? 0;
$submittedCount = \App\Models\Submissions::whereIn('assignment_id', $course->assignments()->pluck('id'))
->where('student_id', Auth::id())
->count();
$progress = $totalAssignments > 0 ? min(100, round(($submittedCount / $totalAssignments) * 100)) : 0;
@endphp
@endforeach
@else
You are not enrolled in any courses yet.