@php $testSettings = $testSettings ?? \App\Support\LessonTestSettings::defaults(); $questions = $testSettings['questions'] ?? []; $displayQuestions = \App\Support\LessonTestSettings::questionsForMemberDisplay($testSettings); $testResult = $testResult ?? null; $passingScore = (int) ($testSettings['passing_score'] ?? 80); @endphp @if(session('warning'))
{{ session('warning') }}
@endif @if(is_array($testResult))
結果: {{ $testResult['correct'] ?? 0 }} / {{ $testResult['total'] ?? 0 }} 問正解({{ $testResult['score_percent'] ?? 0 }}%) @if($testResult['passed'] ?? false) — 合格(合格点 {{ $testResult['passing_score'] ?? $passingScore }}%以上) @else — 不合格(合格点 {{ $testResult['passing_score'] ?? $passingScore }}%以上が必要) @endif
@endif @if(empty($questions))
このテストにはまだ設問が設定されていません。
@elseif(! ($lessonCompleted ?? false) && empty($isPreview))
@csrf @if($errors->any())
{{ $errors->first() }}
@endif

合格点: {{ $passingScore }}%以上で受講完了になります。

@foreach($displayQuestions as $displayNum => $item) @php $qIndex = $item['index']; $question = $item['question']; @endphp
問{{ $displayNum + 1 }}

{{ $question['prompt'] }}

@foreach($question['choices'] as $cIndex => $choiceText)
@endforeach
@endforeach
@endif