<?php

use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;

/* adminQuestions.twig */
class __TwigTemplate_4cf9d59cbbb9ecac16ea8baaa48dec7f67a2708ad850b44ae58cf48c33ce107d extends Template
{
    private $source;
    private $macros = [];

    public function __construct(Environment $env)
    {
        parent::__construct($env);

        $this->source = $this->getSourceContext();

        $this->parent = false;

        $this->blocks = [
        ];
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 1
        echo "<!DOCTYPE html>
<html lang=\"fr\">
    <head>
        <title>Maths Educ</title>
        <meta charset=\"UTF-8\">
        <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">
        <link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN\" crossorigin=\"anonymous\">
        </script>

        <style>
            @font-face {
                font-family: 'MenuFont';
                src: url('Media/mathEducFont.ttf') format('truetype');
            }

            * {
                font-family: 'MenuFont';
            }
        </style>
    </head>

    <body>
        <div class=\"container mt-5\">
            <h1>Liste des questions</h1>
            <ul class=\"list-group\">
                ";
        // line 26
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable(($context["questions"] ?? null));
        foreach ($context['_seq'] as $context["_key"] => $context["question"]) {
            // line 27
            echo "                    <li class=\"list-group-item d-flex ustify-content-between align-items-center\">
                        ";
            // line 28
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["question"], "content", [], "any", false, false, false, 28), "html", null, true);
            echo "
                        <div class=\"btn-group\" role=\"group\">
                            <a type=\"button\" href=\"/admin/questions/updatemodal/";
            // line 30
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["question"], "id", [], "any", false, false, false, 30), "html", null, true);
            echo "\"  class=\"btn btn-primary\">Modifier</a>
                            <a type=\"button\" href=\"/admin/questions/delete/";
            // line 31
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["question"], "id", [], "any", false, false, false, 31), "html", null, true);
            echo "\" class=\"btn btn-danger\">Supprimer</a>
                        </div>
                    </li>
                ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['question'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 35
        echo "            </ul>
        </div>
        <div class=\"container mt-3\">
            <button type=\"button\" class=\"btn btn-primary\" data-bs-toggle=\"modal\" data-bs-target=\"#modalquestions\">Ajouter un chapitre</button>
            <div class=\"btn-group\" role=\"group\">
                <a href=\"/admin/administrators\" class=\"btn btn-secondary\">D</a>
                <a href=\"/\" class=\"btn btn-secondary\">Retour</a>
                <a href=\"/admin/questions\" class=\"btn btn-secondary\">G</a>
            </div>
        </div>

        <script src=\"https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js\"></script>

        <div class=\"modal fade\" id=\"modalquestions\">
            <div class=\"modal-dialog\" role=\"document\">
                <div class=\"modal-content\">
                    <div class=\"modal-header\">
                        <h5 class=\"modal-title\" id=\"exampleModalLabel\">Ajouter un chapitre</h5>
                    </div>
                    <form method=\"POST\" action=\"/admin/questions/add\">
                        <div class=\"modal-body\">
                            <div class=\"form-group\">
                                <label for=\"name\">Contenu de la question :</label>
                                <input type=\"text\" class=\"form-control\" id=\"content\" name=\"content\">
                            </div>
                            <div class=\"form-group\">
                                <label for=\"name\">Chapitre de la question :</label>
                                <select class=\"form-control\" id=\"idChapter\" name=\"idChapter\">
                                    ";
        // line 63
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable(($context["chapters"] ?? null));
        foreach ($context['_seq'] as $context["_key"] => $context["chapter"]) {
            // line 64
            echo "                                    <option value=\"";
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["chapter"], "id", [], "any", false, false, false, 64), "html", null, true);
            echo "\" >";
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["chapter"], "name", [], "any", false, false, false, 64), "html", null, true);
            echo "</option>
                                    ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['chapter'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 66
        echo "                                </select>
                            </div>
                            <div class=\"form-group\">
                                <label for=\"name\">Réponse 1 de la question :</label>
                                <input type=\"text\" class=\"form-control\" id=\"answer1\" name=\"answer1\">
                                <input type=\"radio\" name=\"correctAnswer\" checked=\"checked\" value=\"1\"> Correct
                            </div>
                            <div class=\"form-group\">
                                <label for=\"name\">Réponse 2 de la question :</label>
                                <input type=\"text\" class=\"form-control\" id=\"answer2\" name=\"answer2\">
                                <input type=\"radio\" name=\"correctAnswer\" value=\"2\"> Correct
                            </div>
                            <div class=\"form-group\">
                                <label for=\"name\">Réponse 3 de la question :</label>
                                <input type=\"text\" class=\"form-control\" id=\"answer3\" name=\"answer3\">
                                <input type=\"radio\" name=\"correctAnswer\" value=\"3\"> Correct
                            </div>
                            <div class=\"form-group\">
                                <label for=\"name\">Réponse 4 de la question :</label>
                                <input type=\"text\" class=\"form-control\" id=\"answer4\" name=\"answer4\">
                                <input type=\"radio\" name=\"correctAnswer\" value=\"4\"> Correct
                            </div>
                        </div>
                        <div class=\"modal-footer\">
                            <button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Fermer</button>
                            <button type=\"submit\" class=\"btn btn-primary\">Enregistrer</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </body>
</html>
";
    }

    public function getTemplateName()
    {
        return "adminQuestions.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  135 => 66,  124 => 64,  120 => 63,  90 => 35,  80 => 31,  76 => 30,  71 => 28,  68 => 27,  64 => 26,  37 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("", "adminQuestions.twig", "C:\\MAMP\\htdocs\\3.01-QCM_MuscuMaths\\Website\\templates\\adminQuestions.twig");
    }
}
