@php $q = $this->currentQuestion(); $progressPercent = $totalSteps > 0 ? (int) round(($currentStep / $totalSteps) * 100) : 0; @endphp
{{ $task['icon'] ?? '∑' }}
{{ $task['meta'] ?? '' }}
{{ $task['title'] ?? 'Aufgabe' }}
@if(! $finished) {{-- Progress bar --}}
Frage {{ $currentStep }} / {{ $totalSteps }} +{{ (int) ($task['points'] ?? 0) }} Pkt.
{{-- Question --}}
Aufgabe
{{ $q['question'] }}
@foreach($q['options'] as $i => $opt) @endforeach
@else {{-- Finished state --}} @php $passed = $correctAnswers >= (int) ceil($totalSteps / 2); $percent = $totalSteps > 0 ? (int) round(($correctAnswers / $totalSteps) * 100) : 0; @endphp
@if($passed) @else @endif
@if($passed) Super gemacht! @else Fast geschafft @endif

Du hast {{ $correctAnswers }} von {{ $totalSteps }} Aufgaben richtig.

{{ $percent }} % Erfolgsquote

Nochmal @if($passed) Punkte holen @else Fertig @endif
@endif