{{-- 右側 AI 語音朗讀(瀏覽器合成語音):這一章已有教學影片(口語講解)時不顯示;影片單元本身也不顯示 --}} @php $sideSpeaker = in_array($lesson->type, ['text', 'lab'], true) && filled($lesson->content) && ! \App\Models\Lesson::where('chapter_id', $lesson->chapter_id)->where('type', 'video')->exists(); @endphp
{{ $lesson->typeLabel() }} · {{ $lesson->xp }} XP @include('learn.role-badge', ['l' => $lesson, 'variant' => 'hint'])

{{ $lesson->title }}

@if ($lesson->isPre())

🎯 {{ __('不計分,先看看你已經知道多少') }}

@elseif ($lesson->isFinal())

🏁 {{ __('整門課的總驗收:共 :n 題,涵蓋所有章節;作答後會公開答案並分析各章表現', ['n' => $lesson->questions->count()]) }}

@elseif ($lesson->isPost())

✅ {{ __('學完本章,來看看你進步了多少') }}

@endif @if (! $sideSpeaker && filled($lesson->content) && in_array($lesson->type, ['terminal', 'robot', 'quiz'], true))
🔊 {{ __('AI 語音朗讀情境說明') }}
@include('learn.speaker')
@endif @if ($lesson->audioUrl())
{{ __('真人語音導讀') }}
@endif @if ($lesson->type === 'video' && $lesson->video_url) @php $embed = preg_match('~(?:youtu\.be/|v=)([\w-]{11})~', $lesson->video_url, $m) ? 'https://www.youtube.com/embed/'.$m[1] : null; @endphp @if ($embed)
@else @endif @endif @include('learn.slides') @if ($lesson->content)
{!! $lesson->contentHtml() !!}
@endif @php $hasUnitCheck = ! empty($panel); @endphp @if ($hasUnitCheck) @include('learn.unit-check') @endif @if ($lesson->type === 'terminal') @include('learn.terminal') @endif @if ($lesson->type === 'robot') @include('learn.robot') @endif @if ($lesson->type === 'simulation') @include('learn.simulation') @endif @if ($lesson->type === 'animation') @include('learn.animation') @endif @if ($lesson->type === 'quiz' && ($lesson->config['adaptive'] ?? false)) @include('learn.adaptive') @elseif ($lesson->type === 'quiz')
@csrf @if ($lesson->isPre())

{{ __('共 :n 題,不計分。作答後不會公布答案;可以重做,但比較時以你第一次的作答為學前基準。', ['n' => $lesson->questions->count()]) }}

@else

{{ __('共 :n 題,:m 分及格。', ['n' => $lesson->questions->count(), 'm' => $lesson->pass_score]) }}@if ($lesson->isPost()) {{ __('達 :m 分才能進入下一章;題目與選項順序每次都不同。', ['m' => $lesson->pass_score]) }}@endif

@endif @include('learn.questions', ['questions' => $lesson->isPost() ? $lesson->questions->shuffle() : $lesson->questions, 'shuffleOptions' => $lesson->isPost()])
@else
@if ($prev) ← {{ __('上一單元') }} @endif
@if (in_array($lesson->id, $done)) ✅ {{ __('已完成') }} @elseif ($hasUnitCheck) {{ __('通過上方的即時小測即可完成(+:n XP)', ['n' => $lesson->xp]) }} @elseif ($lesson->type === 'animation') {{ __('看完動畫會自動記錄完成(+:n XP)', ['n' => $lesson->xp]) }} @elseif (in_array($lesson->type, ['terminal', 'simulation', 'robot'], true)) {{ __('完成上方所有練習任務即可通過(+:n XP)', ['n' => $lesson->xp]) }} @else
@csrf
@endif
@include('learn.unit-next')
@endif
@if ($sideSpeaker) @endif