<?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 18
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 39
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.', 39, $this->source); })()), "name", [], "any", false, false, false, 39), "html", null, true);
yield "
</td>
</tr>
<tr>
<th scope=\"row\">
Niveau
</th>
<td>
";
// line 54
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.', 54, $this->source); })()), "level", [], "any", false, false, false, 54), "html", null, true);
yield "
</td>
</tr>
<tr>
<th scope=\"row\">
Titulaire
</th>
<td>
";
// line 69
if ((null === (isset($context["mainteacher"]) || array_key_exists("mainteacher", $context) ? $context["mainteacher"] : (function () { throw new RuntimeError('Variable "mainteacher" does not exist.', 69, $this->source); })()))) {
// line 70
yield "
";
} else {
// line 72
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.', 72, $this->source); })()), "fullName", [], "any", false, false, false, 72), "html", null, true);
yield "
";
}
// line 74
yield "
</td>
</tr>
<tr>
<th scope=\"row\">
Classe d'examen
</th>
<td>
";
// line 88
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.', 88, $this->source); })()), "apc", [], "any", false, false, false, 88) == true)) {
// line 89
yield " OUI
\t\t\t\t\t\t\t\t
";
} else {
// line 99
yield " NON
\t\t\t\t\t\t\t\t
";
}
// line 109
yield " </td>
</tr>
</tbody>
</table>
<div class=\"btn-group record_actions\">
<a class=\"btn btn-info\" href=\"";
// line 116
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_classrooms");
yield "\">
<i class=\"fa fa-list\"></i>
</a>
";
// line 120
if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 121
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.', 121, $this->source); })()), "id", [], "any", false, false, false, 121)]), "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 126
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.', 126, $this->source); })()), "id", [], "any", false, false, false, 126)]), "html", null, true);
yield "\">
<i class=\"fa fa-file-pdf-o\"></i>
Recap. Seq
</a>
<a target=\"_blank\" class=\"btn btn-warning\" href=\"";
// line 131
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.', 131, $this->source); })()), "id", [], "any", false, false, false, 131)]), "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 137
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.', 137, $this->source); })()), "id", [], "any", false, false, false, 137)]), "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 141
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.', 141, $this->source); })()), "id", [], "any", false, false, false, 141)]), "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 145
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.', 145, $this->source); })()), "id", [], "any", false, false, false, 145)]), "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 150
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.', 150, $this->source); })()), "id", [], "any", false, false, false, 150)]), "html", null, true);
yield "\" >
<i class=\"fa fa-file-excel-o\"></i>
Recap Ann
</a>
<a target=\"_blank\" class=\"btn btn-file\" href=\"";
// line 155
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.', 155, $this->source); })()), "id", [], "any", false, false, false, 155)]), "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 167
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 237
$context["effectif"] = 0;
// line 238
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.', 238, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["std"]) {
// line 239
yield " <tr>
<td>
<a href=\"";
// line 241
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, 241)]), "html", null, true);
yield "\">
";
// line 242
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["std"], "matricule", [], "any", false, false, false, 242), "html", null, true);
yield "
</a>
</td>
<td>
";
// line 246
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["std"], "lastname", [], "any", false, false, false, 246), "html", null, true);
yield "
</td>
<td>
";
// line 249
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["std"], "firstname", [], "any", false, false, false, 249), "html", null, true);
yield "
</td>
<td>
";
// line 252
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.', 252, $this->source); })()), CoreExtension::getAttribute($this->env, $this->source, $context["std"], "id", [], "any", false, false, false, 252), [], "array", false, false, false, 252), "html", null, true);
yield "
</td>
<td>
";
// line 255
if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 256
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, 256), "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.', 256, $this->source); })()), "id", [], "any", false, false, false, 256)]), "html", null, true);
yield "\">
<i class=\"fa fa-ban\"></i>
</a>
<a class=\"btn btn-outline-warning\" href=\"";
// line 259
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, 259)]), "html", null, true);
yield "\">
<i class=\"fa fa-pencil-square-o\" aria-hidden=\"true\"></i>
</a>
";
}
// line 263
yield "
</td>
";
// line 265
$context["effectif"] = ((isset($context["effectif"]) || array_key_exists("effectif", $context) ? $context["effectif"] : (function () { throw new RuntimeError('Variable "effectif" does not exist.', 265, $this->source); })()) + 1);
// line 266
yield "
</tr>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['std'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 270
yield " <tr>
<td class=\"center\" colspan=\"2\">
Effectif
</td>
<td>
";
// line 282
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.', 282, $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 359
$context["totalCoef"] = 0;
// line 360
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.', 360, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["module"]) {
// line 361
yield " <tr>
";
// line 363
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, $context["module"], "courses", [], "any", false, false, false, 363));
foreach ($context['_seq'] as $context["_key"] => $context["course"]) {
// line 364
yield " <tr>
<td>
";
// line 366
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["module"], "name", [], "any", false, false, false, 366), "html", null, true);
yield "
</td>
<td>
<a href=\"";
// line 369
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, 369)]), "html", null, true);
yield "\">
";
// line 370
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["course"], "code", [], "any", false, false, false, 370), "html", null, true);
yield "
</a>
</td>
<td>
";
// line 375
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["course"], "wording", [], "any", false, false, false, 375), "html", null, true);
yield "
</td>
<td>
";
// line 378
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["course"], "coefficient", [], "any", false, false, false, 378), "html", null, true);
yield "
</td>
<td>
";
// line 382
if (CoreExtension::getAttribute($this->env, $this->source, ($context["attributions"] ?? null), CoreExtension::getAttribute($this->env, $this->source, $context["course"], "id", [], "any", false, false, false, 382), [], "array", true, true, false, 382)) {
// line 383
yield " ";
if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 384
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.', 384, $this->source); })()), CoreExtension::getAttribute($this->env, $this->source, $context["course"], "id", [], "any", false, false, false, 384), [], "array", false, false, false, 384), "id", [], "any", false, false, false, 384)]), "html", null, true);
yield "\">
";
// line 385
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.', 385, $this->source); })()), CoreExtension::getAttribute($this->env, $this->source, $context["course"], "id", [], "any", false, false, false, 385), [], "array", false, false, false, 385), "teacher", [], "any", false, false, false, 385), "fullName", [], "any", false, false, false, 385), "html", null, true);
yield "
</a>
";
} else {
// line 388
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.', 388, $this->source); })()), CoreExtension::getAttribute($this->env, $this->source, $context["course"], "id", [], "any", false, false, false, 388), [], "array", false, false, false, 388), "teacher", [], "any", false, false, false, 388), "fullName", [], "any", false, false, false, 388), "html", null, true);
yield "
";
}
// line 390
yield " ";
} else {
// line 391
yield " ";
if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 392
yield " <a href=\"";
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_attributions_new");
yield "\">
Pas encore attribue
</a>
";
}
// line 396
yield " ";
}
// line 397
yield "
</td>
";
// line 399
$context["totalCoef"] = ((isset($context["totalCoef"]) || array_key_exists("totalCoef", $context) ? $context["totalCoef"] : (function () { throw new RuntimeError('Variable "totalCoef" does not exist.', 399, $this->source); })()) + CoreExtension::getAttribute($this->env, $this->source, $context["course"], "coefficient", [], "any", false, false, false, 399));
// line 400
yield " </tr>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['course'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 402
yield "
</tr>
<tr>
<td class=\"center\" colspan=\"3\">
total cumul coef
</td>
<td>
";
// line 416
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.', 416, $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 420
yield "
</tbody>
</table>
</article>
<section id=\"graphs\">
<article class=\"p-3\">
<canvas id=\"schoolPerformanceGraph\" width=\"700\" height=\"250\"></canvas>
</article>
";
// line 428
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.', 428, $this->source); })()), "apc", [], "any", false, false, false, 428)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 429
yield " <article class=\"p-3\">
<canvas id=\"officialExamsGraph\" width=\"200\" height=\"220\" ></canvas>
</article>
";
}
// line 433
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>
<!-- href=\" -->
<form action=\"#\" method=\"post\">
<div class=\"modal-body\">
<div class=\"form-group\">
";
// line 450
$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.', 450, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["module"]) {
// line 451
yield " ";
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, $context["module"], "courses", [], "any", false, false, false, 451));
foreach ($context['_seq'] as $context["_key"] => $context["course"]) {
// line 452
yield " <li class=\"list-group-item\">
<input class=\"form-check-input me-1\" type=\"checkbox\" checked name=\"selected_courses[]\" value=";
// line 453
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["course"], "id", [], "any", false, false, false, 453), "html", null, true);
yield " >
";
// line 454
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["course"], "wording", [], "any", false, false, false, 454), "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 457
yield " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['module'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 458
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 510
/**
* @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 511
yield " ";
yield from $this->yieldParentBlock("javascripts", $context, $blocks);
yield "
<script type=\"text/javascript\">
// Attendre que le DOM soit complètement chargé
\$(document).ready(function() {
// Quand le modal est ouvert
\$('#form_modal_courses').on('show.bs.modal', function(event) {
// Récupérer l'élément qui a déclenché l'ouverture du modal
var button = \$(event.relatedTarget);
// Récupérer l'URL dynamique depuis l'attribut \"data-action\"
var actionUrl = button.data('action');
// Mettre à jour l'attribut \"action\" du formulaire
\$('#form_modal_courses form').attr('action', actionUrl);
});
});
</script>
<script type=\"text/javascript\">
\$(document).ready(function () {
// Quand on clique sur un lien qui ouvre le modal
\$('[data-toggle=\"modal\"]').on('click', function () {
// Récupère l'URL depuis data-action
var actionUrl = \$(this).data('action');
console.log(actionUrl);
// Met à jour l'attribut action du formulaire du modal
\$('#form_modal_reportcard_params form').attr('action', actionUrl);
});
});
</script>
<script type=\"text/javascript\">
const schoolPerformanceGraph = \$(\"#schoolPerformanceGraph\");
const datasets = [];
//Generate a random color
const randomRgbColor = () => {
let r = Math.floor(Math.random() * 256); // Random between 0-255
let g = Math.floor(Math.random() * 256); // Random between 0-255
let b = Math.floor(Math.random() * 256); // Random between 0-255
return 'rgb(' + r + ',' + g + ',' + b + ')';
};
";
// line 555
if (array_key_exists("session1", $context)) {
// line 556
yield " datasets.push( {
label: \"Session 1\",
data : ";
// line 558
yield (isset($context["session1"]) || array_key_exists("session1", $context) ? $context["session1"] : (function () { throw new RuntimeError('Variable "session1" does not exist.', 558, $this->source); })());
yield ",
fill : false,
backgroundColor: randomRgbColor()
} )
";
}
// line 563
yield " ";
if (array_key_exists("session2", $context)) {
// line 564
yield " datasets.push( {
label: \"Session 2\",
data : ";
// line 566
yield (isset($context["session2"]) || array_key_exists("session2", $context) ? $context["session2"] : (function () { throw new RuntimeError('Variable "session2" does not exist.', 566, $this->source); })());
yield ",
fill : false,
backgroundColor: randomRgbColor()
} )
";
}
// line 571
yield " ";
if (array_key_exists("session3", $context)) {
// line 572
yield " datasets.push( {
label: \"Session 3\",
data : ";
// line 574
yield (isset($context["session3"]) || array_key_exists("session3", $context) ? $context["session3"] : (function () { throw new RuntimeError('Variable "session3" does not exist.', 574, $this->source); })());
yield ",
fill : false,
backgroundColor: randomRgbColor()
} )
";
}
// line 579
yield " ";
if (array_key_exists("session4", $context)) {
// line 580
yield " datasets.push( {
label: \"Session 4\",
data : ";
// line 582
yield (isset($context["session4"]) || array_key_exists("session4", $context) ? $context["session4"] : (function () { throw new RuntimeError('Variable "session4" does not exist.', 582, $this->source); })());
yield ",
fill : false,
backgroundColor: randomRgbColor()
} )
";
}
// line 587
yield " ";
if (array_key_exists("session5", $context)) {
// line 588
yield " datasets.push( {
label: \"Session 5\",
data : ";
// line 590
yield (isset($context["session5"]) || array_key_exists("session5", $context) ? $context["session5"] : (function () { throw new RuntimeError('Variable "session5" does not exist.', 590, $this->source); })());
yield ",
fill : false,
backgroundColor: randomRgbColor()
} )
";
}
// line 595
yield " ";
if (array_key_exists("session6", $context)) {
// line 596
yield " datasets.push( {
label: \"Session 6\",
data : ";
// line 598
yield (isset($context["session6"]) || array_key_exists("session6", $context) ? $context["session6"] : (function () { throw new RuntimeError('Variable "session6" does not exist.', 598, $this->source); })());
yield ",
fill : false,
backgroundColor: randomRgbColor()
} )
";
}
// line 603
yield "
let graph = new Chart(schoolPerformanceGraph, {
type:\"bar\",
data : {
labels: ";
// line 614
yield (isset($context["cours"]) || array_key_exists("cours", $context) ? $context["cours"] : (function () { throw new RuntimeError('Variable "cours" does not exist.', 614, $this->source); })());
yield ",
datasets: datasets,
},
options: {
plugins: {
title: {
display: true,
text: 'Performances generales annuelles ',
font: {
size: 24,
style: 'bold',
family: 'Helvetica Neue',
},
position: 'bottom',
}
}
}
});
// Get the chart element for student category
let studentCategoryChartElement = document.querySelector(\"#studentCategoryChart\");
// Create the chart for student category
let studentCategoryChart = new Chart(studentCategoryChartElement, {
type: \"pie\",
data: {
labels: [\"Passed\", \"Failed\"],
datasets: [{
data: [/* Add data here for the number of students passed and failed */],
backgroundColor: [\"green\", \"red\"]
}]
}
});
// Get the chart element for mention category
let officialExamsGraph = document.querySelector(\"#officialExamsGraph\");
// Create the chart for mention category
const colors = [];
const mentionCountCategories = ";
// line 656
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["mentionCountCategories"]) || array_key_exists("mentionCountCategories", $context) ? $context["mentionCountCategories"] : (function () { throw new RuntimeError('Variable "mentionCountCategories" does not exist.', 656, $this->source); })()), "html", null, true);
yield ";
mentionCountCategories.map(cat => {
colors.push(randomRgbColor());
})
let officialExamsChart = new Chart(officialExamsGraph, {
type: \"pie\",
data: {
labels: ";
// line 663
yield (isset($context["mentionCategories"]) || array_key_exists("mentionCategories", $context) ? $context["mentionCategories"] : (function () { throw new RuntimeError('Variable "mentionCategories" does not exist.', 663, $this->source); })());
yield ",
datasets: [{
data: ";
// line 665
yield (isset($context["mentionCountCategories"]) || array_key_exists("mentionCountCategories", $context) ? $context["mentionCountCategories"] : (function () { throw new RuntimeError('Variable "mentionCountCategories" does not exist.', 665, $this->source); })());
yield ",
backgroundColor: colors
}]
},
options: {
plugins: {
title: {
display: true,
text: 'Resultats aux examens officiels ',
font: {
size: 24,
style: 'bold',
family: 'Helvetica Neue',
},
position: 'bottom',
}
}
}
});
</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 ( 1018 => 665, 1013 => 663, 1003 => 656, 958 => 614, 945 => 603, 937 => 598, 933 => 596, 930 => 595, 922 => 590, 918 => 588, 915 => 587, 907 => 582, 903 => 580, 900 => 579, 892 => 574, 888 => 572, 885 => 571, 877 => 566, 873 => 564, 870 => 563, 862 => 558, 858 => 556, 856 => 555, 808 => 511, 795 => 510, 733 => 458, 727 => 457, 718 => 454, 714 => 453, 711 => 452, 706 => 451, 702 => 450, 683 => 433, 677 => 429, 675 => 428, 665 => 420, 655 => 416, 639 => 402, 632 => 400, 630 => 399, 626 => 397, 623 => 396, 615 => 392, 612 => 391, 609 => 390, 603 => 388, 597 => 385, 592 => 384, 589 => 383, 587 => 382, 580 => 378, 574 => 375, 566 => 370, 562 => 369, 556 => 366, 552 => 364, 548 => 363, 544 => 361, 539 => 360, 537 => 359, 457 => 282, 443 => 270, 434 => 266, 432 => 265, 428 => 263, 421 => 259, 414 => 256, 412 => 255, 406 => 252, 400 => 249, 394 => 246, 387 => 242, 383 => 241, 379 => 239, 374 => 238, 372 => 237, 300 => 167, 285 => 155, 277 => 150, 269 => 145, 262 => 141, 255 => 137, 246 => 131, 238 => 126, 229 => 121, 227 => 120, 220 => 116, 211 => 109, 199 => 99, 187 => 89, 185 => 88, 169 => 74, 163 => 72, 159 => 70, 157 => 69, 139 => 54, 121 => 39, 98 => 18, 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
\t\t\t\t\t\t\t\t
{% else %}
NON
\t\t\t\t\t\t\t\t
{% 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>
<!-- href=\" -->
<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() {
// Quand le modal est ouvert
\$('#form_modal_courses').on('show.bs.modal', function(event) {
// Récupérer l'élément qui a déclenché l'ouverture du modal
var button = \$(event.relatedTarget);
// Récupérer l'URL dynamique depuis l'attribut \"data-action\"
var actionUrl = button.data('action');
// Mettre à jour l'attribut \"action\" du formulaire
\$('#form_modal_courses form').attr('action', actionUrl);
});
});
</script>
<script type=\"text/javascript\">
\$(document).ready(function () {
// Quand on clique sur un lien qui ouvre le modal
\$('[data-toggle=\"modal\"]').on('click', function () {
// Récupère l'URL depuis data-action
var actionUrl = \$(this).data('action');
console.log(actionUrl);
// Met à jour l'attribut action du formulaire du modal
\$('#form_modal_reportcard_params form').attr('action', actionUrl);
});
});
</script>
<script type=\"text/javascript\">
const schoolPerformanceGraph = \$(\"#schoolPerformanceGraph\");
const datasets = [];
//Generate a random color
const randomRgbColor = () => {
let r = Math.floor(Math.random() * 256); // Random between 0-255
let g = Math.floor(Math.random() * 256); // Random between 0-255
let b = Math.floor(Math.random() * 256); // Random between 0-255
return 'rgb(' + r + ',' + g + ',' + b + ')';
};
{% 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 %}
let graph = new Chart(schoolPerformanceGraph, {
type:\"bar\",
data : {
labels: {{ cours|raw }},
datasets: datasets,
},
options: {
plugins: {
title: {
display: true,
text: 'Performances generales annuelles ',
font: {
size: 24,
style: 'bold',
family: 'Helvetica Neue',
},
position: 'bottom',
}
}
}
});
// Get the chart element for student category
let studentCategoryChartElement = document.querySelector(\"#studentCategoryChart\");
// Create the chart for student category
let studentCategoryChart = new Chart(studentCategoryChartElement, {
type: \"pie\",
data: {
labels: [\"Passed\", \"Failed\"],
datasets: [{
data: [/* Add data here for the number of students passed and failed */],
backgroundColor: [\"green\", \"red\"]
}]
}
});
// Get the chart element for mention category
let officialExamsGraph = document.querySelector(\"#officialExamsGraph\");
// Create the chart for mention category
const colors = [];
const mentionCountCategories = {{mentionCountCategories}};
mentionCountCategories.map(cat => {
colors.push(randomRgbColor());
})
let officialExamsChart = new Chart(officialExamsGraph, {
type: \"pie\",
data: {
labels: {{ mentionCategories|raw }},
datasets: [{
data: {{mentionCountCategories|raw}},
backgroundColor: colors
}]
},
options: {
plugins: {
title: {
display: true,
text: 'Resultats aux examens officiels ',
font: {
size: 24,
style: 'bold',
family: 'Helvetica Neue',
},
position: 'bottom',
}
}
}
});
</script>
{% endblock %}
", "classroom/show.html.twig", "/var/www/prod/liveedu/templates/classroom/show.html.twig");
}
}