{{-- /student/courses.php — CourseController::index(): disciplines first (Courses::byDiscipline()); ?discipline=ID lists that discipline's courses, with progress. --}} @extends('layouts.gamification') @section('title', $group ? ($group->name ?? __('Общие курсы')) : __('Курсы')) @section('gami-active', 'courses') @push('styles') @endpush @section('gami-content') @if ($group === null)
{{ __('Курсы') }}

{{ __('Уроки с объяснениями, видео и материалами. За каждый пройденный урок — +:n 🪙.', ['n' => \App\Services\Courses::LESSON_COINS]) }}

@if (empty($groups))
{{ __('Курсов пока нет.') }}
@endif
@foreach ($groups as $g) @include('courses._card', [ 'href' => '/student/courses.php?discipline='.$g->id, 'cover' => \App\Support\CourseCovers::forDiscipline($g->name), 'icon' => $g->icon, 'title' => $g->name ?? __('Общие курсы'), 'subtitle' => __('Курсов: :n', ['n' => count($g->courses)]), 'description' => null, 'done' => $g->done, 'lessons' => $g->lessons, ]) @endforeach
@else
{{ __('Все дисциплины') }}
{{ $group->name ?? __('Общие курсы') }}
{{-- Topics carousel (Courses::featured()): what the student is in the middle of comes first. --}} @if (count($featured) > 1) @endif
@foreach ($group->courses as $c) @include('courses._card', [ 'href' => '/student/course.php?id='.$c->id, 'cover' => \App\Support\CourseCovers::forCourse($c->title, $group->name), 'icon' => $c->icon, 'title' => $c->title, 'subtitle' => null, 'description' => $c->description, 'done' => $c->done, 'lessons' => $c->lessons, ]) @endforeach
@endif
{{ __('Фото: Wikimedia Commons, авторы и лицензии') }}
@endsection