@extends('layouts.app') @section('title', 'Информация о группе') {{-- Ports app/Views/lesson/attendance_form.php (legacy, 799 lines) + the render() payload from App\Controllers\LessonController::attendanceForm() (app/Controllers/LessonController.php:413-461) — see the Phase 22 plan. Every write form/fetch on this page (check_lesson.php/check_lesson_exists.php/ submit_test_results.php/add_student_to_group_teacher.php/ remove_student_from_group.php/check_student_in_group.php) still posts to its exact unchanged legacy endpoint. Real Laravel CSRF as of Phase 62 — @csrf on the real forms, an X-CSRF-TOKEN header (read from the page's csrf-token meta tag, via layouts.app) on the two $.ajax calls. check_student_in_group.php has no backend anywhere (dead route) — its fetch() + .catch() fallback is ported byte-for-byte, not fixed. No page-level role restriction beyond SessionAuth::check() — matches the legacy controller's constructor exactly. $localGroupInfo/$localStudents/$comments/$commentCategories are DB::select() results (stdClass rows), unlike the legacy view's $pdo-fetched associative arrays — property access (->) is used throughout instead of array access. The two SQL queries the legacy view ran directly against $pdo (comments list, comment_categories+comments for the Comments modal) were moved into the controller — see its docblock. --}} @section('content')

Информация о группе

@if ($localGroupInfo['success']) @php $local = $localGroupInfo['data']; @endphp

Отделение: {{ $local->language_name ?? 'не указано' }}

Предмет: {!! nl2br(e($local->discipline_name ?? '—')) !!}

Класс: {{ $local->class_name }}

Тип обучения: {{ $local->learning_type_name }}

@endif @if ($date !== $today)
Вы заполняете аттенданс задним числом — за {{ date('d.m.Y', strtotime($date)) }}. @if (empty($isSubstitution)) Урок будет засчитан только после подтверждения администратором. @endif
@endif @if (!empty($isSubstitution))
Замена. Вы заполняете урок за {{ $originalTeacherName ?? 'другого преподавателя' }}. Урок будет засчитан только после одобрения администратором.
@endif
@if (!empty($isSubstitution)) @endif
@csrf @if (!empty($isSubstitution)) @endif
@if (!empty($localStudents))

Студенты

    {{-- Roster must reflect who was active ON THE LESSON DATE ($date), not today — otherwise retroactive fills show the wrong students. --}} @foreach ($localStudents as $student) @php $joinedAt = date('Y-m-d', strtotime($student->joined_at)); $endDate = ($student->end_date === '1970-01-01') ? null : $student->end_date; $isActive = ($date >= $joinedAt) && (is_null($endDate) || $date <= $endDate); $isFrozen = (bool) $student->is_frozen; @endphp @continue(!$isActive)
  • {{ trim("{$student->last_name} {$student->first_name}") }} @if ($isFrozen) Заморожен @endif
  • @endforeach
@else

В этой группе нет студентов в локальной базе данных. Урок можно засчитать без учеников — оплата составит 0.5.

@endif
@foreach ($localStudents as $student)
@csrf
@endforeach
Вернуться на панель
@endsection @push('styles') @endpush @push('scripts') @endpush