@php $total = $lessons->count(); $done = count($doneIds); $pct = $total ? round($done / $total * 100) : 0; $currentDone = $current && in_array($current->id, $doneIds); $currentModule = $current ? $course->modules->firstWhere('id', $current->module_id) : null; @endphp {{-- Hero: the course cover, full bleed --}}
@if ($course->coverUrl())
@else
@endif
My courses

{{ $course->department ?? 'All staff' }}

{{ $course->title }}

@if ($course->description)

{{ $course->description }}

@endif
{{ $done }} of {{ $total }} lessons done {{ $pct }}%
@if ($finished) @endif
@if (! $current) @if ($sessions->isNotEmpty()) {{-- Face-to-face only course --}}
@else

This course has no lessons yet

Your trainer is still building it. Check back soon.

@endif @else
{{-- Current lesson --}}
@if ($current->embedUrl())
@elseif ($current->videoFileUrl()) @elseif ($current->imageUrl()) @endif
$current->hasVideo() || $current->imageUrl()])>

{{ $currentModule?->title }}

{{ $current->title }}

@if ($currentDone) Completed @endif
@if ($current->video_url && ! $current->embedUrl()) Watch video (opens in a new tab) @endif @if ($current->content)
{{ $current->content }}
@endif @if ($current->imageUrl() && $current->hasVideo()) @endif @if ($current->files->isNotEmpty())

Materials

@endif
{{-- Step through the course --}} @if ($finished) {{-- Course feedback (UR-19) --}}
@csrf @method('PUT')
{{ $feedback ? 'Your rating' : 'How was this course?' }}

Your trainer sees your rating and comment with your name. You can change it later.

@foreach ([1 => 'Poor', 2 => 'Fair', 3 => 'Good', 4 => 'Very good', 5 => 'Excellent'] as $score => $word) @endforeach
@if ($feedback)

Sent {{ $feedback->updated_at->format('j M Y') }}

@else @endif
@endif
{{-- Course content --}}
@endif