<?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_20b837fda154308a57de8bf7077a8921 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->loadTemplate("layout/backEndLayout.html.twig", "classroom/show.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 ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) {
// 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>
";
// line 118
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Listing", [], "admin"), "html", null, true);
yield "
</a>
";
// line 120
if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) {
// 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>
";
// line 123
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Edit", [], "admin"), "html", null, true);
yield "
</a>
<a target=\"_blank\" class=\"btn btn-file\" data-toggle=\"modal\" data-target=\"#form_modal_courses\" >
<i class=\"fa fa-file-excel-o\"></i>
Recap. Seq
</a>
<a target=\"_blank\" class=\"btn btn-warning\" href=\"";
// line 138
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.', 138, $this->source); })()), "id", [], "any", false, false, false, 138)]), "html", null, true);
yield "\">
<i class=\"fa fa-file\"></i>
Bull Seq
</a>
<a target=\"_blank\" class=\"btn btn-file\" href=\"";
// line 151
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_classrooms_reportcards_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.', 151, $this->source); })()), "id", [], "any", false, false, false, 151)]), "html", null, true);
yield "\">
<i class=\"fa fa-file\"></i>
Bull Trim
</a>
<a target=\"_blank\" class=\"btn btn-outline-warning\" href=\"";
// line 163
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.', 163, $this->source); })()), "id", [], "any", false, false, false, 163)]), "html", null, true);
yield "\">
<i class=\"fa fa-file-excel-o\"></i>
Recap Trim
</a>
<a target=\"_blank\" class=\"btn btn-file\" href=\"";
// line 175
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.', 175, $this->source); })()), "id", [], "any", false, false, false, 175)]), "html", null, true);
yield "\">
<i class=\"fa fa-file\"></i>
Bull Ann V1
</a>
<a target=\"_blank\" class=\"btn btn-file\" data-toggle=\"modal\" data-target=\"#form_modal_reportcard_params\" >
<i class=\"fa fa-file\"></i>
Bull Ann V2
</a>
<a target=\"_blank\" class=\"btn btn-light\" href=\"";
// line 199
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_current_fulfilled_eval_show", ["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.', 199, $this->source); })()), "id", [], "any", false, false, false, 199)]), "html", null, true);
yield "\">
<i class=\"fa fa-list-ul\"></i>
Dépot des PV
</a>
<button class=\"btn btn-danger\" type=\"submit\">
<i class=\"fa fa-trash-o\"></i>
";
// line 214
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Delete", [], "admin"), "html", null, true);
yield "
</button>
";
}
// line 217
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>
</tr>
</thead>
<tbody>
";
// line 277
$context["effectif"] = 0;
// line 278
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.', 278, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["std"]) {
// line 279
yield " <tr>
<td>
<a href=\"";
// line 281
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, 281)]), "html", null, true);
yield "\">
";
// line 282
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["std"], "matricule", [], "any", false, false, false, 282), "html", null, true);
yield "
</a>
</td>
<td>
";
// line 286
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["std"], "lastname", [], "any", false, false, false, 286), "html", null, true);
yield "
</td>
<td>
";
// line 289
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["std"], "firstname", [], "any", false, false, false, 289), "html", null, true);
yield "
</td>
<td>
";
// line 292
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.', 292, $this->source); })()), CoreExtension::getAttribute($this->env, $this->source, $context["std"], "id", [], "any", false, false, false, 292), [], "array", false, false, false, 292), "html", null, true);
yield "
</td>
";
// line 294
$context["effectif"] = ((isset($context["effectif"]) || array_key_exists("effectif", $context) ? $context["effectif"] : (function () { throw new RuntimeError('Variable "effectif" does not exist.', 294, $this->source); })()) + 1);
// line 295
yield "
</tr>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['std'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 299
yield " <tr>
<td class=\"center\" colspan=\"2\">
Effectif
</td>
<td>
";
// line 311
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.', 311, $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 388
$context["totalCoef"] = 0;
// line 389
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.', 389, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["module"]) {
// line 390
yield " <tr>
";
// line 392
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, $context["module"], "courses", [], "any", false, false, false, 392));
foreach ($context['_seq'] as $context["_key"] => $context["course"]) {
// line 393
yield " <tr>
<td>
";
// line 395
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["module"], "name", [], "any", false, false, false, 395), "html", null, true);
yield "
</td>
<td>
<a href=\"";
// line 398
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, 398)]), "html", null, true);
yield "\">
";
// line 399
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["course"], "code", [], "any", false, false, false, 399), "html", null, true);
yield "
</a>
</td>
<td>
";
// line 404
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["course"], "wording", [], "any", false, false, false, 404), "html", null, true);
yield "
</td>
<td>
";
// line 407
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["course"], "coefficient", [], "any", false, false, false, 407), "html", null, true);
yield "
</td>
<td>
";
// line 411
if (CoreExtension::getAttribute($this->env, $this->source, ($context["attributions"] ?? null), CoreExtension::getAttribute($this->env, $this->source, $context["course"], "id", [], "any", false, false, false, 411), [], "array", true, true, false, 411)) {
// line 412
yield " ";
if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) {
// line 413
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.', 413, $this->source); })()), CoreExtension::getAttribute($this->env, $this->source, $context["course"], "id", [], "any", false, false, false, 413), [], "array", false, false, false, 413), "id", [], "any", false, false, false, 413)]), "html", null, true);
yield "\">
";
// line 414
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.', 414, $this->source); })()), CoreExtension::getAttribute($this->env, $this->source, $context["course"], "id", [], "any", false, false, false, 414), [], "array", false, false, false, 414), "teacher", [], "any", false, false, false, 414), "fullName", [], "any", false, false, false, 414), "html", null, true);
yield "
</a>
";
} else {
// line 417
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.', 417, $this->source); })()), CoreExtension::getAttribute($this->env, $this->source, $context["course"], "id", [], "any", false, false, false, 417), [], "array", false, false, false, 417), "teacher", [], "any", false, false, false, 417), "fullName", [], "any", false, false, false, 417), "html", null, true);
yield "
";
}
// line 419
yield " ";
} else {
// line 420
yield " ";
if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) {
// line 421
yield " <a href=\"";
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_attributions_new");
yield "\">
Pas encore attribue
</a>
";
}
// line 425
yield " ";
}
// line 426
yield "
</td>
";
// line 428
$context["totalCoef"] = ((isset($context["totalCoef"]) || array_key_exists("totalCoef", $context) ? $context["totalCoef"] : (function () { throw new RuntimeError('Variable "totalCoef" does not exist.', 428, $this->source); })()) + CoreExtension::getAttribute($this->env, $this->source, $context["course"], "coefficient", [], "any", false, false, false, 428));
// line 429
yield " </tr>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['course'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 431
yield "
</tr>
<tr>
<td class=\"center\" colspan=\"3\">
total cumul coef
</td>
<td>
";
// line 445
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.', 445, $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 449
yield "
</tbody>
</table>
</article>
<section id=\"graphs\">
<article class=\"p-3\">
<canvas id=\"schoolPerformanceGraph\" width=\"700\" height=\"250\"></canvas>
</article>
";
// line 457
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.', 457, $this->source); })()), "apc", [], "any", false, false, false, 457)) {
// line 458
yield " <article class=\"p-3\">
<canvas id=\"officialExamsGraph\" width=\"200\" height=\"220\" ></canvas>
</article>
";
}
// line 462
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=\"";
// line 475
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.', 475, $this->source); })()), "id", [], "any", false, false, false, 475)]), "html", null, true);
yield "\" method=\"post\">
<div class=\"modal-body\">
<div class=\"form-group\">
";
// line 478
$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.', 478, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["module"]) {
// line 479
yield " ";
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, $context["module"], "courses", [], "any", false, false, false, 479));
foreach ($context['_seq'] as $context["_key"] => $context["course"]) {
// line 480
yield " <li class=\"list-group-item\">
<input class=\"form-check-input me-1\" type=\"checkbox\" checked name=\"selected_courses[]\" value=";
// line 481
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["course"], "id", [], "any", false, false, false, 481), "html", null, true);
yield " >
";
// line 482
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["course"], "wording", [], "any", false, false, false, 482), "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 485
yield " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['module'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 486
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 action=\"";
// line 506
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_class_reportcards_3_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.', 506, $this->source); })()), "id", [], "any", false, false, false, 506)]), "html", null, true);
yield "\" 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 538
/**
* @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 539
yield " ";
yield from $this->yieldParentBlock("javascripts", $context, $blocks);
yield "
<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 554
if (array_key_exists("session1", $context)) {
// line 555
yield " datasets.push( {
label: \"Session 1\",
data : ";
// line 557
yield (isset($context["session1"]) || array_key_exists("session1", $context) ? $context["session1"] : (function () { throw new RuntimeError('Variable "session1" does not exist.', 557, $this->source); })());
yield ",
fill : false,
backgroundColor: randomRgbColor()
} )
";
}
// line 562
yield " ";
if (array_key_exists("session2", $context)) {
// line 563
yield " datasets.push( {
label: \"Session 2\",
data : ";
// line 565
yield (isset($context["session2"]) || array_key_exists("session2", $context) ? $context["session2"] : (function () { throw new RuntimeError('Variable "session2" does not exist.', 565, $this->source); })());
yield ",
fill : false,
backgroundColor: randomRgbColor()
} )
";
}
// line 570
yield " ";
if (array_key_exists("session3", $context)) {
// line 571
yield " datasets.push( {
label: \"Session 3\",
data : ";
// line 573
yield (isset($context["session3"]) || array_key_exists("session3", $context) ? $context["session3"] : (function () { throw new RuntimeError('Variable "session3" does not exist.', 573, $this->source); })());
yield ",
fill : false,
backgroundColor: randomRgbColor()
} )
";
}
// line 578
yield " ";
if (array_key_exists("session4", $context)) {
// line 579
yield " datasets.push( {
label: \"Session 4\",
data : ";
// line 581
yield (isset($context["session4"]) || array_key_exists("session4", $context) ? $context["session4"] : (function () { throw new RuntimeError('Variable "session4" does not exist.', 581, $this->source); })());
yield ",
fill : false,
backgroundColor: randomRgbColor()
} )
";
}
// line 586
yield " ";
if (array_key_exists("session5", $context)) {
// line 587
yield " datasets.push( {
label: \"Session 5\",
data : ";
// line 589
yield (isset($context["session5"]) || array_key_exists("session5", $context) ? $context["session5"] : (function () { throw new RuntimeError('Variable "session5" does not exist.', 589, $this->source); })());
yield ",
fill : false,
backgroundColor: randomRgbColor()
} )
";
}
// line 594
yield " ";
if (array_key_exists("session6", $context)) {
// line 595
yield " datasets.push( {
label: \"Session 6\",
data : ";
// line 597
yield (isset($context["session6"]) || array_key_exists("session6", $context) ? $context["session6"] : (function () { throw new RuntimeError('Variable "session6" does not exist.', 597, $this->source); })());
yield ",
fill : false,
backgroundColor: randomRgbColor()
} )
";
}
// line 602
yield "
let graph = new Chart(schoolPerformanceGraph, {
type:\"bar\",
data : {
labels: ";
// line 613
yield (isset($context["cours"]) || array_key_exists("cours", $context) ? $context["cours"] : (function () { throw new RuntimeError('Variable "cours" does not exist.', 613, $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 655
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.', 655, $this->source); })()), "html", null, true);
yield ";
mentionCountCategories.map(cat => {
colors.push(randomRgbColor());
})
let officialExamsChart = new Chart(officialExamsGraph, {
type: \"pie\",
data: {
labels: ";
// line 662
yield (isset($context["mentionCategories"]) || array_key_exists("mentionCategories", $context) ? $context["mentionCategories"] : (function () { throw new RuntimeError('Variable "mentionCategories" does not exist.', 662, $this->source); })());
yield ",
datasets: [{
data: ";
// line 664
yield (isset($context["mentionCountCategories"]) || array_key_exists("mentionCountCategories", $context) ? $context["mentionCountCategories"] : (function () { throw new RuntimeError('Variable "mentionCountCategories" does not exist.', 664, $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 ( 1016 => 664, 1011 => 662, 1001 => 655, 956 => 613, 943 => 602, 935 => 597, 931 => 595, 928 => 594, 920 => 589, 916 => 587, 913 => 586, 905 => 581, 901 => 579, 898 => 578, 890 => 573, 886 => 571, 883 => 570, 875 => 565, 871 => 563, 868 => 562, 860 => 557, 856 => 555, 854 => 554, 835 => 539, 822 => 538, 779 => 506, 757 => 486, 751 => 485, 742 => 482, 738 => 481, 735 => 480, 730 => 479, 726 => 478, 720 => 475, 705 => 462, 699 => 458, 697 => 457, 687 => 449, 677 => 445, 661 => 431, 654 => 429, 652 => 428, 648 => 426, 645 => 425, 637 => 421, 634 => 420, 631 => 419, 625 => 417, 619 => 414, 614 => 413, 611 => 412, 609 => 411, 602 => 407, 596 => 404, 588 => 399, 584 => 398, 578 => 395, 574 => 393, 570 => 392, 566 => 390, 561 => 389, 559 => 388, 479 => 311, 465 => 299, 456 => 295, 454 => 294, 449 => 292, 443 => 289, 437 => 286, 430 => 282, 426 => 281, 422 => 279, 417 => 278, 415 => 277, 353 => 217, 347 => 214, 329 => 199, 302 => 175, 287 => 163, 272 => 151, 256 => 138, 238 => 123, 232 => 121, 230 => 120, 225 => 118, 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>
{{ 'Listing'|trans({}, 'admin') }}
</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>
{{ 'Edit'|trans({}, 'admin') }}
</a>
<a target=\"_blank\" class=\"btn btn-file\" data-toggle=\"modal\" data-target=\"#form_modal_courses\" >
<i class=\"fa fa-file-excel-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\" href=\"{{ path('admin_classrooms_reportcards_trim', {id: classroom.id}) }}\">
<i class=\"fa fa-file\"></i>
Bull Trim
</a>
<a target=\"_blank\" class=\"btn btn-outline-warning\" href=\"{{ path('admin_classrooms_recapitulatif_trim', {id: classroom.id}) }}\">
<i class=\"fa fa-file-excel-o\"></i>
Recap Trim
</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>
<a target=\"_blank\" class=\"btn btn-file\" data-toggle=\"modal\" data-target=\"#form_modal_reportcard_params\" >
<i class=\"fa fa-file\"></i>
Bull Ann V2
</a>
<a target=\"_blank\" class=\"btn btn-light\" href=\"{{ path('admin_current_fulfilled_eval_show', {id: classroom.id}) }}\">
<i class=\"fa fa-list-ul\"></i>
Dépot des PV
</a>
<button class=\"btn btn-danger\" type=\"submit\">
<i class=\"fa fa-trash-o\"></i>
{{ 'Delete'|trans({}, 'admin') }}
</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>
</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>
{% 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=\"{{ path('admin_classrooms_recapitulatif_seq', {'id':classroom.id}) }}\" 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 action=\"{{ path('admin_class_reportcards_3_apc_year', {'id':classroom.id}) }}\" 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\">
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/current/templates/classroom/show.html.twig");
}
}