<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
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;
use Twig\TemplateWrapper;
/* classroom/show.html.twig */
class __TwigTemplate_0c035c967b72fb6156d097bb36f556af extends Template
{
private Source $source;
/**
* @var array<string, Template>
*/
private array $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'content' => [$this, 'block_content'],
'javascripts' => [$this, 'block_javascripts'],
];
}
protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
{
// line 1
return "layout/backEndLayout.html.twig";
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "classroom/show.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "classroom/show.html.twig"));
$this->parent = $this->load("layout/backEndLayout.html.twig", 1);
yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 3
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_content(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
// line 4
yield "
<div class=\"row mt-4\">
<div class=\"col-1 mar-bot30\">
";
// line 7
if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 8
yield " <a class=\"btn btn-info\" href=\"";
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_classrooms_new");
yield "\">
<i class=\"fa fa-plus\"></i>
</a>
";
}
// line 12
yield " </div>
</div>
<div class=\"col-11 jumbotron\">
<article class=\"p-3\">
<table class=\"table table-hover record_properties center\">
<tbody>
<tr>
<th scope=\"row\">
Nom
</th>
<td>
";
// line 26
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["classroom"]) || array_key_exists("classroom", $context) ? $context["classroom"] : (function () { throw new RuntimeError('Variable "classroom" does not exist.', 26, $this->source); })()), "name", [], "any", false, false, false, 26), "html", null, true);
yield "
</td>
</tr>
<tr>
<th scope=\"row\">
Niveau
</th>
<td>
";
// line 34
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["classroom"]) || array_key_exists("classroom", $context) ? $context["classroom"] : (function () { throw new RuntimeError('Variable "classroom" does not exist.', 34, $this->source); })()), "level", [], "any", false, false, false, 34), "html", null, true);
yield "
</td>
</tr>
<tr>
<th scope=\"row\">
Titulaire
</th>
<td>
";
// line 42
if ((null === (isset($context["mainteacher"]) || array_key_exists("mainteacher", $context) ? $context["mainteacher"] : (function () { throw new RuntimeError('Variable "mainteacher" does not exist.', 42, $this->source); })()))) {
// line 43
yield "
";
} else {
// line 45
yield " ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["mainteacher"]) || array_key_exists("mainteacher", $context) ? $context["mainteacher"] : (function () { throw new RuntimeError('Variable "mainteacher" does not exist.', 45, $this->source); })()), "fullName", [], "any", false, false, false, 45), "html", null, true);
yield "
";
}
// line 47
yield "
</td>
</tr>
<tr>
<th scope=\"row\">
Classe d'examen
</th>
<td>
";
// line 55
if ((CoreExtension::getAttribute($this->env, $this->source, (isset($context["classroom"]) || array_key_exists("classroom", $context) ? $context["classroom"] : (function () { throw new RuntimeError('Variable "classroom" does not exist.', 55, $this->source); })()), "apc", [], "any", false, false, false, 55) == true)) {
// line 56
yield " OUI
";
} else {
// line 58
yield " NON
";
}
// line 60
yield " </td>
</tr>
</tbody>
</table>
<div class=\"btn-group record_actions\">
<a class=\"btn btn-info\" href=\"";
// line 67
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_classrooms");
yield "\">
<i class=\"fa fa-list\"></i>
</a>
";
// line 71
if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 72
yield " <a class=\"btn btn-primary\" href=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_classrooms_edit", ["id" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["classroom"]) || array_key_exists("classroom", $context) ? $context["classroom"] : (function () { throw new RuntimeError('Variable "classroom" does not exist.', 72, $this->source); })()), "id", [], "any", false, false, false, 72)]), "html", null, true);
yield "\">
<i class=\"fa fa-edit\"></i>
</a>
<a target=\"_blank\" class=\"btn btn-file\" id=\"recap_seq\" data-toggle=\"modal\" data-target=\"#form_modal_courses\" data-action=\"";
// line 77
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_classrooms_recapitulatif_seq", ["id" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["classroom"]) || array_key_exists("classroom", $context) ? $context["classroom"] : (function () { throw new RuntimeError('Variable "classroom" does not exist.', 77, $this->source); })()), "id", [], "any", false, false, false, 77)]), "html", null, true);
yield "\">
<i class=\"fa fa-file-pdf-o\"></i>
Recap. Seq
</a>
<a target=\"_blank\" class=\"btn btn-warning\" href=\"";
// line 82
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_classrooms_reportcards_seq", ["id" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["classroom"]) || array_key_exists("classroom", $context) ? $context["classroom"] : (function () { throw new RuntimeError('Variable "classroom" does not exist.', 82, $this->source); })()), "id", [], "any", false, false, false, 82)]), "html", null, true);
yield "\">
<i class=\"fa fa-file\"></i>
Bull Seq
</a>
<a target=\"_blank\" class=\"btn btn-file\" data-toggle=\"modal\" id=\"bull_trim\" data-target=\"#form_modal_reportcard_params\" data-action=\"";
// line 87
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_classrooms_reportcards_trim_2024", ["id" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["classroom"]) || array_key_exists("classroom", $context) ? $context["classroom"] : (function () { throw new RuntimeError('Variable "classroom" does not exist.', 87, $this->source); })()), "id", [], "any", false, false, false, 87)]), "html", null, true);
yield "\">
<i class=\"fa fa-file\"></i>
Bull Trim
</a>
<a target=\"_blank\" class=\"btn btn-outline-info\" id=\"bull_ann\" data-toggle=\"modal\" data-target=\"#form_modal_reportcard_params\" data-action=\"";
// line 91
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_class_reportcards_year_2024", ["id" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["classroom"]) || array_key_exists("classroom", $context) ? $context["classroom"] : (function () { throw new RuntimeError('Variable "classroom" does not exist.', 91, $this->source); })()), "id", [], "any", false, false, false, 91)]), "html", null, true);
yield "\" >
<i class=\"fa fa-file-pdf-o\"></i>
Bull Ann
</a>
<a target=\"_blank\" class=\"btn btn-outline-warning\" id=\"recap_trim\" data-toggle=\"modal\" data-target=\"#form_modal_courses\" data-action=\"";
// line 95
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_classrooms_recapitulatif_trim", ["id" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["classroom"]) || array_key_exists("classroom", $context) ? $context["classroom"] : (function () { throw new RuntimeError('Variable "classroom" does not exist.', 95, $this->source); })()), "id", [], "any", false, false, false, 95)]), "html", null, true);
yield "\" >
<i class=\"fa fa-file-pdf-o\"></i>
Recap Trim
</a>
<a target=\"_blank\" class=\"btn btn-outline-success\" id=\"recap_trim_excel\" data-toggle=\"modal\" data-target=\"#form_modal_courses\" data-action=\"";
// line 100
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_classrooms_recapitulatif_ann_excel", ["id" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["classroom"]) || array_key_exists("classroom", $context) ? $context["classroom"] : (function () { throw new RuntimeError('Variable "classroom" does not exist.', 100, $this->source); })()), "id", [], "any", false, false, false, 100)]), "html", null, true);
yield "\" >
<i class=\"fa fa-file-excel-o\"></i>
Recap Ann
</a>
<a target=\"_blank\" class=\"btn btn-file\" href=\"";
// line 105
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_class_reportcards_apc_year", ["id" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["classroom"]) || array_key_exists("classroom", $context) ? $context["classroom"] : (function () { throw new RuntimeError('Variable "classroom" does not exist.', 105, $this->source); })()), "id", [], "any", false, false, false, 105)]), "html", null, true);
yield "\">
<i class=\"fa fa-file\"></i>
Bull Ann V1
</a>
<button class=\"btn btn-danger\" type=\"submit\">
<i class=\"fa fa-trash-o\"></i>
</button>
";
}
// line 117
yield " </div>
<div class=\"card-header text-center\">
<h2>
Liste des élèves incrits dans la classe
</h2>
</div>
<table class=\"table table-striped table-hover table-bordered records_list center\">
<thead>
<tr>
<th scope=\"col\">
Matricule
</th>
<th scope=\"col\">
Nom
</th>
<th scope=\"col\">
Prénom
</th>
<th scope=\"col\">
Photo
</th>
<th scope=\"col\">
Action
</th>
</tr>
</thead>
<tbody>
";
// line 145
$context["effectif"] = 0;
// line 146
yield " ";
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["studentEnrolled"]) || array_key_exists("studentEnrolled", $context) ? $context["studentEnrolled"] : (function () { throw new RuntimeError('Variable "studentEnrolled" does not exist.', 146, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["std"]) {
// line 147
yield " <tr>
<td>
<a href=\"";
// line 149
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_students_show", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["std"], "id", [], "any", false, false, false, 149)]), "html", null, true);
yield "\">
";
// line 150
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["std"], "matricule", [], "any", false, false, false, 150), "html", null, true);
yield "
</a>
</td>
<td>
";
// line 154
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["std"], "lastname", [], "any", false, false, false, 154), "html", null, true);
yield "
</td>
<td>
";
// line 157
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["std"], "firstname", [], "any", false, false, false, 157), "html", null, true);
yield "
</td>
<td>
";
// line 160
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["fileExists"]) || array_key_exists("fileExists", $context) ? $context["fileExists"] : (function () { throw new RuntimeError('Variable "fileExists" does not exist.', 160, $this->source); })()), CoreExtension::getAttribute($this->env, $this->source, $context["std"], "id", [], "any", false, false, false, 160), [], "array", false, false, false, 160), "html", null, true);
yield "
</td>
<td>
";
// line 163
if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 164
yield " <a class=\"btn btn-outline-danger\" href=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_students_unregister", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["std"], "id", [], "any", false, false, false, 164), "room_id" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["classroom"]) || array_key_exists("classroom", $context) ? $context["classroom"] : (function () { throw new RuntimeError('Variable "classroom" does not exist.', 164, $this->source); })()), "id", [], "any", false, false, false, 164)]), "html", null, true);
yield "\">
<i class=\"fa fa-ban\"></i>
</a>
<a class=\"btn btn-outline-warning\" href=\"";
// line 167
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_students_edit", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["std"], "id", [], "any", false, false, false, 167)]), "html", null, true);
yield "\">
<i class=\"fa fa-pencil-square-o\" aria-hidden=\"true\"></i>
</a>
";
}
// line 171
yield "
</td>
";
// line 173
$context["effectif"] = ((isset($context["effectif"]) || array_key_exists("effectif", $context) ? $context["effectif"] : (function () { throw new RuntimeError('Variable "effectif" does not exist.', 173, $this->source); })()) + 1);
// line 174
yield "
</tr>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['std'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 178
yield " <tr>
<td class=\"center\" colspan=\"2\">
Effectif
</td>
<td>
";
// line 183
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["effectif"]) || array_key_exists("effectif", $context) ? $context["effectif"] : (function () { throw new RuntimeError('Variable "effectif" does not exist.', 183, $this->source); })()), "html", null, true);
yield "
</td>
</tr>
</tbody>
</table>
<div class=\"card-header text-center\">
<h2>
Matières programmées dans la classe
</h2>
</div>
<table class=\"table table-striped table-hover table-bordered records_list center\">
<thead>
<tr>
<th scope=\"col\">
Module
</th>
<th scope=\"col\">
Code
</th>
<th scope=\"col\">
Intitulé
</th>
<th scope=\"col\">
Coef
</th>
<th scope=\"col\">
Enseignant
</th>
</tr>
</thead>
<tbody>
";
// line 218
$context["totalCoef"] = 0;
// line 219
yield " ";
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["modules"]) || array_key_exists("modules", $context) ? $context["modules"] : (function () { throw new RuntimeError('Variable "modules" does not exist.', 219, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["module"]) {
// line 220
yield " <tr>
";
// line 222
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, $context["module"], "courses", [], "any", false, false, false, 222));
foreach ($context['_seq'] as $context["_key"] => $context["course"]) {
// line 223
yield " <tr>
<td>
";
// line 225
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["module"], "name", [], "any", false, false, false, 225), "html", null, true);
yield "
</td>
<td>
<a href=\"";
// line 228
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_courses_show", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["course"], "id", [], "any", false, false, false, 228)]), "html", null, true);
yield "\">
";
// line 229
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["course"], "code", [], "any", false, false, false, 229), "html", null, true);
yield "
</a>
</td>
<td>
";
// line 234
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["course"], "wording", [], "any", false, false, false, 234), "html", null, true);
yield "
</td>
<td>
";
// line 237
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["course"], "coefficient", [], "any", false, false, false, 237), "html", null, true);
yield "
</td>
<td>
";
// line 241
if (CoreExtension::getAttribute($this->env, $this->source, ($context["attributions"] ?? null), CoreExtension::getAttribute($this->env, $this->source, $context["course"], "id", [], "any", false, false, false, 241), [], "array", true, true, false, 241)) {
// line 242
yield " ";
if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 243
yield " <a href=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_attributions_edit", ["id" => CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["attributions"]) || array_key_exists("attributions", $context) ? $context["attributions"] : (function () { throw new RuntimeError('Variable "attributions" does not exist.', 243, $this->source); })()), CoreExtension::getAttribute($this->env, $this->source, $context["course"], "id", [], "any", false, false, false, 243), [], "array", false, false, false, 243), "id", [], "any", false, false, false, 243)]), "html", null, true);
yield "\">
";
// line 244
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["attributions"]) || array_key_exists("attributions", $context) ? $context["attributions"] : (function () { throw new RuntimeError('Variable "attributions" does not exist.', 244, $this->source); })()), CoreExtension::getAttribute($this->env, $this->source, $context["course"], "id", [], "any", false, false, false, 244), [], "array", false, false, false, 244), "teacher", [], "any", false, false, false, 244), "fullName", [], "any", false, false, false, 244), "html", null, true);
yield "
</a>
";
} else {
// line 247
yield " ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["attributions"]) || array_key_exists("attributions", $context) ? $context["attributions"] : (function () { throw new RuntimeError('Variable "attributions" does not exist.', 247, $this->source); })()), CoreExtension::getAttribute($this->env, $this->source, $context["course"], "id", [], "any", false, false, false, 247), [], "array", false, false, false, 247), "teacher", [], "any", false, false, false, 247), "fullName", [], "any", false, false, false, 247), "html", null, true);
yield "
";
}
// line 249
yield " ";
} else {
// line 250
yield " ";
if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 251
yield " <a href=\"";
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_attributions_new");
yield "\">
Pas encore attribue
</a>
";
}
// line 255
yield " ";
}
// line 256
yield "
</td>
";
// line 258
$context["totalCoef"] = ((isset($context["totalCoef"]) || array_key_exists("totalCoef", $context) ? $context["totalCoef"] : (function () { throw new RuntimeError('Variable "totalCoef" does not exist.', 258, $this->source); })()) + CoreExtension::getAttribute($this->env, $this->source, $context["course"], "coefficient", [], "any", false, false, false, 258));
// line 259
yield " </tr>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['course'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 261
yield "
</tr>
<tr>
<td class=\"center\" colspan=\"3\">
total cumul coef
</td>
<td>
";
// line 268
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["totalCoef"]) || array_key_exists("totalCoef", $context) ? $context["totalCoef"] : (function () { throw new RuntimeError('Variable "totalCoef" does not exist.', 268, $this->source); })()), "html", null, true);
yield "
</td>
</tr>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['module'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 272
yield "
</tbody>
</table>
</article>
<section id=\"graphs\">
<article class=\"p-3\">
<canvas id=\"schoolPerformanceGraph\" width=\"700\" height=\"250\"></canvas>
</article>
";
// line 280
if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, (isset($context["classroom"]) || array_key_exists("classroom", $context) ? $context["classroom"] : (function () { throw new RuntimeError('Variable "classroom" does not exist.', 280, $this->source); })()), "apc", [], "any", false, false, false, 280)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 281
yield " <article class=\"p-3\">
<canvas id=\"officialExamsGraph\" width=\"200\" height=\"220\" ></canvas>
</article>
";
}
// line 285
yield " </section>
</div>
</div>
<!-- Modal pour le choix de cours qui vont figurer dans le recaputulatif sequentiel -->
<div class=\"modal fade\" id=\"form_modal_courses\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"exampleModalLabel\" aria-hidden=\"true\">
<div class=\"modal-dialog modal-dialog-centered\" role=\"document\">
<div class=\"modal-content\">
<div class=\"modal-header border-bottom-0\">
<h5 class=\"modal-title\" id=\"exampleModalLabel\">Choisir les cours a qui doivent figurer dans le recapitulatif</h5>
<button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">
<span aria-hidden=\"true\">×</span>
</button>
</div>
<form action=\"#\" method=\"post\">
<div class=\"modal-body\">
<div class=\"form-group\">
";
// line 302
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["modules"]) || array_key_exists("modules", $context) ? $context["modules"] : (function () { throw new RuntimeError('Variable "modules" does not exist.', 302, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["module"]) {
// line 303
yield " ";
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, $context["module"], "courses", [], "any", false, false, false, 303));
foreach ($context['_seq'] as $context["_key"] => $context["course"]) {
// line 304
yield " <li class=\"list-group-item\">
<input class=\"form-check-input me-1\" type=\"checkbox\" checked name=\"selected_courses[]\" value=";
// line 305
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["course"], "id", [], "any", false, false, false, 305), "html", null, true);
yield " >
";
// line 306
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["course"], "wording", [], "any", false, false, false, 306), "html", null, true);
yield "
</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['course'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 309
yield " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['module'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 310
yield " </div>
</div>
<div class=\"modal-footer border-top-0 d-flex justify-content-center\">
<button type=\"submit\" class=\"btn btn-success\">Submit</button>
</div>
</form>
</div>
</div>
</div>
<!-- Modal pour le parametrage de la presentation des bulletins. -->
<div class=\"modal fade\" id=\"form_modal_reportcard_params\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"exampleModalRange\" aria-hidden=\"true\">
<div class=\"modal-dialog modal-dialog-centered\" role=\"document\">
<div class=\"modal-content\">
<div class=\"modal-header border-bottom-0\">
<h5 class=\"modal-title\" id=\"exampleModalLabel\">Reajuster les parametres de production des bulletins</h5>
<button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">
<span aria-hidden=\"true\">×</span>
</button>
</div>
<form method=\"post\">
<div class=\"modal-body\">
<div class=\"form-group\">
<label for=\"header_font_size\">Taille de des caracteres dans l entete</label>
<input type=\"range\" class=\"form-control\" name=\"header_font_size\" id=\"header_font_size\" min=\"1\" max=\"1.6\" step=\"0.01\">
</div>
<div class=\"form-group\">
<label for=\"line_height\">Hauteur des lignes dans le tableau</label>
<input type=\"range\" class=\"form-control\" name=\"line_height\" id=\"line_height\" min=\"0.5\" max=\"1.5\" step=\"0.01\">
</div>
<div class=\"form-check\">
<input class=\"form-check-input\" type=\"checkbox\" id=\"copyright\" name=\"copyright\">
<label class=\"form-check-label\" for=\"copyright\">
Ajout du copyright en pied du bulletin?
</label>
</div>
<div class=\"form-check\">
<input class=\"form-check-input\" type=\"checkbox\" id=\"reverse\" name=\"reverse\">
<label class=\"form-check-label\" for=\"reverse\">
Sens inverse
</label>
</div>
</div>
<div class=\"modal-footer border-top-0 d-flex justify-content-center\">
<button type=\"submit\" class=\"btn btn-success\">Submit</button>
</div>
</form>
</div>
</div>
</div>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 364
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_javascripts(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
// line 365
yield " ";
yield from $this->yieldParentBlock("javascripts", $context, $blocks);
yield "
<script type=\"text/javascript\">
// Attendre que le DOM soit complètement chargé
\$(document).ready(function() {
// Modal pour les cours
\$('#form_modal_courses').on('show.bs.modal', function(event) {
var button = \$(event.relatedTarget);
var actionUrl = button.data('action');
\$('#form_modal_courses form').attr('action', actionUrl);
});
// Modal pour les paramètres
\$('[data-toggle=\"modal\"]').on('click', function () {
var actionUrl = \$(this).data('action');
console.log(actionUrl);
\$('#form_modal_reportcard_params form').attr('action', actionUrl);
});
});
</script>
<script type=\"text/javascript\">
// Fonction pour générer une couleur aléatoire
const randomRgbColor = () => {
let r = Math.floor(Math.random() * 256);
let g = Math.floor(Math.random() * 256);
let b = Math.floor(Math.random() * 256);
return 'rgb(' + r + ',' + g + ',' + b + ')';
};
// Initialisation des graphiques après chargement du DOM
document.addEventListener('DOMContentLoaded', function() {
// Graphique des performances scolaires
const schoolPerformanceCanvas = document.getElementById(\"schoolPerformanceGraph\");
if (schoolPerformanceCanvas) {
// Détruire le graphique existant s'il existe
const existingChart = Chart.getChart(schoolPerformanceCanvas);
if (existingChart) {
existingChart.destroy();
}
const datasets = [];
";
// line 410
if (array_key_exists("session1", $context)) {
// line 411
yield " datasets.push({
label: \"Session 1\",
data: ";
// line 413
yield (isset($context["session1"]) || array_key_exists("session1", $context) ? $context["session1"] : (function () { throw new RuntimeError('Variable "session1" does not exist.', 413, $this->source); })());
yield ",
fill: false,
backgroundColor: randomRgbColor()
});
";
}
// line 418
yield "
";
// line 419
if (array_key_exists("session2", $context)) {
// line 420
yield " datasets.push({
label: \"Session 2\",
data: ";
// line 422
yield (isset($context["session2"]) || array_key_exists("session2", $context) ? $context["session2"] : (function () { throw new RuntimeError('Variable "session2" does not exist.', 422, $this->source); })());
yield ",
fill: false,
backgroundColor: randomRgbColor()
});
";
}
// line 427
yield "
";
// line 428
if (array_key_exists("session3", $context)) {
// line 429
yield " datasets.push({
label: \"Session 3\",
data: ";
// line 431
yield (isset($context["session3"]) || array_key_exists("session3", $context) ? $context["session3"] : (function () { throw new RuntimeError('Variable "session3" does not exist.', 431, $this->source); })());
yield ",
fill: false,
backgroundColor: randomRgbColor()
});
";
}
// line 436
yield "
";
// line 437
if (array_key_exists("session4", $context)) {
// line 438
yield " datasets.push({
label: \"Session 4\",
data: ";
// line 440
yield (isset($context["session4"]) || array_key_exists("session4", $context) ? $context["session4"] : (function () { throw new RuntimeError('Variable "session4" does not exist.', 440, $this->source); })());
yield ",
fill: false,
backgroundColor: randomRgbColor()
});
";
}
// line 445
yield "
";
// line 446
if (array_key_exists("session5", $context)) {
// line 447
yield " datasets.push({
label: \"Session 5\",
data: ";
// line 449
yield (isset($context["session5"]) || array_key_exists("session5", $context) ? $context["session5"] : (function () { throw new RuntimeError('Variable "session5" does not exist.', 449, $this->source); })());
yield ",
fill: false,
backgroundColor: randomRgbColor()
});
";
}
// line 454
yield "
";
// line 455
if (array_key_exists("session6", $context)) {
// line 456
yield " datasets.push({
label: \"Session 6\",
data: ";
// line 458
yield (isset($context["session6"]) || array_key_exists("session6", $context) ? $context["session6"] : (function () { throw new RuntimeError('Variable "session6" does not exist.', 458, $this->source); })());
yield ",
fill: false,
backgroundColor: randomRgbColor()
});
";
}
// line 463
yield "
// Créer le graphique seulement si on a des données
if (datasets.length > 0) {
new Chart(schoolPerformanceCanvas.getContext('2d'), {
type: \"bar\",
data: {
labels: ";
// line 469
yield (isset($context["cours"]) || array_key_exists("cours", $context) ? $context["cours"] : (function () { throw new RuntimeError('Variable "cours" does not exist.', 469, $this->source); })());
yield ",
datasets: datasets,
},
options: {
responsive: true,
plugins: {
title: {
display: true,
text: 'Performances générales annuelles',
font: {
size: 24,
style: 'bold',
family: 'Helvetica Neue',
},
position: 'bottom',
}
}
}
});
}
}
// Graphique des examens officiels
initOfficialExamsChart();
});
// Fonction pour initialiser le graphique des examens officiels
function initOfficialExamsChart() {
const canvas = document.getElementById('officialExamsGraph');
// Vérifier si le canvas existe
if (!canvas) {
return;
}
// Détruire le graphique existant s'il existe
const existingChart = Chart.getChart(canvas);
if (existingChart) {
existingChart.destroy();
}
const mentionCountCategories = ";
// line 510
yield (isset($context["mentionCountCategories"]) || array_key_exists("mentionCountCategories", $context) ? $context["mentionCountCategories"] : (function () { throw new RuntimeError('Variable "mentionCountCategories" does not exist.', 510, $this->source); })());
yield ";
// Vérifier si on a des données
if (!mentionCountCategories || mentionCountCategories.length === 0) {
return;
}
const colors = mentionCountCategories.map(() => randomRgbColor());
new Chart(canvas.getContext('2d'), {
type: 'pie',
data: {
labels: ";
// line 522
yield (isset($context["mentionCategories"]) || array_key_exists("mentionCategories", $context) ? $context["mentionCategories"] : (function () { throw new RuntimeError('Variable "mentionCategories" does not exist.', 522, $this->source); })());
yield ",
datasets: [{
data: mentionCountCategories,
backgroundColor: colors
}]
},
options: {
responsive: true,
plugins: {
title: {
display: true,
text: 'Résultats aux examens officiels',
position: 'bottom',
font: {
size: 24,
family: 'Helvetica Neue'
}
}
}
}
});
}
</script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "classroom/show.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 876 => 522, 861 => 510, 817 => 469, 809 => 463, 801 => 458, 797 => 456, 795 => 455, 792 => 454, 784 => 449, 780 => 447, 778 => 446, 775 => 445, 767 => 440, 763 => 438, 761 => 437, 758 => 436, 750 => 431, 746 => 429, 744 => 428, 741 => 427, 733 => 422, 729 => 420, 727 => 419, 724 => 418, 716 => 413, 712 => 411, 710 => 410, 661 => 365, 648 => 364, 585 => 310, 579 => 309, 570 => 306, 566 => 305, 563 => 304, 558 => 303, 554 => 302, 535 => 285, 529 => 281, 527 => 280, 517 => 272, 507 => 268, 498 => 261, 491 => 259, 489 => 258, 485 => 256, 482 => 255, 474 => 251, 471 => 250, 468 => 249, 462 => 247, 456 => 244, 451 => 243, 448 => 242, 446 => 241, 439 => 237, 433 => 234, 425 => 229, 421 => 228, 415 => 225, 411 => 223, 407 => 222, 403 => 220, 398 => 219, 396 => 218, 358 => 183, 351 => 178, 342 => 174, 340 => 173, 336 => 171, 329 => 167, 322 => 164, 320 => 163, 314 => 160, 308 => 157, 302 => 154, 295 => 150, 291 => 149, 287 => 147, 282 => 146, 280 => 145, 250 => 117, 235 => 105, 227 => 100, 219 => 95, 212 => 91, 205 => 87, 197 => 82, 189 => 77, 180 => 72, 178 => 71, 171 => 67, 162 => 60, 158 => 58, 154 => 56, 152 => 55, 142 => 47, 136 => 45, 132 => 43, 130 => 42, 119 => 34, 108 => 26, 92 => 12, 84 => 8, 82 => 7, 77 => 4, 64 => 3, 41 => 1,);
}
public function getSourceContext(): Source
{
return new Source("{% extends \"layout/backEndLayout.html.twig\" %}
{% block content %}
<div class=\"row mt-4\">
<div class=\"col-1 mar-bot30\">
{% if is_granted('ROLE_ADMIN') %}
<a class=\"btn btn-info\" href=\"{{ path('admin_classrooms_new') }}\">
<i class=\"fa fa-plus\"></i>
</a>
{% endif %}
</div>
</div>
<div class=\"col-11 jumbotron\">
<article class=\"p-3\">
<table class=\"table table-hover record_properties center\">
<tbody>
<tr>
<th scope=\"row\">
Nom
</th>
<td>
{{ classroom.name }}
</td>
</tr>
<tr>
<th scope=\"row\">
Niveau
</th>
<td>
{{ classroom.level }}
</td>
</tr>
<tr>
<th scope=\"row\">
Titulaire
</th>
<td>
{% if mainteacher is null %}
{% else %}
{{mainteacher.fullName}}
{% endif %}
</td>
</tr>
<tr>
<th scope=\"row\">
Classe d'examen
</th>
<td>
{% if (classroom.apc == true) %}
OUI
{% else %}
NON
{% endif %}
</td>
</tr>
</tbody>
</table>
<div class=\"btn-group record_actions\">
<a class=\"btn btn-info\" href=\"{{ path('admin_classrooms') }}\">
<i class=\"fa fa-list\"></i>
</a>
{% if is_granted('ROLE_ADMIN') %}
<a class=\"btn btn-primary\" href=\"{{ path('admin_classrooms_edit', {id: classroom.id}) }}\">
<i class=\"fa fa-edit\"></i>
</a>
<a target=\"_blank\" class=\"btn btn-file\" id=\"recap_seq\" data-toggle=\"modal\" data-target=\"#form_modal_courses\" data-action=\"{{ path('admin_classrooms_recapitulatif_seq', {'id':classroom.id}) }}\">
<i class=\"fa fa-file-pdf-o\"></i>
Recap. Seq
</a>
<a target=\"_blank\" class=\"btn btn-warning\" href=\"{{ path('admin_classrooms_reportcards_seq', {id: classroom.id}) }}\">
<i class=\"fa fa-file\"></i>
Bull Seq
</a>
<a target=\"_blank\" class=\"btn btn-file\" data-toggle=\"modal\" id=\"bull_trim\" data-target=\"#form_modal_reportcard_params\" data-action=\"{{ path('admin_classrooms_reportcards_trim_2024', {'id':classroom.id}) }}\">
<i class=\"fa fa-file\"></i>
Bull Trim
</a>
<a target=\"_blank\" class=\"btn btn-outline-info\" id=\"bull_ann\" data-toggle=\"modal\" data-target=\"#form_modal_reportcard_params\" data-action=\"{{ path('admin_class_reportcards_year_2024', {'id': classroom.id}) }}\" >
<i class=\"fa fa-file-pdf-o\"></i>
Bull Ann
</a>
<a target=\"_blank\" class=\"btn btn-outline-warning\" id=\"recap_trim\" data-toggle=\"modal\" data-target=\"#form_modal_courses\" data-action=\"{{ path('admin_classrooms_recapitulatif_trim', {id: classroom.id}) }}\" >
<i class=\"fa fa-file-pdf-o\"></i>
Recap Trim
</a>
<a target=\"_blank\" class=\"btn btn-outline-success\" id=\"recap_trim_excel\" data-toggle=\"modal\" data-target=\"#form_modal_courses\" data-action=\"{{ path('admin_classrooms_recapitulatif_ann_excel', {id: classroom.id}) }}\" >
<i class=\"fa fa-file-excel-o\"></i>
Recap Ann
</a>
<a target=\"_blank\" class=\"btn btn-file\" href=\"{{ path('admin_class_reportcards_apc_year', {id: classroom.id}) }}\">
<i class=\"fa fa-file\"></i>
Bull Ann V1
</a>
<button class=\"btn btn-danger\" type=\"submit\">
<i class=\"fa fa-trash-o\"></i>
</button>
{% endif %}
</div>
<div class=\"card-header text-center\">
<h2>
Liste des élèves incrits dans la classe
</h2>
</div>
<table class=\"table table-striped table-hover table-bordered records_list center\">
<thead>
<tr>
<th scope=\"col\">
Matricule
</th>
<th scope=\"col\">
Nom
</th>
<th scope=\"col\">
Prénom
</th>
<th scope=\"col\">
Photo
</th>
<th scope=\"col\">
Action
</th>
</tr>
</thead>
<tbody>
{% set effectif =0 %}
{% for std in studentEnrolled %}
<tr>
<td>
<a href=\"{{ path('admin_students_show', {id: std.id}) }}\">
{{ std.matricule }}
</a>
</td>
<td>
{{ std.lastname }}
</td>
<td>
{{ std.firstname }}
</td>
<td>
{{ fileExists[std.id] }}
</td>
<td>
{% if is_granted('ROLE_ADMIN') %}
<a class=\"btn btn-outline-danger\" href=\"{{ path('admin_students_unregister', {id: std.id, room_id:classroom.id}) }}\">
<i class=\"fa fa-ban\"></i>
</a>
<a class=\"btn btn-outline-warning\" href=\"{{ path('admin_students_edit', {id: std.id}) }}\">
<i class=\"fa fa-pencil-square-o\" aria-hidden=\"true\"></i>
</a>
{% endif %}
</td>
{% set effectif = effectif + 1 %}
</tr>
{% endfor %}
<tr>
<td class=\"center\" colspan=\"2\">
Effectif
</td>
<td>
{{ effectif }}
</td>
</tr>
</tbody>
</table>
<div class=\"card-header text-center\">
<h2>
Matières programmées dans la classe
</h2>
</div>
<table class=\"table table-striped table-hover table-bordered records_list center\">
<thead>
<tr>
<th scope=\"col\">
Module
</th>
<th scope=\"col\">
Code
</th>
<th scope=\"col\">
Intitulé
</th>
<th scope=\"col\">
Coef
</th>
<th scope=\"col\">
Enseignant
</th>
</tr>
</thead>
<tbody>
{% set totalCoef =0 %}
{% for module in modules %}
<tr>
{% for course in module.courses %}
<tr>
<td>
{{ module.name }}
</td>
<td>
<a href=\"{{ path('admin_courses_show', {id: course.id}) }}\">
{{ course.code }}
</a>
</td>
<td>
{{ course.wording }}
</td>
<td>
{{ course.coefficient }}
</td>
<td>
{% if attributions[course.id] is defined %}
{% if is_granted('ROLE_ADMIN') %}
<a href=\"{{ path('admin_attributions_edit', {id: attributions[course.id].id}) }}\">
{{attributions[course.id].teacher.fullName}}
</a>
{% else %}
{{attributions[course.id].teacher.fullName}}
{% endif %}
{% else %}
{% if is_granted('ROLE_ADMIN') %}
<a href=\"{{ path('admin_attributions_new') }}\">
Pas encore attribue
</a>
{% endif %}
{% endif %}
</td>
{% set totalCoef = totalCoef+course.coefficient %}
</tr>
{% endfor %}
</tr>
<tr>
<td class=\"center\" colspan=\"3\">
total cumul coef
</td>
<td>
{{ totalCoef }}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</article>
<section id=\"graphs\">
<article class=\"p-3\">
<canvas id=\"schoolPerformanceGraph\" width=\"700\" height=\"250\"></canvas>
</article>
{% if classroom.apc %}
<article class=\"p-3\">
<canvas id=\"officialExamsGraph\" width=\"200\" height=\"220\" ></canvas>
</article>
{% endif %}
</section>
</div>
</div>
<!-- Modal pour le choix de cours qui vont figurer dans le recaputulatif sequentiel -->
<div class=\"modal fade\" id=\"form_modal_courses\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"exampleModalLabel\" aria-hidden=\"true\">
<div class=\"modal-dialog modal-dialog-centered\" role=\"document\">
<div class=\"modal-content\">
<div class=\"modal-header border-bottom-0\">
<h5 class=\"modal-title\" id=\"exampleModalLabel\">Choisir les cours a qui doivent figurer dans le recapitulatif</h5>
<button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">
<span aria-hidden=\"true\">×</span>
</button>
</div>
<form action=\"#\" method=\"post\">
<div class=\"modal-body\">
<div class=\"form-group\">
{% for module in modules %}
{% for course in module.courses %}
<li class=\"list-group-item\">
<input class=\"form-check-input me-1\" type=\"checkbox\" checked name=\"selected_courses[]\" value={{course.id}} >
{{course.wording}}
</li>
{% endfor %}
{% endfor %}
</div>
</div>
<div class=\"modal-footer border-top-0 d-flex justify-content-center\">
<button type=\"submit\" class=\"btn btn-success\">Submit</button>
</div>
</form>
</div>
</div>
</div>
<!-- Modal pour le parametrage de la presentation des bulletins. -->
<div class=\"modal fade\" id=\"form_modal_reportcard_params\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"exampleModalRange\" aria-hidden=\"true\">
<div class=\"modal-dialog modal-dialog-centered\" role=\"document\">
<div class=\"modal-content\">
<div class=\"modal-header border-bottom-0\">
<h5 class=\"modal-title\" id=\"exampleModalLabel\">Reajuster les parametres de production des bulletins</h5>
<button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">
<span aria-hidden=\"true\">×</span>
</button>
</div>
<form method=\"post\">
<div class=\"modal-body\">
<div class=\"form-group\">
<label for=\"header_font_size\">Taille de des caracteres dans l entete</label>
<input type=\"range\" class=\"form-control\" name=\"header_font_size\" id=\"header_font_size\" min=\"1\" max=\"1.6\" step=\"0.01\">
</div>
<div class=\"form-group\">
<label for=\"line_height\">Hauteur des lignes dans le tableau</label>
<input type=\"range\" class=\"form-control\" name=\"line_height\" id=\"line_height\" min=\"0.5\" max=\"1.5\" step=\"0.01\">
</div>
<div class=\"form-check\">
<input class=\"form-check-input\" type=\"checkbox\" id=\"copyright\" name=\"copyright\">
<label class=\"form-check-label\" for=\"copyright\">
Ajout du copyright en pied du bulletin?
</label>
</div>
<div class=\"form-check\">
<input class=\"form-check-input\" type=\"checkbox\" id=\"reverse\" name=\"reverse\">
<label class=\"form-check-label\" for=\"reverse\">
Sens inverse
</label>
</div>
</div>
<div class=\"modal-footer border-top-0 d-flex justify-content-center\">
<button type=\"submit\" class=\"btn btn-success\">Submit</button>
</div>
</form>
</div>
</div>
</div>
{% endblock %}
{% block javascripts %}
{{ parent() }}
<script type=\"text/javascript\">
// Attendre que le DOM soit complètement chargé
\$(document).ready(function() {
// Modal pour les cours
\$('#form_modal_courses').on('show.bs.modal', function(event) {
var button = \$(event.relatedTarget);
var actionUrl = button.data('action');
\$('#form_modal_courses form').attr('action', actionUrl);
});
// Modal pour les paramètres
\$('[data-toggle=\"modal\"]').on('click', function () {
var actionUrl = \$(this).data('action');
console.log(actionUrl);
\$('#form_modal_reportcard_params form').attr('action', actionUrl);
});
});
</script>
<script type=\"text/javascript\">
// Fonction pour générer une couleur aléatoire
const randomRgbColor = () => {
let r = Math.floor(Math.random() * 256);
let g = Math.floor(Math.random() * 256);
let b = Math.floor(Math.random() * 256);
return 'rgb(' + r + ',' + g + ',' + b + ')';
};
// Initialisation des graphiques après chargement du DOM
document.addEventListener('DOMContentLoaded', function() {
// Graphique des performances scolaires
const schoolPerformanceCanvas = document.getElementById(\"schoolPerformanceGraph\");
if (schoolPerformanceCanvas) {
// Détruire le graphique existant s'il existe
const existingChart = Chart.getChart(schoolPerformanceCanvas);
if (existingChart) {
existingChart.destroy();
}
const datasets = [];
{% if session1 is defined %}
datasets.push({
label: \"Session 1\",
data: {{ session1|raw }},
fill: false,
backgroundColor: randomRgbColor()
});
{% endif %}
{% if session2 is defined %}
datasets.push({
label: \"Session 2\",
data: {{ session2|raw }},
fill: false,
backgroundColor: randomRgbColor()
});
{% endif %}
{% if session3 is defined %}
datasets.push({
label: \"Session 3\",
data: {{ session3|raw }},
fill: false,
backgroundColor: randomRgbColor()
});
{% endif %}
{% if session4 is defined %}
datasets.push({
label: \"Session 4\",
data: {{ session4|raw }},
fill: false,
backgroundColor: randomRgbColor()
});
{% endif %}
{% if session5 is defined %}
datasets.push({
label: \"Session 5\",
data: {{ session5|raw }},
fill: false,
backgroundColor: randomRgbColor()
});
{% endif %}
{% if session6 is defined %}
datasets.push({
label: \"Session 6\",
data: {{ session6|raw }},
fill: false,
backgroundColor: randomRgbColor()
});
{% endif %}
// Créer le graphique seulement si on a des données
if (datasets.length > 0) {
new Chart(schoolPerformanceCanvas.getContext('2d'), {
type: \"bar\",
data: {
labels: {{ cours|raw }},
datasets: datasets,
},
options: {
responsive: true,
plugins: {
title: {
display: true,
text: 'Performances générales annuelles',
font: {
size: 24,
style: 'bold',
family: 'Helvetica Neue',
},
position: 'bottom',
}
}
}
});
}
}
// Graphique des examens officiels
initOfficialExamsChart();
});
// Fonction pour initialiser le graphique des examens officiels
function initOfficialExamsChart() {
const canvas = document.getElementById('officialExamsGraph');
// Vérifier si le canvas existe
if (!canvas) {
return;
}
// Détruire le graphique existant s'il existe
const existingChart = Chart.getChart(canvas);
if (existingChart) {
existingChart.destroy();
}
const mentionCountCategories = {{ mentionCountCategories|raw }};
// Vérifier si on a des données
if (!mentionCountCategories || mentionCountCategories.length === 0) {
return;
}
const colors = mentionCountCategories.map(() => randomRgbColor());
new Chart(canvas.getContext('2d'), {
type: 'pie',
data: {
labels: {{ mentionCategories|raw }},
datasets: [{
data: mentionCountCategories,
backgroundColor: colors
}]
},
options: {
responsive: true,
plugins: {
title: {
display: true,
text: 'Résultats aux examens officiels',
position: 'bottom',
font: {
size: 24,
family: 'Helvetica Neue'
}
}
}
}
});
}
</script>
{% endblock %}", "classroom/show.html.twig", "/var/www/bethesda/templates/classroom/show.html.twig");
}
}