@extends('layouts.phoenix') @section('title', 'Questions') @section('content') @php $pull = App\Models\QuizQuestion::PULL; $categories = App\Models\QuizQuestion::CATEGORIES; @endphp

Questions

Chaque partie tire {{ $pull[App\Models\QuizQuestion::CATEGORY_CM] }} question Crédit Mutuel et {{ $pull[App\Models\QuizQuestion::CATEGORY_OTHER] }} questions Autre, dans un ordre aléatoire.

Nouvelle question
@foreach($categories as $key => $label) @if($counts[$key] < $pull[$key]) @endif @endforeach

Répartition

@foreach($categories as $key => $label)
{{ $label }} {{ $counts[$key] }} / {{ $pull[$key] }} par partie
@endforeach

Importer des questions

@include('partials.import-form', [ 'action' => url('/admin/imports/questions'), 'format' => 'Question | Bonne réponse | Mauvaise réponse 1 | Mauvaise réponse 2 | Catégorie (creditmutuel ou autre)', ])
@forelse($questions as $question) @empty @endforelse
# Catégorie Question Réponses Actions
{{ $question->id }} {{ $categories[$question->category] ?? $question->category }} {{ $question->title }} @foreach(($answers[$question->id] ?? []) as $answer) {{ $answer->title }} @endforeach @if(! isset($answers[$question->id])) Aucune réponse @endif Modifier
@csrf
Aucune question. Créez-en une ou importez un fichier Excel.
@endsection