@extends('layouts.app') @section('title', 'Assessment progress') @section('content')

Continuous assessment progress

Formative quiz and CAT scores by learner. Only graded attempts count towards weighted progress; manual reviews are flagged until complete.
All assessments
@include('academics._nav') @php $classScores = collect($rows)->pluck('weighted_average')->filter(fn ($value) => $value !== null); $classAverage = $classScores->count() ? round($classScores->avg(), 1) : null; $catWeight = (float) $quizzes->where('category', 'cat')->sum('weight'); $quizWeight = (float) $quizzes->where('category', 'quiz')->sum('weight'); $totalWeight = $catWeight + $quizWeight; $pendingReviews = collect($rows)->sum(fn ($row) => $row['pending'] ?? 0); $gradedCells = collect($rows)->sum(fn ($row) => collect($row['cells'])->filter(fn ($attempt) => $attempt && $attempt->status === 'graded')->count()); @endphp
@if($quizzes->isEmpty()) @else
@foreach($quizzes as $quiz) @endforeach @forelse($rows as $index => $row) @foreach($quizzes as $quiz) @php $attempt = $row['cells'][$quiz->id] ?? null; @endphp @endforeach @empty @endforelse
Learner
{{ \Illuminate\Support\Str::limit($quiz->title, 34) }}
{{ $quiz->category_label }} {{ num($quiz->weight, 0) }}%
Quiz avg CAT avg Weighted score Weighted avg
{{ $row['student']->full_name }}
{{ $row['student']->admission_no }}{{ $row['student']->stream ? ' · '.$row['student']->stream : '' }}
@if(!$attempt || $attempt->score === null) - @elseif($attempt->status === 'submitted') Pending @else @php $score = (float) $attempt->score; @endphp {{ num($score, 1) }}%
#{{ $attempt->attempt_no }}
@endif
{{ $row['quiz_average'] === null ? '-' : num($row['quiz_average'], 1).'%' }} {{ $row['cat_average'] === null ? '-' : num($row['cat_average'], 1).'%' }} {{ num($row['weighted_score'], 1) }} / {{ num($row['weighted_weight'], 0) }} @if($row['weighted_average'] === null) - @else {{ num($row['weighted_average'], 1) }}% @endif
{{ num($gradedCells) }} graded assessment result{{ $gradedCells === 1 ? '' : 's' }} shown. Cells display the best graded attempt; "Pending" means a manual response is awaiting review. Weighted score sums each score × weight and is divided by the total weight for the weighted average.
@endif
@endsection