@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) {{ __('Внести бланк ответов') }} @endif

{{ __('Все пробные ЕНТ ваших учеников — по каждой попытке, с разбивкой по предметам и динамикой.') }} @if ($canEnterSheets) {{ __('Ответы учеников можно внести с бланка — они проверяются по ключу варианта автоматически.') }} @else {{ __('Баллы вносит администрация; здесь они только отображаются.') }} @endif

@if ($search !== '' || $groupId !== '') @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) @endforeach
{{ __('Предмет') }} {{ __('Учеников') }} {{ __('Было → стало') }} {{ __('Ср. прогресс') }} {{ __('Улучшили') }}
{{ $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'] : '—' }}
@endif @if ($sectionSummary !== [])
{{ __('Средний балл по предметам') }} {{ __('по последней попытке каждого ученика, слабые предметы сверху') }}
@foreach ($sectionSummary as $section) @endforeach
{{ __('Предмет') }} {{ __('Учеников') }} {{ __('Средний балл') }} {{ __('% от максимума') }}
{{ $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
@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. --}} @endforeach
{{ __('Ученик') }} {{ __('Группа') }} {{ __('Попыток') }} {{ __('Последний') }} Δ {{ __('С первой попытки') }} {{ __('Ср. прогресс') }} {{ __('Лучший') }}
@foreach ($student['attempts'] as $attempt) @endforeach
{{ __('Дата') }} {{ __('Итого') }} Δ {{ __('По предметам') }} {{ __('Заметка') }}
{{ 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
@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