@extends('layouts.gamification')
@section('title', $quiz->title)
@section('gami-active', 'quizzes')
@push('styles')
@endpush
@section('gami-content')
{{ __('← Все квизы') }}
{{ $quiz->discipline_name }} · {{ __(':coins 🪙 за каждый правильный ответ', ['coins' => (int) $quiz->coins_per_correct]) }}
@if ($answers !== null)
{{-- Results: the coins, and every question with the right answer marked. --}}
+{{ (int) $quiz->coins }} 🪙
{{ __('Правильных ответов: :correct из :total', ['correct' => (int) $quiz->correct_count, 'total' => (int) $quiz->total]) }}
@foreach ($questions as $i => $q)
{{ $i + 1 }}. {{ $q->text }}
@foreach ($q->options as $o)
@php
$picked = ($answers[$q->id] ?? null) === (int) $o->id;
$class = (int) $o->is_correct === 1 ? 'right' : ($picked ? 'wrong' : '');
@endphp
{{ (int) $o->is_correct === 1 ? '✅' : ($picked ? '❌' : '◻️') }}
{{ $o->text }}
@if ($picked) {{ __('— ваш ответ') }} @endif
@endforeach
@if (! array_key_exists($q->id, $answers))
{{ __('Вопрос добавлен после того, как вы прошли квиз.') }}
@endif
@endforeach
@else