var/cache/dev/twig/4a/4a7c08fede66f9bfb1e328d4914fcba7.php line 54

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\CoreExtension;
  6. use Twig\Extension\SandboxExtension;
  7. use Twig\Markup;
  8. use Twig\Sandbox\SecurityError;
  9. use Twig\Sandbox\SecurityNotAllowedTagError;
  10. use Twig\Sandbox\SecurityNotAllowedFilterError;
  11. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  12. use Twig\Source;
  13. use Twig\Template;
  14. use Twig\TemplateWrapper;
  15. /* classroom/show.html.twig */
  16. class __TwigTemplate_05ce185db16e92676754d8e9b1ee4d26 extends Template
  17. {
  18. private Source $source;
  19. /**
  20. * @var array<string, Template>
  21. */
  22. private array $macros = [];
  23. public function __construct(Environment $env)
  24. {
  25. parent::__construct($env);
  26. $this->source = $this->getSourceContext();
  27. $this->blocks = [
  28. 'content' => [$this, 'block_content'],
  29. 'javascripts' => [$this, 'block_javascripts'],
  30. ];
  31. }
  32. protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
  33. {
  34. // line 1
  35. return "layout/backEndLayout.html.twig";
  36. }
  37. protected function doDisplay(array $context, array $blocks = []): iterable
  38. {
  39. $macros = $this->macros;
  40. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  41. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "classroom/show.html.twig"));
  42. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  43. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "classroom/show.html.twig"));
  44. $this->parent = $this->loadTemplate("layout/backEndLayout.html.twig", "classroom/show.html.twig", 1);
  45. yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
  46. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  47. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  48. }
  49. // line 3
  50. /**
  51. * @return iterable<null|scalar|\Stringable>
  52. */
  53. public function block_content(array $context, array $blocks = []): iterable
  54. {
  55. $macros = $this->macros;
  56. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  57. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
  58. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  59. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
  60. // line 4
  61. yield "
  62. <div class=\"row mt-4\">
  63. <div class=\"col-1 mar-bot30\">
  64. ";
  65. // line 7
  66. if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) {
  67. // line 8
  68. yield " <a class=\"btn btn-info\" href=\"";
  69. yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_classrooms_new");
  70. yield "\">
  71. <i class=\"fa fa-plus\"></i>
  72. </a>
  73. ";
  74. }
  75. // line 18
  76. yield " </div>
  77. </div>
  78. <div class=\"col-11 jumbotron\">
  79. <article class=\"p-3\">
  80. <table class=\"table table-hover record_properties center\">
  81. <tbody>
  82. <tr>
  83. <th scope=\"row\">
  84. Nom
  85. </th>
  86. <td>
  87. ";
  88. // line 39
  89. 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);
  90. yield "
  91. </td>
  92. </tr>
  93. <tr>
  94. <th scope=\"row\">
  95. Niveau
  96. </th>
  97. <td>
  98. ";
  99. // line 54
  100. 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);
  101. yield "
  102. </td>
  103. </tr>
  104. <tr>
  105. <th scope=\"row\">
  106. Titulaire
  107. </th>
  108. <td>
  109. ";
  110. // line 69
  111. if ((null === (isset($context["mainteacher"]) || array_key_exists("mainteacher", $context) ? $context["mainteacher"] : (function () { throw new RuntimeError('Variable "mainteacher" does not exist.', 69, $this->source); })()))) {
  112. // line 70
  113. yield "
  114. ";
  115. } else {
  116. // line 72
  117. yield " ";
  118. 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);
  119. yield "
  120. ";
  121. }
  122. // line 74
  123. yield "
  124. </td>
  125. </tr>
  126. <tr>
  127. <th scope=\"row\">
  128. Classe d'examen
  129. </th>
  130. <td>
  131. ";
  132. // line 88
  133. 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)) {
  134. // line 89
  135. yield " OUI
  136. \t\t\t\t\t\t\t\t
  137. ";
  138. } else {
  139. // line 99
  140. yield " NON
  141. \t\t\t\t\t\t\t\t
  142. ";
  143. }
  144. // line 109
  145. yield " </td>
  146. </tr>
  147. </tbody>
  148. </table>
  149. <div class=\"btn-group record_actions\">
  150. <a class=\"btn btn-info\" href=\"";
  151. // line 116
  152. yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_classrooms");
  153. yield "\">
  154. <i class=\"fa fa-list\"></i>
  155. ";
  156. // line 118
  157. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Listing", [], "admin"), "html", null, true);
  158. yield "
  159. </a>
  160. ";
  161. // line 120
  162. if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) {
  163. // line 121
  164. yield " <a class=\"btn btn-primary\" href=\"";
  165. 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);
  166. yield "\">
  167. <i class=\"fa fa-edit\"></i>
  168. ";
  169. // line 123
  170. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Edit", [], "admin"), "html", null, true);
  171. yield "
  172. </a>
  173. <a target=\"_blank\" class=\"btn btn-file\" id=\"recap_seq\" data-toggle=\"modal\" data-target=\"#form_modal_courses\" data-action=\"";
  174. // line 126
  175. 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);
  176. yield "\">
  177. <i class=\"fa fa-file-excel-o\"></i>
  178. Recap. Seq
  179. </a>
  180. <a target=\"_blank\" class=\"btn btn-warning\" href=\"";
  181. // line 131
  182. 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);
  183. yield "\">
  184. <i class=\"fa fa-file\"></i>
  185. Bull Seq
  186. </a>
  187. <a target=\"_blank\" class=\"btn btn-file\"data-toggle=\"modal\" data-target=\"#form_modal_reportcard_params\">
  188. <i class=\"fa fa-file\"></i>
  189. Bull Trim
  190. </a>
  191. <a target=\"_blank\" class=\"btn btn-outline-warning\" id=\"recap_trim\" data-toggle=\"modal\" data-target=\"#form_modal_courses\" data-action=\"";
  192. // line 149
  193. 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.', 149, $this->source); })()), "id", [], "any", false, false, false, 149)]), "html", null, true);
  194. yield "\" >
  195. <i class=\"fa fa-file-excel-o\"></i>
  196. Recap Trim
  197. </a>
  198. <a target=\"_blank\" class=\"btn btn-file\" href=\"";
  199. // line 154
  200. 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.', 154, $this->source); })()), "id", [], "any", false, false, false, 154)]), "html", null, true);
  201. yield "\">
  202. <i class=\"fa fa-file\"></i>
  203. Bull Ann V1
  204. </a>
  205. <a target=\"_blank\" class=\"btn btn-file\" >
  206. <i class=\"fa fa-file\"></i>
  207. Bull Ann V2
  208. </a>
  209. <a target=\"_blank\" class=\"btn btn-light\" href=\"";
  210. // line 178
  211. 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.', 178, $this->source); })()), "id", [], "any", false, false, false, 178)]), "html", null, true);
  212. yield "\">
  213. <i class=\"fa fa-list-ul\"></i>
  214. Dépot des PV
  215. </a>
  216. <button class=\"btn btn-danger\" type=\"submit\">
  217. <i class=\"fa fa-trash-o\"></i>
  218. ";
  219. // line 193
  220. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Delete", [], "admin"), "html", null, true);
  221. yield "
  222. </button>
  223. ";
  224. }
  225. // line 196
  226. yield " </div>
  227. <div class=\"card-header text-center\">
  228. <h2>
  229. Liste des élèves incrits dans la classe
  230. </h2>
  231. </div>
  232. <table class=\"table table-striped table-hover table-bordered records_list center\">
  233. <thead>
  234. <tr>
  235. <th scope=\"col\">
  236. Matricule
  237. </th>
  238. <th scope=\"col\">
  239. Nom
  240. </th>
  241. <th scope=\"col\">
  242. Prénom
  243. </th>
  244. <th scope=\"col\">
  245. Photo
  246. </th>
  247. <th scope=\"col\">
  248. Action
  249. </th>
  250. </tr>
  251. </thead>
  252. <tbody>
  253. ";
  254. // line 266
  255. $context["effectif"] = 0;
  256. // line 267
  257. yield " ";
  258. $context['_parent'] = $context;
  259. $context['_seq'] = CoreExtension::ensureTraversable((isset($context["studentEnrolled"]) || array_key_exists("studentEnrolled", $context) ? $context["studentEnrolled"] : (function () { throw new RuntimeError('Variable "studentEnrolled" does not exist.', 267, $this->source); })()));
  260. foreach ($context['_seq'] as $context["_key"] => $context["std"]) {
  261. // line 268
  262. yield " <tr>
  263. <td>
  264. <a href=\"";
  265. // line 270
  266. 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, 270)]), "html", null, true);
  267. yield "\">
  268. ";
  269. // line 271
  270. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["std"], "matricule", [], "any", false, false, false, 271), "html", null, true);
  271. yield "
  272. </a>
  273. </td>
  274. <td>
  275. ";
  276. // line 275
  277. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["std"], "lastname", [], "any", false, false, false, 275), "html", null, true);
  278. yield "
  279. </td>
  280. <td>
  281. ";
  282. // line 278
  283. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["std"], "firstname", [], "any", false, false, false, 278), "html", null, true);
  284. yield "
  285. </td>
  286. <td>
  287. ";
  288. // line 281
  289. 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.', 281, $this->source); })()), CoreExtension::getAttribute($this->env, $this->source, $context["std"], "id", [], "any", false, false, false, 281), [], "array", false, false, false, 281), "html", null, true);
  290. yield "
  291. </td>
  292. <td>
  293. ";
  294. // line 284
  295. if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) {
  296. // line 285
  297. yield " <a class=\"btn btn-outline-danger\" href=\"";
  298. 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, 285), "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.', 285, $this->source); })()), "id", [], "any", false, false, false, 285)]), "html", null, true);
  299. yield "\">
  300. <i class=\"fa fa-ban\"></i>
  301. </a>
  302. <a class=\"btn btn-outline-warning\" href=\"";
  303. // line 288
  304. 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, 288)]), "html", null, true);
  305. yield "\">
  306. <i class=\"fa fa-pencil-square-o\" aria-hidden=\"true\"></i>
  307. </a>
  308. ";
  309. }
  310. // line 292
  311. yield "
  312. </td>
  313. ";
  314. // line 294
  315. $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);
  316. // line 295
  317. yield "
  318. </tr>
  319. ";
  320. }
  321. $_parent = $context['_parent'];
  322. unset($context['_seq'], $context['_key'], $context['std'], $context['_parent']);
  323. $context = array_intersect_key($context, $_parent) + $_parent;
  324. // line 299
  325. yield " <tr>
  326. <td class=\"center\" colspan=\"2\">
  327. Effectif
  328. </td>
  329. <td>
  330. ";
  331. // line 311
  332. 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);
  333. yield "
  334. </td>
  335. </tr>
  336. </tbody>
  337. </table>
  338. <div class=\"card-header text-center\">
  339. <h2>
  340. Matières programmées dans la classe
  341. </h2>
  342. </div>
  343. <table class=\"table table-striped table-hover table-bordered records_list center\">
  344. <thead>
  345. <tr>
  346. <th scope=\"col\">
  347. Module
  348. </th>
  349. <th scope=\"col\">
  350. Code
  351. </th>
  352. <th scope=\"col\">
  353. Intitulé
  354. </th>
  355. <th scope=\"col\">
  356. Coef
  357. </th>
  358. <th scope=\"col\">
  359. Enseignant
  360. </th>
  361. </tr>
  362. </thead>
  363. <tbody>
  364. ";
  365. // line 388
  366. $context["totalCoef"] = 0;
  367. // line 389
  368. yield " ";
  369. $context['_parent'] = $context;
  370. $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); })()));
  371. foreach ($context['_seq'] as $context["_key"] => $context["module"]) {
  372. // line 390
  373. yield " <tr>
  374. ";
  375. // line 392
  376. $context['_parent'] = $context;
  377. $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, $context["module"], "courses", [], "any", false, false, false, 392));
  378. foreach ($context['_seq'] as $context["_key"] => $context["course"]) {
  379. // line 393
  380. yield " <tr>
  381. <td>
  382. ";
  383. // line 395
  384. 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);
  385. yield "
  386. </td>
  387. <td>
  388. <a href=\"";
  389. // line 398
  390. 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);
  391. yield "\">
  392. ";
  393. // line 399
  394. 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);
  395. yield "
  396. </a>
  397. </td>
  398. <td>
  399. ";
  400. // line 404
  401. 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);
  402. yield "
  403. </td>
  404. <td>
  405. ";
  406. // line 407
  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);
  408. yield "
  409. </td>
  410. <td>
  411. ";
  412. // line 411
  413. 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)) {
  414. // line 412
  415. yield " ";
  416. if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) {
  417. // line 413
  418. yield " <a href=\"";
  419. 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);
  420. yield "\">
  421. ";
  422. // line 414
  423. 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);
  424. yield "
  425. </a>
  426. ";
  427. } else {
  428. // line 417
  429. yield " ";
  430. 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);
  431. yield "
  432. ";
  433. }
  434. // line 419
  435. yield " ";
  436. } else {
  437. // line 420
  438. yield " ";
  439. if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) {
  440. // line 421
  441. yield " <a href=\"";
  442. yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_attributions_new");
  443. yield "\">
  444. Pas encore attribue
  445. </a>
  446. ";
  447. }
  448. // line 425
  449. yield " ";
  450. }
  451. // line 426
  452. yield "
  453. </td>
  454. ";
  455. // line 428
  456. $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));
  457. // line 429
  458. yield " </tr>
  459. ";
  460. }
  461. $_parent = $context['_parent'];
  462. unset($context['_seq'], $context['_key'], $context['course'], $context['_parent']);
  463. $context = array_intersect_key($context, $_parent) + $_parent;
  464. // line 431
  465. yield "
  466. </tr>
  467. <tr>
  468. <td class=\"center\" colspan=\"3\">
  469. total cumul coef
  470. </td>
  471. <td>
  472. ";
  473. // line 445
  474. 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);
  475. yield "
  476. </td>
  477. </tr>
  478. ";
  479. }
  480. $_parent = $context['_parent'];
  481. unset($context['_seq'], $context['_key'], $context['module'], $context['_parent']);
  482. $context = array_intersect_key($context, $_parent) + $_parent;
  483. // line 449
  484. yield "
  485. </tbody>
  486. </table>
  487. </article>
  488. <section id=\"graphs\">
  489. <article class=\"p-3\">
  490. <canvas id=\"schoolPerformanceGraph\" width=\"700\" height=\"250\"></canvas>
  491. </article>
  492. ";
  493. // line 457
  494. 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)) {
  495. // line 458
  496. yield " <article class=\"p-3\">
  497. <canvas id=\"officialExamsGraph\" width=\"200\" height=\"220\" ></canvas>
  498. </article>
  499. ";
  500. }
  501. // line 462
  502. yield " </section>
  503. </div>
  504. </div>
  505. <!-- Modal pour le choix de cours qui vont figurer dans le recaputulatif sequentiel -->
  506. <div class=\"modal fade\" id=\"form_modal_courses\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"exampleModalLabel\" aria-hidden=\"true\">
  507. <div class=\"modal-dialog modal-dialog-centered\" role=\"document\">
  508. <div class=\"modal-content\">
  509. <div class=\"modal-header border-bottom-0\">
  510. <h5 class=\"modal-title\" id=\"exampleModalLabel\">Choisir les cours a qui doivent figurer dans le recapitulatif</h5>
  511. <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">
  512. <span aria-hidden=\"true\">&times;</span>
  513. </button>
  514. </div>
  515. <!-- href=\" -->
  516. <form action=\"#\" method=\"post\">
  517. <div class=\"modal-body\">
  518. <div class=\"form-group\">
  519. ";
  520. // line 479
  521. $context['_parent'] = $context;
  522. $context['_seq'] = CoreExtension::ensureTraversable((isset($context["modules"]) || array_key_exists("modules", $context) ? $context["modules"] : (function () { throw new RuntimeError('Variable "modules" does not exist.', 479, $this->source); })()));
  523. foreach ($context['_seq'] as $context["_key"] => $context["module"]) {
  524. // line 480
  525. yield " ";
  526. $context['_parent'] = $context;
  527. $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, $context["module"], "courses", [], "any", false, false, false, 480));
  528. foreach ($context['_seq'] as $context["_key"] => $context["course"]) {
  529. // line 481
  530. yield " <li class=\"list-group-item\">
  531. <input class=\"form-check-input me-1\" type=\"checkbox\" checked name=\"selected_courses[]\" value=";
  532. // line 482
  533. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["course"], "id", [], "any", false, false, false, 482), "html", null, true);
  534. yield " >
  535. ";
  536. // line 483
  537. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["course"], "wording", [], "any", false, false, false, 483), "html", null, true);
  538. yield "
  539. </li>
  540. ";
  541. }
  542. $_parent = $context['_parent'];
  543. unset($context['_seq'], $context['_key'], $context['course'], $context['_parent']);
  544. $context = array_intersect_key($context, $_parent) + $_parent;
  545. // line 486
  546. yield " ";
  547. }
  548. $_parent = $context['_parent'];
  549. unset($context['_seq'], $context['_key'], $context['module'], $context['_parent']);
  550. $context = array_intersect_key($context, $_parent) + $_parent;
  551. // line 487
  552. yield " </div>
  553. </div>
  554. <div class=\"modal-footer border-top-0 d-flex justify-content-center\">
  555. <button type=\"submit\" class=\"btn btn-success\">Submit</button>
  556. </div>
  557. </form>
  558. </div>
  559. </div>
  560. </div>
  561. <!-- Modal pour le parametrage de la presentation des bulletins. -->
  562. <div class=\"modal fade\" id=\"form_modal_reportcard_params\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"exampleModalRange\" aria-hidden=\"true\">
  563. <div class=\"modal-dialog modal-dialog-centered\" role=\"document\">
  564. <div class=\"modal-content\">
  565. <div class=\"modal-header border-bottom-0\">
  566. <h5 class=\"modal-title\" id=\"exampleModalLabel\">Reajuster les parametres de production des bulletins</h5>
  567. <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">
  568. <span aria-hidden=\"true\">&times;</span>
  569. </button>
  570. </div>
  571. <form action=\"";
  572. // line 507
  573. 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.', 507, $this->source); })()), "id", [], "any", false, false, false, 507)]), "html", null, true);
  574. yield "\" method=\"post\">
  575. <div class=\"modal-body\">
  576. <div class=\"form-group\">
  577. <label for=\"header_font_size\">Taille de des caracteres dans l entete</label>
  578. <input type=\"range\" class=\"form-control\" name=\"header_font_size\" id=\"header_font_size\" min=\"1\" max=\"1.6\" step=\"0.01\">
  579. </div>
  580. <div class=\"form-group\">
  581. <label for=\"line_height\">Hauteur des lignes dans le tableau</label>
  582. <input type=\"range\" class=\"form-control\" name=\"line_height\" id=\"line_height\" min=\"0.5\" max=\"1.5\" step=\"0.01\">
  583. </div>
  584. <div class=\"form-check\">
  585. <input class=\"form-check-input\" type=\"checkbox\" id=\"copyright\" name=\"copyright\">
  586. <label class=\"form-check-label\" for=\"copyright\">
  587. Ajout du copyright en pied du bulletin?
  588. </label>
  589. </div>
  590. <div class=\"form-check\">
  591. <input class=\"form-check-input\" type=\"checkbox\" id=\"reverse\" name=\"reverse\">
  592. <label class=\"form-check-label\" for=\"reverse\">
  593. Sens inverse
  594. </label>
  595. </div>
  596. </div>
  597. <div class=\"modal-footer border-top-0 d-flex justify-content-center\">
  598. <button type=\"submit\" class=\"btn btn-success\">Submit</button>
  599. </div>
  600. </form>
  601. </div>
  602. </div>
  603. </div>
  604. ";
  605. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  606. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  607. yield from [];
  608. }
  609. // line 539
  610. /**
  611. * @return iterable<null|scalar|\Stringable>
  612. */
  613. public function block_javascripts(array $context, array $blocks = []): iterable
  614. {
  615. $macros = $this->macros;
  616. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  617. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
  618. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  619. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
  620. // line 540
  621. yield " ";
  622. yield from $this->yieldParentBlock("javascripts", $context, $blocks);
  623. yield "
  624. <script type=\"text/javascript\">
  625. // Attendre que le DOM soit complètement chargé
  626. \$(document).ready(function() {
  627. // Quand le modal est ouvert
  628. \$('#form_modal_courses').on('show.bs.modal', function(event) {
  629. // Récupérer l'élément qui a déclenché l'ouverture du modal
  630. var button = \$(event.relatedTarget);
  631. // Récupérer l'URL dynamique depuis l'attribut \"data-action\"
  632. var actionUrl = button.data('action');
  633. // Mettre à jour l'attribut \"action\" du formulaire
  634. \$('#form_modal_courses form').attr('action', actionUrl);
  635. });
  636. });
  637. </script>
  638. <script type=\"text/javascript\">
  639. const schoolPerformanceGraph = \$(\"#schoolPerformanceGraph\");
  640. const datasets = [];
  641. //Generate a random color
  642. const randomRgbColor = () => {
  643. let r = Math.floor(Math.random() * 256); // Random between 0-255
  644. let g = Math.floor(Math.random() * 256); // Random between 0-255
  645. let b = Math.floor(Math.random() * 256); // Random between 0-255
  646. return 'rgb(' + r + ',' + g + ',' + b + ')';
  647. };
  648. ";
  649. // line 571
  650. if (array_key_exists("session1", $context)) {
  651. // line 572
  652. yield " datasets.push( {
  653. label: \"Session 1\",
  654. data : ";
  655. // line 574
  656. yield (isset($context["session1"]) || array_key_exists("session1", $context) ? $context["session1"] : (function () { throw new RuntimeError('Variable "session1" does not exist.', 574, $this->source); })());
  657. yield ",
  658. fill : false,
  659. backgroundColor: randomRgbColor()
  660. } )
  661. ";
  662. }
  663. // line 579
  664. yield " ";
  665. if (array_key_exists("session2", $context)) {
  666. // line 580
  667. yield " datasets.push( {
  668. label: \"Session 2\",
  669. data : ";
  670. // line 582
  671. yield (isset($context["session2"]) || array_key_exists("session2", $context) ? $context["session2"] : (function () { throw new RuntimeError('Variable "session2" does not exist.', 582, $this->source); })());
  672. yield ",
  673. fill : false,
  674. backgroundColor: randomRgbColor()
  675. } )
  676. ";
  677. }
  678. // line 587
  679. yield " ";
  680. if (array_key_exists("session3", $context)) {
  681. // line 588
  682. yield " datasets.push( {
  683. label: \"Session 3\",
  684. data : ";
  685. // line 590
  686. yield (isset($context["session3"]) || array_key_exists("session3", $context) ? $context["session3"] : (function () { throw new RuntimeError('Variable "session3" does not exist.', 590, $this->source); })());
  687. yield ",
  688. fill : false,
  689. backgroundColor: randomRgbColor()
  690. } )
  691. ";
  692. }
  693. // line 595
  694. yield " ";
  695. if (array_key_exists("session4", $context)) {
  696. // line 596
  697. yield " datasets.push( {
  698. label: \"Session 4\",
  699. data : ";
  700. // line 598
  701. yield (isset($context["session4"]) || array_key_exists("session4", $context) ? $context["session4"] : (function () { throw new RuntimeError('Variable "session4" does not exist.', 598, $this->source); })());
  702. yield ",
  703. fill : false,
  704. backgroundColor: randomRgbColor()
  705. } )
  706. ";
  707. }
  708. // line 603
  709. yield " ";
  710. if (array_key_exists("session5", $context)) {
  711. // line 604
  712. yield " datasets.push( {
  713. label: \"Session 5\",
  714. data : ";
  715. // line 606
  716. yield (isset($context["session5"]) || array_key_exists("session5", $context) ? $context["session5"] : (function () { throw new RuntimeError('Variable "session5" does not exist.', 606, $this->source); })());
  717. yield ",
  718. fill : false,
  719. backgroundColor: randomRgbColor()
  720. } )
  721. ";
  722. }
  723. // line 611
  724. yield " ";
  725. if (array_key_exists("session6", $context)) {
  726. // line 612
  727. yield " datasets.push( {
  728. label: \"Session 6\",
  729. data : ";
  730. // line 614
  731. yield (isset($context["session6"]) || array_key_exists("session6", $context) ? $context["session6"] : (function () { throw new RuntimeError('Variable "session6" does not exist.', 614, $this->source); })());
  732. yield ",
  733. fill : false,
  734. backgroundColor: randomRgbColor()
  735. } )
  736. ";
  737. }
  738. // line 619
  739. yield "
  740. let graph = new Chart(schoolPerformanceGraph, {
  741. type:\"bar\",
  742. data : {
  743. labels: ";
  744. // line 630
  745. yield (isset($context["cours"]) || array_key_exists("cours", $context) ? $context["cours"] : (function () { throw new RuntimeError('Variable "cours" does not exist.', 630, $this->source); })());
  746. yield ",
  747. datasets: datasets,
  748. },
  749. options: {
  750. plugins: {
  751. title: {
  752. display: true,
  753. text: 'Performances generales annuelles ',
  754. font: {
  755. size: 24,
  756. style: 'bold',
  757. family: 'Helvetica Neue',
  758. },
  759. position: 'bottom',
  760. }
  761. }
  762. }
  763. });
  764. // Get the chart element for student category
  765. let studentCategoryChartElement = document.querySelector(\"#studentCategoryChart\");
  766. // Create the chart for student category
  767. let studentCategoryChart = new Chart(studentCategoryChartElement, {
  768. type: \"pie\",
  769. data: {
  770. labels: [\"Passed\", \"Failed\"],
  771. datasets: [{
  772. data: [/* Add data here for the number of students passed and failed */],
  773. backgroundColor: [\"green\", \"red\"]
  774. }]
  775. }
  776. });
  777. // Get the chart element for mention category
  778. let officialExamsGraph = document.querySelector(\"#officialExamsGraph\");
  779. // Create the chart for mention category
  780. const colors = [];
  781. const mentionCountCategories = ";
  782. // line 672
  783. 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.', 672, $this->source); })()), "html", null, true);
  784. yield ";
  785. mentionCountCategories.map(cat => {
  786. colors.push(randomRgbColor());
  787. })
  788. let officialExamsChart = new Chart(officialExamsGraph, {
  789. type: \"pie\",
  790. data: {
  791. labels: ";
  792. // line 679
  793. yield (isset($context["mentionCategories"]) || array_key_exists("mentionCategories", $context) ? $context["mentionCategories"] : (function () { throw new RuntimeError('Variable "mentionCategories" does not exist.', 679, $this->source); })());
  794. yield ",
  795. datasets: [{
  796. data: ";
  797. // line 681
  798. yield (isset($context["mentionCountCategories"]) || array_key_exists("mentionCountCategories", $context) ? $context["mentionCountCategories"] : (function () { throw new RuntimeError('Variable "mentionCountCategories" does not exist.', 681, $this->source); })());
  799. yield ",
  800. backgroundColor: colors
  801. }]
  802. },
  803. options: {
  804. plugins: {
  805. title: {
  806. display: true,
  807. text: 'Resultats aux examens officiels ',
  808. font: {
  809. size: 24,
  810. style: 'bold',
  811. family: 'Helvetica Neue',
  812. },
  813. position: 'bottom',
  814. }
  815. }
  816. }
  817. });
  818. </script>
  819. ";
  820. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  821. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  822. yield from [];
  823. }
  824. /**
  825. * @codeCoverageIgnore
  826. */
  827. public function getTemplateName(): string
  828. {
  829. return "classroom/show.html.twig";
  830. }
  831. /**
  832. * @codeCoverageIgnore
  833. */
  834. public function isTraitable(): bool
  835. {
  836. return false;
  837. }
  838. /**
  839. * @codeCoverageIgnore
  840. */
  841. public function getDebugInfo(): array
  842. {
  843. return array ( 1040 => 681, 1035 => 679, 1025 => 672, 980 => 630, 967 => 619, 959 => 614, 955 => 612, 952 => 611, 944 => 606, 940 => 604, 937 => 603, 929 => 598, 925 => 596, 922 => 595, 914 => 590, 910 => 588, 907 => 587, 899 => 582, 895 => 580, 892 => 579, 884 => 574, 880 => 572, 878 => 571, 843 => 540, 830 => 539, 787 => 507, 765 => 487, 759 => 486, 750 => 483, 746 => 482, 743 => 481, 738 => 480, 734 => 479, 715 => 462, 709 => 458, 707 => 457, 697 => 449, 687 => 445, 671 => 431, 664 => 429, 662 => 428, 658 => 426, 655 => 425, 647 => 421, 644 => 420, 641 => 419, 635 => 417, 629 => 414, 624 => 413, 621 => 412, 619 => 411, 612 => 407, 606 => 404, 598 => 399, 594 => 398, 588 => 395, 584 => 393, 580 => 392, 576 => 390, 571 => 389, 569 => 388, 489 => 311, 475 => 299, 466 => 295, 464 => 294, 460 => 292, 453 => 288, 446 => 285, 444 => 284, 438 => 281, 432 => 278, 426 => 275, 419 => 271, 415 => 270, 411 => 268, 406 => 267, 404 => 266, 332 => 196, 326 => 193, 308 => 178, 281 => 154, 273 => 149, 252 => 131, 244 => 126, 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,);
  844. }
  845. public function getSourceContext(): Source
  846. {
  847. return new Source("{% extends \"layout/backEndLayout.html.twig\" %}
  848. {% block content %}
  849. <div class=\"row mt-4\">
  850. <div class=\"col-1 mar-bot30\">
  851. {% if is_granted('ROLE_ADMIN') %}
  852. <a class=\"btn btn-info\" href=\"{{ path('admin_classrooms_new') }}\">
  853. <i class=\"fa fa-plus\"></i>
  854. </a>
  855. {% endif %}
  856. </div>
  857. </div>
  858. <div class=\"col-11 jumbotron\">
  859. <article class=\"p-3\">
  860. <table class=\"table table-hover record_properties center\">
  861. <tbody>
  862. <tr>
  863. <th scope=\"row\">
  864. Nom
  865. </th>
  866. <td>
  867. {{ classroom.name }}
  868. </td>
  869. </tr>
  870. <tr>
  871. <th scope=\"row\">
  872. Niveau
  873. </th>
  874. <td>
  875. {{ classroom.level }}
  876. </td>
  877. </tr>
  878. <tr>
  879. <th scope=\"row\">
  880. Titulaire
  881. </th>
  882. <td>
  883. {% if mainteacher is null %}
  884. {% else %}
  885. {{mainteacher.fullName}}
  886. {% endif %}
  887. </td>
  888. </tr>
  889. <tr>
  890. <th scope=\"row\">
  891. Classe d'examen
  892. </th>
  893. <td>
  894. {% if (classroom.apc == true) %}
  895. OUI
  896. \t\t\t\t\t\t\t\t
  897. {% else %}
  898. NON
  899. \t\t\t\t\t\t\t\t
  900. {% endif %}
  901. </td>
  902. </tr>
  903. </tbody>
  904. </table>
  905. <div class=\"btn-group record_actions\">
  906. <a class=\"btn btn-info\" href=\"{{ path('admin_classrooms') }}\">
  907. <i class=\"fa fa-list\"></i>
  908. {{ 'Listing'|trans({}, 'admin') }}
  909. </a>
  910. {% if is_granted('ROLE_ADMIN') %}
  911. <a class=\"btn btn-primary\" href=\"{{ path('admin_classrooms_edit', {id: classroom.id}) }}\">
  912. <i class=\"fa fa-edit\"></i>
  913. {{ 'Edit'|trans({}, 'admin') }}
  914. </a>
  915. <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}) }}\">
  916. <i class=\"fa fa-file-excel-o\"></i>
  917. Recap. Seq
  918. </a>
  919. <a target=\"_blank\" class=\"btn btn-warning\" href=\"{{ path('admin_classrooms_reportcards_seq', {id: classroom.id}) }}\">
  920. <i class=\"fa fa-file\"></i>
  921. Bull Seq
  922. </a>
  923. <a target=\"_blank\" class=\"btn btn-file\"data-toggle=\"modal\" data-target=\"#form_modal_reportcard_params\">
  924. <i class=\"fa fa-file\"></i>
  925. Bull Trim
  926. </a>
  927. <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}) }}\" >
  928. <i class=\"fa fa-file-excel-o\"></i>
  929. Recap Trim
  930. </a>
  931. <a target=\"_blank\" class=\"btn btn-file\" href=\"{{ path('admin_class_reportcards_apc_year', {id: classroom.id}) }}\">
  932. <i class=\"fa fa-file\"></i>
  933. Bull Ann V1
  934. </a>
  935. <a target=\"_blank\" class=\"btn btn-file\" >
  936. <i class=\"fa fa-file\"></i>
  937. Bull Ann V2
  938. </a>
  939. <a target=\"_blank\" class=\"btn btn-light\" href=\"{{ path('admin_current_fulfilled_eval_show', {id: classroom.id}) }}\">
  940. <i class=\"fa fa-list-ul\"></i>
  941. Dépot des PV
  942. </a>
  943. <button class=\"btn btn-danger\" type=\"submit\">
  944. <i class=\"fa fa-trash-o\"></i>
  945. {{ 'Delete'|trans({}, 'admin') }}
  946. </button>
  947. {% endif %}
  948. </div>
  949. <div class=\"card-header text-center\">
  950. <h2>
  951. Liste des élèves incrits dans la classe
  952. </h2>
  953. </div>
  954. <table class=\"table table-striped table-hover table-bordered records_list center\">
  955. <thead>
  956. <tr>
  957. <th scope=\"col\">
  958. Matricule
  959. </th>
  960. <th scope=\"col\">
  961. Nom
  962. </th>
  963. <th scope=\"col\">
  964. Prénom
  965. </th>
  966. <th scope=\"col\">
  967. Photo
  968. </th>
  969. <th scope=\"col\">
  970. Action
  971. </th>
  972. </tr>
  973. </thead>
  974. <tbody>
  975. {% set effectif =0 %}
  976. {% for std in studentEnrolled %}
  977. <tr>
  978. <td>
  979. <a href=\"{{ path('admin_students_show', {id: std.id}) }}\">
  980. {{ std.matricule }}
  981. </a>
  982. </td>
  983. <td>
  984. {{ std.lastname }}
  985. </td>
  986. <td>
  987. {{ std.firstname }}
  988. </td>
  989. <td>
  990. {{ fileExists[std.id] }}
  991. </td>
  992. <td>
  993. {% if is_granted('ROLE_ADMIN') %}
  994. <a class=\"btn btn-outline-danger\" href=\"{{ path('admin_students_unregister', {id: std.id, room_id:classroom.id}) }}\">
  995. <i class=\"fa fa-ban\"></i>
  996. </a>
  997. <a class=\"btn btn-outline-warning\" href=\"{{ path('admin_students_edit', {id: std.id}) }}\">
  998. <i class=\"fa fa-pencil-square-o\" aria-hidden=\"true\"></i>
  999. </a>
  1000. {% endif %}
  1001. </td>
  1002. {% set effectif = effectif + 1 %}
  1003. </tr>
  1004. {% endfor %}
  1005. <tr>
  1006. <td class=\"center\" colspan=\"2\">
  1007. Effectif
  1008. </td>
  1009. <td>
  1010. {{ effectif }}
  1011. </td>
  1012. </tr>
  1013. </tbody>
  1014. </table>
  1015. <div class=\"card-header text-center\">
  1016. <h2>
  1017. Matières programmées dans la classe
  1018. </h2>
  1019. </div>
  1020. <table class=\"table table-striped table-hover table-bordered records_list center\">
  1021. <thead>
  1022. <tr>
  1023. <th scope=\"col\">
  1024. Module
  1025. </th>
  1026. <th scope=\"col\">
  1027. Code
  1028. </th>
  1029. <th scope=\"col\">
  1030. Intitulé
  1031. </th>
  1032. <th scope=\"col\">
  1033. Coef
  1034. </th>
  1035. <th scope=\"col\">
  1036. Enseignant
  1037. </th>
  1038. </tr>
  1039. </thead>
  1040. <tbody>
  1041. {% set totalCoef =0 %}
  1042. {% for module in modules %}
  1043. <tr>
  1044. {% for course in module.courses %}
  1045. <tr>
  1046. <td>
  1047. {{ module.name }}
  1048. </td>
  1049. <td>
  1050. <a href=\"{{ path('admin_courses_show', {id: course.id}) }}\">
  1051. {{ course.code }}
  1052. </a>
  1053. </td>
  1054. <td>
  1055. {{ course.wording }}
  1056. </td>
  1057. <td>
  1058. {{ course.coefficient }}
  1059. </td>
  1060. <td>
  1061. {% if attributions[course.id] is defined %}
  1062. {% if is_granted('ROLE_ADMIN') %}
  1063. <a href=\"{{ path('admin_attributions_edit', {id: attributions[course.id].id}) }}\">
  1064. {{attributions[course.id].teacher.fullName}}
  1065. </a>
  1066. {% else %}
  1067. {{attributions[course.id].teacher.fullName}}
  1068. {% endif %}
  1069. {% else %}
  1070. {% if is_granted('ROLE_ADMIN') %}
  1071. <a href=\"{{ path('admin_attributions_new') }}\">
  1072. Pas encore attribue
  1073. </a>
  1074. {% endif %}
  1075. {% endif %}
  1076. </td>
  1077. {% set totalCoef = totalCoef+course.coefficient %}
  1078. </tr>
  1079. {% endfor %}
  1080. </tr>
  1081. <tr>
  1082. <td class=\"center\" colspan=\"3\">
  1083. total cumul coef
  1084. </td>
  1085. <td>
  1086. {{ totalCoef }}
  1087. </td>
  1088. </tr>
  1089. {% endfor %}
  1090. </tbody>
  1091. </table>
  1092. </article>
  1093. <section id=\"graphs\">
  1094. <article class=\"p-3\">
  1095. <canvas id=\"schoolPerformanceGraph\" width=\"700\" height=\"250\"></canvas>
  1096. </article>
  1097. {% if classroom.apc %}
  1098. <article class=\"p-3\">
  1099. <canvas id=\"officialExamsGraph\" width=\"200\" height=\"220\" ></canvas>
  1100. </article>
  1101. {% endif %}
  1102. </section>
  1103. </div>
  1104. </div>
  1105. <!-- Modal pour le choix de cours qui vont figurer dans le recaputulatif sequentiel -->
  1106. <div class=\"modal fade\" id=\"form_modal_courses\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"exampleModalLabel\" aria-hidden=\"true\">
  1107. <div class=\"modal-dialog modal-dialog-centered\" role=\"document\">
  1108. <div class=\"modal-content\">
  1109. <div class=\"modal-header border-bottom-0\">
  1110. <h5 class=\"modal-title\" id=\"exampleModalLabel\">Choisir les cours a qui doivent figurer dans le recapitulatif</h5>
  1111. <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">
  1112. <span aria-hidden=\"true\">&times;</span>
  1113. </button>
  1114. </div>
  1115. <!-- href=\" -->
  1116. <form action=\"#\" method=\"post\">
  1117. <div class=\"modal-body\">
  1118. <div class=\"form-group\">
  1119. {% for module in modules %}
  1120. {% for course in module.courses %}
  1121. <li class=\"list-group-item\">
  1122. <input class=\"form-check-input me-1\" type=\"checkbox\" checked name=\"selected_courses[]\" value={{course.id}} >
  1123. {{course.wording}}
  1124. </li>
  1125. {% endfor %}
  1126. {% endfor %}
  1127. </div>
  1128. </div>
  1129. <div class=\"modal-footer border-top-0 d-flex justify-content-center\">
  1130. <button type=\"submit\" class=\"btn btn-success\">Submit</button>
  1131. </div>
  1132. </form>
  1133. </div>
  1134. </div>
  1135. </div>
  1136. <!-- Modal pour le parametrage de la presentation des bulletins. -->
  1137. <div class=\"modal fade\" id=\"form_modal_reportcard_params\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"exampleModalRange\" aria-hidden=\"true\">
  1138. <div class=\"modal-dialog modal-dialog-centered\" role=\"document\">
  1139. <div class=\"modal-content\">
  1140. <div class=\"modal-header border-bottom-0\">
  1141. <h5 class=\"modal-title\" id=\"exampleModalLabel\">Reajuster les parametres de production des bulletins</h5>
  1142. <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">
  1143. <span aria-hidden=\"true\">&times;</span>
  1144. </button>
  1145. </div>
  1146. <form action=\"{{ path('admin_classrooms_reportcards_trim_2024', {'id':classroom.id}) }}\" method=\"post\">
  1147. <div class=\"modal-body\">
  1148. <div class=\"form-group\">
  1149. <label for=\"header_font_size\">Taille de des caracteres dans l entete</label>
  1150. <input type=\"range\" class=\"form-control\" name=\"header_font_size\" id=\"header_font_size\" min=\"1\" max=\"1.6\" step=\"0.01\">
  1151. </div>
  1152. <div class=\"form-group\">
  1153. <label for=\"line_height\">Hauteur des lignes dans le tableau</label>
  1154. <input type=\"range\" class=\"form-control\" name=\"line_height\" id=\"line_height\" min=\"0.5\" max=\"1.5\" step=\"0.01\">
  1155. </div>
  1156. <div class=\"form-check\">
  1157. <input class=\"form-check-input\" type=\"checkbox\" id=\"copyright\" name=\"copyright\">
  1158. <label class=\"form-check-label\" for=\"copyright\">
  1159. Ajout du copyright en pied du bulletin?
  1160. </label>
  1161. </div>
  1162. <div class=\"form-check\">
  1163. <input class=\"form-check-input\" type=\"checkbox\" id=\"reverse\" name=\"reverse\">
  1164. <label class=\"form-check-label\" for=\"reverse\">
  1165. Sens inverse
  1166. </label>
  1167. </div>
  1168. </div>
  1169. <div class=\"modal-footer border-top-0 d-flex justify-content-center\">
  1170. <button type=\"submit\" class=\"btn btn-success\">Submit</button>
  1171. </div>
  1172. </form>
  1173. </div>
  1174. </div>
  1175. </div>
  1176. {% endblock %}
  1177. {% block javascripts %}
  1178. {{ parent() }}
  1179. <script type=\"text/javascript\">
  1180. // Attendre que le DOM soit complètement chargé
  1181. \$(document).ready(function() {
  1182. // Quand le modal est ouvert
  1183. \$('#form_modal_courses').on('show.bs.modal', function(event) {
  1184. // Récupérer l'élément qui a déclenché l'ouverture du modal
  1185. var button = \$(event.relatedTarget);
  1186. // Récupérer l'URL dynamique depuis l'attribut \"data-action\"
  1187. var actionUrl = button.data('action');
  1188. // Mettre à jour l'attribut \"action\" du formulaire
  1189. \$('#form_modal_courses form').attr('action', actionUrl);
  1190. });
  1191. });
  1192. </script>
  1193. <script type=\"text/javascript\">
  1194. const schoolPerformanceGraph = \$(\"#schoolPerformanceGraph\");
  1195. const datasets = [];
  1196. //Generate a random color
  1197. const randomRgbColor = () => {
  1198. let r = Math.floor(Math.random() * 256); // Random between 0-255
  1199. let g = Math.floor(Math.random() * 256); // Random between 0-255
  1200. let b = Math.floor(Math.random() * 256); // Random between 0-255
  1201. return 'rgb(' + r + ',' + g + ',' + b + ')';
  1202. };
  1203. {% if session1 is defined %}
  1204. datasets.push( {
  1205. label: \"Session 1\",
  1206. data : {{session1|raw}},
  1207. fill : false,
  1208. backgroundColor: randomRgbColor()
  1209. } )
  1210. {% endif %}
  1211. {% if session2 is defined %}
  1212. datasets.push( {
  1213. label: \"Session 2\",
  1214. data : {{session2|raw}},
  1215. fill : false,
  1216. backgroundColor: randomRgbColor()
  1217. } )
  1218. {% endif %}
  1219. {% if session3 is defined %}
  1220. datasets.push( {
  1221. label: \"Session 3\",
  1222. data : {{session3|raw}},
  1223. fill : false,
  1224. backgroundColor: randomRgbColor()
  1225. } )
  1226. {% endif %}
  1227. {% if session4 is defined %}
  1228. datasets.push( {
  1229. label: \"Session 4\",
  1230. data : {{session4|raw}},
  1231. fill : false,
  1232. backgroundColor: randomRgbColor()
  1233. } )
  1234. {% endif %}
  1235. {% if session5 is defined %}
  1236. datasets.push( {
  1237. label: \"Session 5\",
  1238. data : {{session5|raw}},
  1239. fill : false,
  1240. backgroundColor: randomRgbColor()
  1241. } )
  1242. {% endif %}
  1243. {% if session6 is defined %}
  1244. datasets.push( {
  1245. label: \"Session 6\",
  1246. data : {{session6|raw}},
  1247. fill : false,
  1248. backgroundColor: randomRgbColor()
  1249. } )
  1250. {% endif %}
  1251. let graph = new Chart(schoolPerformanceGraph, {
  1252. type:\"bar\",
  1253. data : {
  1254. labels: {{ cours|raw }},
  1255. datasets: datasets,
  1256. },
  1257. options: {
  1258. plugins: {
  1259. title: {
  1260. display: true,
  1261. text: 'Performances generales annuelles ',
  1262. font: {
  1263. size: 24,
  1264. style: 'bold',
  1265. family: 'Helvetica Neue',
  1266. },
  1267. position: 'bottom',
  1268. }
  1269. }
  1270. }
  1271. });
  1272. // Get the chart element for student category
  1273. let studentCategoryChartElement = document.querySelector(\"#studentCategoryChart\");
  1274. // Create the chart for student category
  1275. let studentCategoryChart = new Chart(studentCategoryChartElement, {
  1276. type: \"pie\",
  1277. data: {
  1278. labels: [\"Passed\", \"Failed\"],
  1279. datasets: [{
  1280. data: [/* Add data here for the number of students passed and failed */],
  1281. backgroundColor: [\"green\", \"red\"]
  1282. }]
  1283. }
  1284. });
  1285. // Get the chart element for mention category
  1286. let officialExamsGraph = document.querySelector(\"#officialExamsGraph\");
  1287. // Create the chart for mention category
  1288. const colors = [];
  1289. const mentionCountCategories = {{mentionCountCategories}};
  1290. mentionCountCategories.map(cat => {
  1291. colors.push(randomRgbColor());
  1292. })
  1293. let officialExamsChart = new Chart(officialExamsGraph, {
  1294. type: \"pie\",
  1295. data: {
  1296. labels: {{ mentionCategories|raw }},
  1297. datasets: [{
  1298. data: {{mentionCountCategories|raw}},
  1299. backgroundColor: colors
  1300. }]
  1301. },
  1302. options: {
  1303. plugins: {
  1304. title: {
  1305. display: true,
  1306. text: 'Resultats aux examens officiels ',
  1307. font: {
  1308. size: 24,
  1309. style: 'bold',
  1310. family: 'Helvetica Neue',
  1311. },
  1312. position: 'bottom',
  1313. }
  1314. }
  1315. }
  1316. });
  1317. </script>
  1318. {% endblock %}
  1319. ", "classroom/show.html.twig", "/var/www/prod/liveedu/templates/classroom/show.html.twig");
  1320. }
  1321. }