@extends('layouts.app')
@section('title', __('Результаты ЕНТ учеников'))
{{--
Read-only report rendered by TeacherEntResultsController — the detailed
counterpart to the dashboard's "Результаты ЕНТ ваших учеников" card
(teacher/dashboard/_ent_results), which only shows the latest sitting.
The single GET filter form needs no CSRF.
Params: $students (with results, each carrying every attempt),
$withoutResults, $summary, $sectionSummary, $subjectProgress, $teacherSubjects, $groups,
$search, $groupId.
Badge colours are solid bg-primary/bg-secondary rather than Bootstrap's
-subtle pair. That was originally forced: carried only this app's own
`data-theme`, not Bootstrap's `data-bs-theme`, so the subtle backgrounds
stayed light in dark mode (see 082ea56, which fixed exactly that on the
dashboard). now carries both, so this is a style choice, not a
constraint — kept solid to match the dashboard card.
--}}
@php
// "50.0" → "50", "12.5" → "12.5" — score/max_score are DECIMAL(5,1) and a
// trailing .0 on every cell is noise. Same helper the dashboard card and the
// admin ЕНТ page use.
$fmt = fn ($value) => rtrim(rtrim(number_format((float) $value, 1, '.', ' '), '0'), '.');
$signed = fn ($value) => ($value >= 0 ? '+' : '−') . $fmt(abs($value));
@endphp
@section('content')
{{ __('Все пробные ЕНТ ваших учеников — по каждой попытке, с разбивкой по предметам и динамикой.') }}
@if ($canEnterSheets)
{{ __('Ответы учеников можно внести с бланка — они проверяются по ключу варианта автоматически.') }}
@else
{{ __('Баллы вносит администрация; здесь они только отображаются.') }}
@endif
@if ($students === [])
@if ($search !== '' || $groupId !== '')
{{ __('По выбранным фильтрам результатов ЕНТ нет.') }}
@else
{{ __('У ваших учеников пока нет результатов ЕНТ.') }}
@endif
@else
{{ $summary['students'] }}
{{ __('учеников с результатами') }}
{{ $fmt($summary['average']) }}
{{ __('средний последний балл') }}
{{ $fmt($summary['best']) }}
{{ __('лучший последний балл') }}
{{-- Only students with two sittings to compare are counted, hence the denominator. --}}
{{ $summary['improved'] }}/{{ $summary['compared'] }}
{{ __('улучшили результат') }}
@if ($subjectProgress)
| {{ __('Предмет') }} |
{{ __('Учеников') }} |
{{ __('Было → стало') }} |
{{ __('Ср. прогресс') }} |
{{ __('Улучшили') }} |
@foreach ($subjectProgress['subjects'] as $s)
| {{ $s['name'] }} / {{ $fmt($s['max_score']) }} |
{{ $s['students'] }} |
{{ $s['avg_from'] !== null ? $fmt($s['avg_from']) . ' → ' . $fmt($s['avg_to']) : '—' }} |
{{ $s['avg_delta'] !== null ? $signed($s['avg_delta']) : '—' }}
|
{{ $s['compared'] > 0 ? $s['improved'] . ' / ' . $s['compared'] : '—' }} |
@endforeach
@endif
@if ($sectionSummary !== [])
| {{ __('Предмет') }} |
{{ __('Учеников') }} |
{{ __('Средний балл') }} |
{{ __('% от максимума') }} |
@foreach ($sectionSummary as $section)
|
{{ $section['name'] }}
@if (in_array($section['name'], $teacherSubjects, true))
{{-- Name match against `disciplines`; see the controller. --}}
{{ __('ваш предмет') }}
@elseif ($section['is_mandatory'])
{{ __('обязательный') }}
@endif
|
{{ $section['students'] }} |
{{ $fmt($section['average']) }}
/ {{ $fmt($section['max_score']) }}
|
@if ($section['percent'] === null)
—
@else
{{ $section['percent'] }}%
@endif
|
@endforeach
@endif
| {{ __('Ученик') }} |
{{ __('Группа') }} |
{{ __('Попыток') }} |
{{ __('Последний') }} |
Δ |
{{ __('С первой попытки') }} |
{{ __('Ср. прогресс') }} |
{{ __('Лучший') }} |
|
@foreach ($students as $student)
@php $rowId = 'entStudent'.$student['id']; @endphp
{{-- The whole row is the collapse toggle; the caret cell is
just its affordance, so there is no second control to
keep in sync. --}}
|
{{ $student['name'] }}
@if ($student['class_name'])
· {{ $student['class_name'] }}
@endif
|
{{ $student['group_names'] ?: '—' }} |
{{ count($student['attempts']) }} |
{{ $fmt($student['latest']['total']) }} |
@if ($student['latest']['delta'] === null)
—
@else
{{ $signed($student['latest']['delta']) }}
@endif
|
@if ($student['total_delta'] === null)
—
@else
{{ $signed($student['total_delta']) }}
@endif
|
@if ($student['avg_delta'] === null)
—
@else
{{ $signed($student['avg_delta']) }}
@endif
|
{{ $fmt($student['best']) }} |
|
| {{ __('Дата') }} |
{{ __('Итого') }} |
Δ |
{{ __('По предметам') }} |
{{ __('Заметка') }} |
@foreach ($student['attempts'] as $attempt)
| {{ date('d.m.Y', strtotime($attempt['date'])) }} |
{{ $fmt($attempt['total']) }}
@if ($attempt['max_total'] > 0)
/ {{ $fmt($attempt['max_total']) }}
@endif
|
@if ($attempt['delta'] === null)
—
@else
{{ $signed($attempt['delta']) }}
@endif
|
@forelse ($attempt['sections'] as $section)
{{ $section['name'] }}: {{ $fmt($section['score']) }}/{{ $fmt($section['max_score']) }}
@empty
{{-- Rows entered before ent_scores.section_id existed have no subject. --}}
{{ __('без разбивки по предметам') }}
@endforelse
|
{{ $attempt['note'] ?: '—' }}
@if ($canEnterSheets && $attempt['sheet_id'] !== null)
{{ __('Разбор') }}
@endif
|
@endforeach
|
@endforeach
@endif
@if ($withoutResults !== [])
{{-- Collapsed by default: it's the "who still has nothing on record"
check, not something to scroll past on every visit. --}}
@foreach ($withoutResults as $student)
{{ $student['name'] }}@if ($student['group_names']) · {{ $student['group_names'] }}@endif
@endforeach
@endif
@endsection