@extends('layouts.gamification') @section('title', __('Успеваемость')) @section('gami-active', 'progress') {{-- The student's own attendance, КР/ДЗ marks and срезы — StudentCabinetController::progress(). Each lesson shows its КТП topic and links to the courses staff linked to that topic. КР/ДЗ are shown out of the admin-configured scale (App\Support\LessonScores); срезы carry their own max_score, so they're shown (and averaged) as a percentage. --}} @php $statusLabels = [ 'attended' => [__('Был'), 'var(--ax-success-bg)', 'var(--ax-success)'], 'paid_absence' => [__('Пропуск'), 'var(--ax-danger-bg)', 'var(--ax-danger)'], 'free_absence' => [__('Пропуск (уваж.)'), 'var(--ax-info-bg)', 'var(--ax-info)'], 'holiday' => [__('Праздник'), 'var(--ax-gray-100)', 'var(--ax-text-muted)'], ]; $krMax = \App\Support\LessonScores::krMax(); $dzMax = \App\Support\LessonScores::dzMax(); $tone = fn (?float $value, float $max = 10) => $value === null ? 'cab-dim' : ($value / $max >= 0.8 ? 'cab-good' : ($value / $max >= 0.5 ? 'cab-mid' : 'cab-low')); @endphp @push('styles') @endpush @section('gami-content')
| {{ __('Дата') }} | {{ __('Тема') }} | {{ __('Посещение') }} | {{ __('КР') }} | {{ __('ДЗ') }} |
|---|---|---|---|---|
| {{ date('d.m.Y', strtotime($lesson->lesson_date)) }} |
@if ($lesson->homework_text)
{{ __('Задано:') }} {{ $lesson->homework_text }}
@endif
@if ($lesson->topic_title)
{{ $lesson->topic_title }}
@foreach ($lesson->courses as $course)
{{ $course->icon }} {{ $course->title }}
@endforeach
@else
—
@endif
|
{{ $status[0] }} @if (in_array($lesson->lateness, ['Опоздал', 'Опоздал сильно'], true)) {{ mb_strtolower($lesson->lateness) }} @endif | @if ($lesson->kr_score === null) — @else {{ $lesson->kr_score }}/{{ $krMax }} @endif | @if ($lesson->dz_not_assigned) {{ __('не задано') }} @elseif ($lesson->dz_score === null) — @else {{ $lesson->dz_score }}/{{ $dzMax }} @endif |