@extends('layouts.app') @section('admin_title', 'Super Admin — Student Analytics') @section('content')
7-Day Active Learner Intelligence

College-Wise Student Analytics

Track total enrolled students per college and identify active learners (at least one login within the last 7 days).

{{ number_format($totalColleges) }}
Total Colleges
Monitored campuses
{{ number_format($totalStudents) }}
Total Students
Enrolled learners
{{ number_format($activeStudents7d) }}
Active Users (Last 7 Days)
At least 1 login in 7 days
{{ $engagementRate }}%
7-Day Engagement Rate
{{ number_format($inactiveStudents) }} inactive students

College Breakdown

Sorted by total student count.

@forelse($collegeStats as $idx => $row) @php $total = (int) $row->total_students; $active = (int) ($row->active_students_7d ?? 0); $inactive = max(0, $total - $active); $rate = $total > 0 ? round(($active / $total) * 100, 1) : 0; $barColor = $rate >= 60 ? '#10b981' : ($rate >= 25 ? '#f59e0b' : '#f43f5e'); @endphp @empty @endforelse
S.No College University Total Students Active (7 Days) Inactive Activity Rate Last Login
{{ ($collegeStats->currentPage() - 1) * $collegeStats->perPage() + $idx + 1 }}
{{ $row->cname }}
{{ $row->district }}
{{ $row->university_name ?? 'N/A' }} {{ number_format($total) }} {{ number_format($active) }} {{ number_format($inactive) }}
{{ $rate }}%
{{ $row->last_student_activity ? \Carbon\Carbon::parse($row->last_student_activity)->diffForHumans() : 'No logins yet' }}
No college data found.
{{ $collegeStats->links() }}
@endsection