{{-- "Результаты ЕНТ ваших учеников" — the teacher's read-only view of what admin enters on /admin/ent_scores.php, restricted to students currently in one of this teacher's own groups. Params: $entResults, $teacherSubjects (see TeacherDashboardController::entResults()). Rendered even when there is nothing yet: an empty state tells a teacher the section exists and where its data comes from, which a silently absent card can't. An instance that doesn't record ЕНТ at all turns the whole thing off with MODULE_TEACHER_ENT_RESULTS instead. The table scrolls inside a fixed height rather than paginating — the roster is bounded by one teacher's groups, and a teacher scanning for one student's name is better served by Ctrl+F over the whole list than by page links. --}} @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 formatting the admin page uses. $fmt = fn ($value) => rtrim(rtrim(number_format((float) $value, 1, '.', ' '), '0'), '.'); $withDelta = array_values(array_filter($entResults, fn ($r) => $r['delta'] !== null)); $improved = count(array_filter($withDelta, fn ($r) => $r['delta'] > 0)); $average = $entResults === [] ? null : round(array_sum(array_map(fn ($r) => $r['latest_score'], $entResults)) / count($entResults), 1); @endphp
| Ученик | Дата | Предыдущий | Последний | Δ | По предметам |
|---|---|---|---|---|---|
| {{ $row['name'] }} | {{ date('d.m.Y', strtotime($row['latest_date'])) }} | {{ $row['previous_score'] === null ? '—' : $fmt($row['previous_score']) }} | {{ $fmt($row['latest_score']) }} | @if ($row['delta'] === null) — @else {{ ($row['delta'] >= 0 ? '+' : '−') . $fmt(abs($row['delta'])) }} @endif | @forelse ($row['sections'] as $section) {{-- Highlighted when the subject is one this teacher teaches. `disciplines` and `ent_sections` are independent dictionaries with no key between them, so this is a name match and nothing depends on it: a dictionary whose names don't line up simply gets no highlight, never a wrong score. bg-secondary rather than bg-light for the rest. Originally because carried only this app's own `data-theme` and not Bootstrap's `data-bs-theme`, leaving Bootstrap's light/subtle backgrounds light in dark mode; now carries both, and bg-secondary stays because it's what the dashboard's other badge (the group time) already uses. (.bg-light is still not theme-aware — Bootstrap fixes it to #f8f9fa in both themes.) --}} {{ $section['name'] }}: {{ $fmt($section['score']) }} @empty — @endforelse |