var/cache/dev/twig/03/0367d26fe4ee71843fbac68bc1623a40.php line 44

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_0c035c967b72fb6156d097bb36f556af 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->load("layout/backEndLayout.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 ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  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. </a>
  156. ";
  157. // line 120
  158. if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  159. // line 121
  160. yield " <a class=\"btn btn-primary\" href=\"";
  161. 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);
  162. yield "\">
  163. <i class=\"fa fa-edit\"></i>
  164. </a>
  165. <a target=\"_blank\" class=\"btn btn-file\" id=\"recap_seq\" data-toggle=\"modal\" data-target=\"#form_modal_courses\" data-action=\"";
  166. // line 126
  167. 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);
  168. yield "\">
  169. <i class=\"fa fa-file-pdf-o\"></i>
  170. Recap. Seq
  171. </a>
  172. <a target=\"_blank\" class=\"btn btn-warning\" href=\"";
  173. // line 131
  174. 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);
  175. yield "\">
  176. <i class=\"fa fa-file\"></i>
  177. Bull Seq
  178. </a>
  179. <a target=\"_blank\" class=\"btn btn-file\" data-toggle=\"modal\" id=\"bull_trim\" data-target=\"#form_modal_reportcard_params\" data-action=\"";
  180. // line 137
  181. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_classrooms_reportcards_trim_2024", ["id" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["classroom"]) || array_key_exists("classroom", $context) ? $context["classroom"] : (function () { throw new RuntimeError('Variable "classroom" does not exist.', 137, $this->source); })()), "id", [], "any", false, false, false, 137)]), "html", null, true);
  182. yield "\">
  183. <i class=\"fa fa-file\"></i>
  184. Bull Trim
  185. </a>
  186. <a target=\"_blank\" class=\"btn btn-outline-info\" id=\"bull_ann\" data-toggle=\"modal\" data-target=\"#form_modal_reportcard_params\" data-action=\"";
  187. // line 141
  188. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_class_reportcards_year_2024", ["id" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["classroom"]) || array_key_exists("classroom", $context) ? $context["classroom"] : (function () { throw new RuntimeError('Variable "classroom" does not exist.', 141, $this->source); })()), "id", [], "any", false, false, false, 141)]), "html", null, true);
  189. yield "\" >
  190. <i class=\"fa fa-file-pdf-o\"></i>
  191. Bull Ann
  192. </a>
  193. <a target=\"_blank\" class=\"btn btn-outline-warning\" id=\"recap_trim\" data-toggle=\"modal\" data-target=\"#form_modal_courses\" data-action=\"";
  194. // line 145
  195. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_classrooms_recapitulatif_trim", ["id" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["classroom"]) || array_key_exists("classroom", $context) ? $context["classroom"] : (function () { throw new RuntimeError('Variable "classroom" does not exist.', 145, $this->source); })()), "id", [], "any", false, false, false, 145)]), "html", null, true);
  196. yield "\" >
  197. <i class=\"fa fa-file-pdf-o\"></i>
  198. Recap Trim
  199. </a>
  200. <a target=\"_blank\" class=\"btn btn-outline-success\" id=\"recap_trim_excel\" data-toggle=\"modal\" data-target=\"#form_modal_courses\" data-action=\"";
  201. // line 150
  202. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_classrooms_recapitulatif_ann_excel", ["id" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["classroom"]) || array_key_exists("classroom", $context) ? $context["classroom"] : (function () { throw new RuntimeError('Variable "classroom" does not exist.', 150, $this->source); })()), "id", [], "any", false, false, false, 150)]), "html", null, true);
  203. yield "\" >
  204. <i class=\"fa fa-file-excel-o\"></i>
  205. Recap Ann
  206. </a>
  207. <a target=\"_blank\" class=\"btn btn-file\" href=\"";
  208. // line 155
  209. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_class_reportcards_apc_year", ["id" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["classroom"]) || array_key_exists("classroom", $context) ? $context["classroom"] : (function () { throw new RuntimeError('Variable "classroom" does not exist.', 155, $this->source); })()), "id", [], "any", false, false, false, 155)]), "html", null, true);
  210. yield "\">
  211. <i class=\"fa fa-file\"></i>
  212. Bull Ann V1
  213. </a>
  214. <button class=\"btn btn-danger\" type=\"submit\">
  215. <i class=\"fa fa-trash-o\"></i>
  216. </button>
  217. ";
  218. }
  219. // line 167
  220. yield " </div>
  221. <div class=\"card-header text-center\">
  222. <h2>
  223. Liste des élèves incrits dans la classe
  224. </h2>
  225. </div>
  226. <table class=\"table table-striped table-hover table-bordered records_list center\">
  227. <thead>
  228. <tr>
  229. <th scope=\"col\">
  230. Matricule
  231. </th>
  232. <th scope=\"col\">
  233. Nom
  234. </th>
  235. <th scope=\"col\">
  236. Prénom
  237. </th>
  238. <th scope=\"col\">
  239. Photo
  240. </th>
  241. <th scope=\"col\">
  242. Action
  243. </th>
  244. </tr>
  245. </thead>
  246. <tbody>
  247. ";
  248. // line 237
  249. $context["effectif"] = 0;
  250. // line 238
  251. yield " ";
  252. $context['_parent'] = $context;
  253. $context['_seq'] = CoreExtension::ensureTraversable((isset($context["studentEnrolled"]) || array_key_exists("studentEnrolled", $context) ? $context["studentEnrolled"] : (function () { throw new RuntimeError('Variable "studentEnrolled" does not exist.', 238, $this->source); })()));
  254. foreach ($context['_seq'] as $context["_key"] => $context["std"]) {
  255. // line 239
  256. yield " <tr>
  257. <td>
  258. <a href=\"";
  259. // line 241
  260. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_students_show", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["std"], "id", [], "any", false, false, false, 241)]), "html", null, true);
  261. yield "\">
  262. ";
  263. // line 242
  264. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["std"], "matricule", [], "any", false, false, false, 242), "html", null, true);
  265. yield "
  266. </a>
  267. </td>
  268. <td>
  269. ";
  270. // line 246
  271. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["std"], "lastname", [], "any", false, false, false, 246), "html", null, true);
  272. yield "
  273. </td>
  274. <td>
  275. ";
  276. // line 249
  277. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["std"], "firstname", [], "any", false, false, false, 249), "html", null, true);
  278. yield "
  279. </td>
  280. <td>
  281. ";
  282. // line 252
  283. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["fileExists"]) || array_key_exists("fileExists", $context) ? $context["fileExists"] : (function () { throw new RuntimeError('Variable "fileExists" does not exist.', 252, $this->source); })()), CoreExtension::getAttribute($this->env, $this->source, $context["std"], "id", [], "any", false, false, false, 252), [], "array", false, false, false, 252), "html", null, true);
  284. yield "
  285. </td>
  286. <td>
  287. ";
  288. // line 255
  289. if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  290. // line 256
  291. yield " <a class=\"btn btn-outline-danger\" href=\"";
  292. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_students_unregister", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["std"], "id", [], "any", false, false, false, 256), "room_id" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["classroom"]) || array_key_exists("classroom", $context) ? $context["classroom"] : (function () { throw new RuntimeError('Variable "classroom" does not exist.', 256, $this->source); })()), "id", [], "any", false, false, false, 256)]), "html", null, true);
  293. yield "\">
  294. <i class=\"fa fa-ban\"></i>
  295. </a>
  296. <a class=\"btn btn-outline-warning\" href=\"";
  297. // line 259
  298. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_students_edit", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["std"], "id", [], "any", false, false, false, 259)]), "html", null, true);
  299. yield "\">
  300. <i class=\"fa fa-pencil-square-o\" aria-hidden=\"true\"></i>
  301. </a>
  302. ";
  303. }
  304. // line 263
  305. yield "
  306. </td>
  307. ";
  308. // line 265
  309. $context["effectif"] = ((isset($context["effectif"]) || array_key_exists("effectif", $context) ? $context["effectif"] : (function () { throw new RuntimeError('Variable "effectif" does not exist.', 265, $this->source); })()) + 1);
  310. // line 266
  311. yield "
  312. </tr>
  313. ";
  314. }
  315. $_parent = $context['_parent'];
  316. unset($context['_seq'], $context['_key'], $context['std'], $context['_parent']);
  317. $context = array_intersect_key($context, $_parent) + $_parent;
  318. // line 270
  319. yield " <tr>
  320. <td class=\"center\" colspan=\"2\">
  321. Effectif
  322. </td>
  323. <td>
  324. ";
  325. // line 282
  326. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["effectif"]) || array_key_exists("effectif", $context) ? $context["effectif"] : (function () { throw new RuntimeError('Variable "effectif" does not exist.', 282, $this->source); })()), "html", null, true);
  327. yield "
  328. </td>
  329. </tr>
  330. </tbody>
  331. </table>
  332. <div class=\"card-header text-center\">
  333. <h2>
  334. Matières programmées dans la classe
  335. </h2>
  336. </div>
  337. <table class=\"table table-striped table-hover table-bordered records_list center\">
  338. <thead>
  339. <tr>
  340. <th scope=\"col\">
  341. Module
  342. </th>
  343. <th scope=\"col\">
  344. Code
  345. </th>
  346. <th scope=\"col\">
  347. Intitulé
  348. </th>
  349. <th scope=\"col\">
  350. Coef
  351. </th>
  352. <th scope=\"col\">
  353. Enseignant
  354. </th>
  355. </tr>
  356. </thead>
  357. <tbody>
  358. ";
  359. // line 359
  360. $context["totalCoef"] = 0;
  361. // line 360
  362. yield " ";
  363. $context['_parent'] = $context;
  364. $context['_seq'] = CoreExtension::ensureTraversable((isset($context["modules"]) || array_key_exists("modules", $context) ? $context["modules"] : (function () { throw new RuntimeError('Variable "modules" does not exist.', 360, $this->source); })()));
  365. foreach ($context['_seq'] as $context["_key"] => $context["module"]) {
  366. // line 361
  367. yield " <tr>
  368. ";
  369. // line 363
  370. $context['_parent'] = $context;
  371. $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, $context["module"], "courses", [], "any", false, false, false, 363));
  372. foreach ($context['_seq'] as $context["_key"] => $context["course"]) {
  373. // line 364
  374. yield " <tr>
  375. <td>
  376. ";
  377. // line 366
  378. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["module"], "name", [], "any", false, false, false, 366), "html", null, true);
  379. yield "
  380. </td>
  381. <td>
  382. <a href=\"";
  383. // line 369
  384. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_courses_show", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["course"], "id", [], "any", false, false, false, 369)]), "html", null, true);
  385. yield "\">
  386. ";
  387. // line 370
  388. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["course"], "code", [], "any", false, false, false, 370), "html", null, true);
  389. yield "
  390. </a>
  391. </td>
  392. <td>
  393. ";
  394. // line 375
  395. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["course"], "wording", [], "any", false, false, false, 375), "html", null, true);
  396. yield "
  397. </td>
  398. <td>
  399. ";
  400. // line 378
  401. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["course"], "coefficient", [], "any", false, false, false, 378), "html", null, true);
  402. yield "
  403. </td>
  404. <td>
  405. ";
  406. // line 382
  407. if (CoreExtension::getAttribute($this->env, $this->source, ($context["attributions"] ?? null), CoreExtension::getAttribute($this->env, $this->source, $context["course"], "id", [], "any", false, false, false, 382), [], "array", true, true, false, 382)) {
  408. // line 383
  409. yield " ";
  410. if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  411. // line 384
  412. yield " <a href=\"";
  413. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_attributions_edit", ["id" => CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["attributions"]) || array_key_exists("attributions", $context) ? $context["attributions"] : (function () { throw new RuntimeError('Variable "attributions" does not exist.', 384, $this->source); })()), CoreExtension::getAttribute($this->env, $this->source, $context["course"], "id", [], "any", false, false, false, 384), [], "array", false, false, false, 384), "id", [], "any", false, false, false, 384)]), "html", null, true);
  414. yield "\">
  415. ";
  416. // line 385
  417. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["attributions"]) || array_key_exists("attributions", $context) ? $context["attributions"] : (function () { throw new RuntimeError('Variable "attributions" does not exist.', 385, $this->source); })()), CoreExtension::getAttribute($this->env, $this->source, $context["course"], "id", [], "any", false, false, false, 385), [], "array", false, false, false, 385), "teacher", [], "any", false, false, false, 385), "fullName", [], "any", false, false, false, 385), "html", null, true);
  418. yield "
  419. </a>
  420. ";
  421. } else {
  422. // line 388
  423. yield " ";
  424. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["attributions"]) || array_key_exists("attributions", $context) ? $context["attributions"] : (function () { throw new RuntimeError('Variable "attributions" does not exist.', 388, $this->source); })()), CoreExtension::getAttribute($this->env, $this->source, $context["course"], "id", [], "any", false, false, false, 388), [], "array", false, false, false, 388), "teacher", [], "any", false, false, false, 388), "fullName", [], "any", false, false, false, 388), "html", null, true);
  425. yield "
  426. ";
  427. }
  428. // line 390
  429. yield " ";
  430. } else {
  431. // line 391
  432. yield " ";
  433. if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  434. // line 392
  435. yield " <a href=\"";
  436. yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_attributions_new");
  437. yield "\">
  438. Pas encore attribue
  439. </a>
  440. ";
  441. }
  442. // line 396
  443. yield " ";
  444. }
  445. // line 397
  446. yield "
  447. </td>
  448. ";
  449. // line 399
  450. $context["totalCoef"] = ((isset($context["totalCoef"]) || array_key_exists("totalCoef", $context) ? $context["totalCoef"] : (function () { throw new RuntimeError('Variable "totalCoef" does not exist.', 399, $this->source); })()) + CoreExtension::getAttribute($this->env, $this->source, $context["course"], "coefficient", [], "any", false, false, false, 399));
  451. // line 400
  452. yield " </tr>
  453. ";
  454. }
  455. $_parent = $context['_parent'];
  456. unset($context['_seq'], $context['_key'], $context['course'], $context['_parent']);
  457. $context = array_intersect_key($context, $_parent) + $_parent;
  458. // line 402
  459. yield "
  460. </tr>
  461. <tr>
  462. <td class=\"center\" colspan=\"3\">
  463. total cumul coef
  464. </td>
  465. <td>
  466. ";
  467. // line 416
  468. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["totalCoef"]) || array_key_exists("totalCoef", $context) ? $context["totalCoef"] : (function () { throw new RuntimeError('Variable "totalCoef" does not exist.', 416, $this->source); })()), "html", null, true);
  469. yield "
  470. </td>
  471. </tr>
  472. ";
  473. }
  474. $_parent = $context['_parent'];
  475. unset($context['_seq'], $context['_key'], $context['module'], $context['_parent']);
  476. $context = array_intersect_key($context, $_parent) + $_parent;
  477. // line 420
  478. yield "
  479. </tbody>
  480. </table>
  481. </article>
  482. <section id=\"graphs\">
  483. <article class=\"p-3\">
  484. <canvas id=\"schoolPerformanceGraph\" width=\"700\" height=\"250\"></canvas>
  485. </article>
  486. ";
  487. // line 428
  488. if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, (isset($context["classroom"]) || array_key_exists("classroom", $context) ? $context["classroom"] : (function () { throw new RuntimeError('Variable "classroom" does not exist.', 428, $this->source); })()), "apc", [], "any", false, false, false, 428)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  489. // line 429
  490. yield " <article class=\"p-3\">
  491. <canvas id=\"officialExamsGraph\" width=\"200\" height=\"220\" ></canvas>
  492. </article>
  493. ";
  494. }
  495. // line 433
  496. yield " </section>
  497. </div>
  498. </div>
  499. <!-- Modal pour le choix de cours qui vont figurer dans le recaputulatif sequentiel -->
  500. <div class=\"modal fade\" id=\"form_modal_courses\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"exampleModalLabel\" aria-hidden=\"true\">
  501. <div class=\"modal-dialog modal-dialog-centered\" role=\"document\">
  502. <div class=\"modal-content\">
  503. <div class=\"modal-header border-bottom-0\">
  504. <h5 class=\"modal-title\" id=\"exampleModalLabel\">Choisir les cours a qui doivent figurer dans le recapitulatif</h5>
  505. <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">
  506. <span aria-hidden=\"true\">&times;</span>
  507. </button>
  508. </div>
  509. <!-- href=\" -->
  510. <form action=\"#\" method=\"post\">
  511. <div class=\"modal-body\">
  512. <div class=\"form-group\">
  513. ";
  514. // line 450
  515. $context['_parent'] = $context;
  516. $context['_seq'] = CoreExtension::ensureTraversable((isset($context["modules"]) || array_key_exists("modules", $context) ? $context["modules"] : (function () { throw new RuntimeError('Variable "modules" does not exist.', 450, $this->source); })()));
  517. foreach ($context['_seq'] as $context["_key"] => $context["module"]) {
  518. // line 451
  519. yield " ";
  520. $context['_parent'] = $context;
  521. $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, $context["module"], "courses", [], "any", false, false, false, 451));
  522. foreach ($context['_seq'] as $context["_key"] => $context["course"]) {
  523. // line 452
  524. yield " <li class=\"list-group-item\">
  525. <input class=\"form-check-input me-1\" type=\"checkbox\" checked name=\"selected_courses[]\" value=";
  526. // line 453
  527. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["course"], "id", [], "any", false, false, false, 453), "html", null, true);
  528. yield " >
  529. ";
  530. // line 454
  531. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["course"], "wording", [], "any", false, false, false, 454), "html", null, true);
  532. yield "
  533. </li>
  534. ";
  535. }
  536. $_parent = $context['_parent'];
  537. unset($context['_seq'], $context['_key'], $context['course'], $context['_parent']);
  538. $context = array_intersect_key($context, $_parent) + $_parent;
  539. // line 457
  540. yield " ";
  541. }
  542. $_parent = $context['_parent'];
  543. unset($context['_seq'], $context['_key'], $context['module'], $context['_parent']);
  544. $context = array_intersect_key($context, $_parent) + $_parent;
  545. // line 458
  546. yield " </div>
  547. </div>
  548. <div class=\"modal-footer border-top-0 d-flex justify-content-center\">
  549. <button type=\"submit\" class=\"btn btn-success\">Submit</button>
  550. </div>
  551. </form>
  552. </div>
  553. </div>
  554. </div>
  555. <!-- Modal pour le parametrage de la presentation des bulletins. -->
  556. <div class=\"modal fade\" id=\"form_modal_reportcard_params\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"exampleModalRange\" aria-hidden=\"true\">
  557. <div class=\"modal-dialog modal-dialog-centered\" role=\"document\">
  558. <div class=\"modal-content\">
  559. <div class=\"modal-header border-bottom-0\">
  560. <h5 class=\"modal-title\" id=\"exampleModalLabel\">Reajuster les parametres de production des bulletins</h5>
  561. <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">
  562. <span aria-hidden=\"true\">&times;</span>
  563. </button>
  564. </div>
  565. <form method=\"post\">
  566. <div class=\"modal-body\">
  567. <div class=\"form-group\">
  568. <label for=\"header_font_size\">Taille de des caracteres dans l entete</label>
  569. <input type=\"range\" class=\"form-control\" name=\"header_font_size\" id=\"header_font_size\" min=\"1\" max=\"1.6\" step=\"0.01\">
  570. </div>
  571. <div class=\"form-group\">
  572. <label for=\"line_height\">Hauteur des lignes dans le tableau</label>
  573. <input type=\"range\" class=\"form-control\" name=\"line_height\" id=\"line_height\" min=\"0.5\" max=\"1.5\" step=\"0.01\">
  574. </div>
  575. <div class=\"form-check\">
  576. <input class=\"form-check-input\" type=\"checkbox\" id=\"copyright\" name=\"copyright\">
  577. <label class=\"form-check-label\" for=\"copyright\">
  578. Ajout du copyright en pied du bulletin?
  579. </label>
  580. </div>
  581. <div class=\"form-check\">
  582. <input class=\"form-check-input\" type=\"checkbox\" id=\"reverse\" name=\"reverse\">
  583. <label class=\"form-check-label\" for=\"reverse\">
  584. Sens inverse
  585. </label>
  586. </div>
  587. </div>
  588. <div class=\"modal-footer border-top-0 d-flex justify-content-center\">
  589. <button type=\"submit\" class=\"btn btn-success\">Submit</button>
  590. </div>
  591. </form>
  592. </div>
  593. </div>
  594. </div>
  595. ";
  596. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  597. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  598. yield from [];
  599. }
  600. // line 510
  601. /**
  602. * @return iterable<null|scalar|\Stringable>
  603. */
  604. public function block_javascripts(array $context, array $blocks = []): iterable
  605. {
  606. $macros = $this->macros;
  607. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  608. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
  609. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  610. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
  611. // line 511
  612. yield " ";
  613. yield from $this->yieldParentBlock("javascripts", $context, $blocks);
  614. yield "
  615. <script type=\"text/javascript\">
  616. // Attendre que le DOM soit complètement chargé
  617. \$(document).ready(function() {
  618. // Quand le modal est ouvert
  619. \$('#form_modal_courses').on('show.bs.modal', function(event) {
  620. // Récupérer l'élément qui a déclenché l'ouverture du modal
  621. var button = \$(event.relatedTarget);
  622. // Récupérer l'URL dynamique depuis l'attribut \"data-action\"
  623. var actionUrl = button.data('action');
  624. // Mettre à jour l'attribut \"action\" du formulaire
  625. \$('#form_modal_courses form').attr('action', actionUrl);
  626. });
  627. });
  628. </script>
  629. <script type=\"text/javascript\">
  630. \$(document).ready(function () {
  631. // Quand on clique sur un lien qui ouvre le modal
  632. \$('[data-toggle=\"modal\"]').on('click', function () {
  633. // Récupère l'URL depuis data-action
  634. var actionUrl = \$(this).data('action');
  635. console.log(actionUrl);
  636. // Met à jour l'attribut action du formulaire du modal
  637. \$('#form_modal_reportcard_params form').attr('action', actionUrl);
  638. });
  639. });
  640. </script>
  641. <script type=\"text/javascript\">
  642. const schoolPerformanceGraph = \$(\"#schoolPerformanceGraph\");
  643. const datasets = [];
  644. //Generate a random color
  645. const randomRgbColor = () => {
  646. let r = Math.floor(Math.random() * 256); // Random between 0-255
  647. let g = Math.floor(Math.random() * 256); // Random between 0-255
  648. let b = Math.floor(Math.random() * 256); // Random between 0-255
  649. return 'rgb(' + r + ',' + g + ',' + b + ')';
  650. };
  651. ";
  652. // line 555
  653. if (array_key_exists("session1", $context)) {
  654. // line 556
  655. yield " datasets.push( {
  656. label: \"Session 1\",
  657. data : ";
  658. // line 558
  659. yield (isset($context["session1"]) || array_key_exists("session1", $context) ? $context["session1"] : (function () { throw new RuntimeError('Variable "session1" does not exist.', 558, $this->source); })());
  660. yield ",
  661. fill : false,
  662. backgroundColor: randomRgbColor()
  663. } )
  664. ";
  665. }
  666. // line 563
  667. yield " ";
  668. if (array_key_exists("session2", $context)) {
  669. // line 564
  670. yield " datasets.push( {
  671. label: \"Session 2\",
  672. data : ";
  673. // line 566
  674. yield (isset($context["session2"]) || array_key_exists("session2", $context) ? $context["session2"] : (function () { throw new RuntimeError('Variable "session2" does not exist.', 566, $this->source); })());
  675. yield ",
  676. fill : false,
  677. backgroundColor: randomRgbColor()
  678. } )
  679. ";
  680. }
  681. // line 571
  682. yield " ";
  683. if (array_key_exists("session3", $context)) {
  684. // line 572
  685. yield " datasets.push( {
  686. label: \"Session 3\",
  687. data : ";
  688. // line 574
  689. yield (isset($context["session3"]) || array_key_exists("session3", $context) ? $context["session3"] : (function () { throw new RuntimeError('Variable "session3" does not exist.', 574, $this->source); })());
  690. yield ",
  691. fill : false,
  692. backgroundColor: randomRgbColor()
  693. } )
  694. ";
  695. }
  696. // line 579
  697. yield " ";
  698. if (array_key_exists("session4", $context)) {
  699. // line 580
  700. yield " datasets.push( {
  701. label: \"Session 4\",
  702. data : ";
  703. // line 582
  704. yield (isset($context["session4"]) || array_key_exists("session4", $context) ? $context["session4"] : (function () { throw new RuntimeError('Variable "session4" does not exist.', 582, $this->source); })());
  705. yield ",
  706. fill : false,
  707. backgroundColor: randomRgbColor()
  708. } )
  709. ";
  710. }
  711. // line 587
  712. yield " ";
  713. if (array_key_exists("session5", $context)) {
  714. // line 588
  715. yield " datasets.push( {
  716. label: \"Session 5\",
  717. data : ";
  718. // line 590
  719. yield (isset($context["session5"]) || array_key_exists("session5", $context) ? $context["session5"] : (function () { throw new RuntimeError('Variable "session5" does not exist.', 590, $this->source); })());
  720. yield ",
  721. fill : false,
  722. backgroundColor: randomRgbColor()
  723. } )
  724. ";
  725. }
  726. // line 595
  727. yield " ";
  728. if (array_key_exists("session6", $context)) {
  729. // line 596
  730. yield " datasets.push( {
  731. label: \"Session 6\",
  732. data : ";
  733. // line 598
  734. yield (isset($context["session6"]) || array_key_exists("session6", $context) ? $context["session6"] : (function () { throw new RuntimeError('Variable "session6" does not exist.', 598, $this->source); })());
  735. yield ",
  736. fill : false,
  737. backgroundColor: randomRgbColor()
  738. } )
  739. ";
  740. }
  741. // line 603
  742. yield "
  743. let graph = new Chart(schoolPerformanceGraph, {
  744. type:\"bar\",
  745. data : {
  746. labels: ";
  747. // line 614
  748. yield (isset($context["cours"]) || array_key_exists("cours", $context) ? $context["cours"] : (function () { throw new RuntimeError('Variable "cours" does not exist.', 614, $this->source); })());
  749. yield ",
  750. datasets: datasets,
  751. },
  752. options: {
  753. plugins: {
  754. title: {
  755. display: true,
  756. text: 'Performances generales annuelles ',
  757. font: {
  758. size: 24,
  759. style: 'bold',
  760. family: 'Helvetica Neue',
  761. },
  762. position: 'bottom',
  763. }
  764. }
  765. }
  766. });
  767. // Get the chart element for student category
  768. let studentCategoryChartElement = document.querySelector(\"#studentCategoryChart\");
  769. // Create the chart for student category
  770. let studentCategoryChart = new Chart(studentCategoryChartElement, {
  771. type: \"pie\",
  772. data: {
  773. labels: [\"Passed\", \"Failed\"],
  774. datasets: [{
  775. data: [/* Add data here for the number of students passed and failed */],
  776. backgroundColor: [\"green\", \"red\"]
  777. }]
  778. }
  779. });
  780. // Get the chart element for mention category
  781. let officialExamsGraph = document.querySelector(\"#officialExamsGraph\");
  782. // Create the chart for mention category
  783. const colors = [];
  784. const mentionCountCategories = ";
  785. // line 656
  786. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["mentionCountCategories"]) || array_key_exists("mentionCountCategories", $context) ? $context["mentionCountCategories"] : (function () { throw new RuntimeError('Variable "mentionCountCategories" does not exist.', 656, $this->source); })()), "html", null, true);
  787. yield ";
  788. mentionCountCategories.map(cat => {
  789. colors.push(randomRgbColor());
  790. })
  791. let officialExamsChart = new Chart(officialExamsGraph, {
  792. type: \"pie\",
  793. data: {
  794. labels: ";
  795. // line 663
  796. yield (isset($context["mentionCategories"]) || array_key_exists("mentionCategories", $context) ? $context["mentionCategories"] : (function () { throw new RuntimeError('Variable "mentionCategories" does not exist.', 663, $this->source); })());
  797. yield ",
  798. datasets: [{
  799. data: ";
  800. // line 665
  801. yield (isset($context["mentionCountCategories"]) || array_key_exists("mentionCountCategories", $context) ? $context["mentionCountCategories"] : (function () { throw new RuntimeError('Variable "mentionCountCategories" does not exist.', 665, $this->source); })());
  802. yield ",
  803. backgroundColor: colors
  804. }]
  805. },
  806. options: {
  807. plugins: {
  808. title: {
  809. display: true,
  810. text: 'Resultats aux examens officiels ',
  811. font: {
  812. size: 24,
  813. style: 'bold',
  814. family: 'Helvetica Neue',
  815. },
  816. position: 'bottom',
  817. }
  818. }
  819. }
  820. });
  821. </script>
  822. ";
  823. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  824. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  825. yield from [];
  826. }
  827. /**
  828. * @codeCoverageIgnore
  829. */
  830. public function getTemplateName(): string
  831. {
  832. return "classroom/show.html.twig";
  833. }
  834. /**
  835. * @codeCoverageIgnore
  836. */
  837. public function isTraitable(): bool
  838. {
  839. return false;
  840. }
  841. /**
  842. * @codeCoverageIgnore
  843. */
  844. public function getDebugInfo(): array
  845. {
  846. return array ( 1018 => 665, 1013 => 663, 1003 => 656, 958 => 614, 945 => 603, 937 => 598, 933 => 596, 930 => 595, 922 => 590, 918 => 588, 915 => 587, 907 => 582, 903 => 580, 900 => 579, 892 => 574, 888 => 572, 885 => 571, 877 => 566, 873 => 564, 870 => 563, 862 => 558, 858 => 556, 856 => 555, 808 => 511, 795 => 510, 733 => 458, 727 => 457, 718 => 454, 714 => 453, 711 => 452, 706 => 451, 702 => 450, 683 => 433, 677 => 429, 675 => 428, 665 => 420, 655 => 416, 639 => 402, 632 => 400, 630 => 399, 626 => 397, 623 => 396, 615 => 392, 612 => 391, 609 => 390, 603 => 388, 597 => 385, 592 => 384, 589 => 383, 587 => 382, 580 => 378, 574 => 375, 566 => 370, 562 => 369, 556 => 366, 552 => 364, 548 => 363, 544 => 361, 539 => 360, 537 => 359, 457 => 282, 443 => 270, 434 => 266, 432 => 265, 428 => 263, 421 => 259, 414 => 256, 412 => 255, 406 => 252, 400 => 249, 394 => 246, 387 => 242, 383 => 241, 379 => 239, 374 => 238, 372 => 237, 300 => 167, 285 => 155, 277 => 150, 269 => 145, 262 => 141, 255 => 137, 246 => 131, 238 => 126, 229 => 121, 227 => 120, 220 => 116, 211 => 109, 199 => 99, 187 => 89, 185 => 88, 169 => 74, 163 => 72, 159 => 70, 157 => 69, 139 => 54, 121 => 39, 98 => 18, 84 => 8, 82 => 7, 77 => 4, 64 => 3, 41 => 1,);
  847. }
  848. public function getSourceContext(): Source
  849. {
  850. return new Source("{% extends \"layout/backEndLayout.html.twig\" %}
  851. {% block content %}
  852. <div class=\"row mt-4\">
  853. <div class=\"col-1 mar-bot30\">
  854. {% if is_granted('ROLE_ADMIN') %}
  855. <a class=\"btn btn-info\" href=\"{{ path('admin_classrooms_new') }}\">
  856. <i class=\"fa fa-plus\"></i>
  857. </a>
  858. {% endif %}
  859. </div>
  860. </div>
  861. <div class=\"col-11 jumbotron\">
  862. <article class=\"p-3\">
  863. <table class=\"table table-hover record_properties center\">
  864. <tbody>
  865. <tr>
  866. <th scope=\"row\">
  867. Nom
  868. </th>
  869. <td>
  870. {{ classroom.name }}
  871. </td>
  872. </tr>
  873. <tr>
  874. <th scope=\"row\">
  875. Niveau
  876. </th>
  877. <td>
  878. {{ classroom.level }}
  879. </td>
  880. </tr>
  881. <tr>
  882. <th scope=\"row\">
  883. Titulaire
  884. </th>
  885. <td>
  886. {% if mainteacher is null %}
  887. {% else %}
  888. {{mainteacher.fullName}}
  889. {% endif %}
  890. </td>
  891. </tr>
  892. <tr>
  893. <th scope=\"row\">
  894. Classe d'examen
  895. </th>
  896. <td>
  897. {% if (classroom.apc == true) %}
  898. OUI
  899. \t\t\t\t\t\t\t\t
  900. {% else %}
  901. NON
  902. \t\t\t\t\t\t\t\t
  903. {% endif %}
  904. </td>
  905. </tr>
  906. </tbody>
  907. </table>
  908. <div class=\"btn-group record_actions\">
  909. <a class=\"btn btn-info\" href=\"{{ path('admin_classrooms') }}\">
  910. <i class=\"fa fa-list\"></i>
  911. </a>
  912. {% if is_granted('ROLE_ADMIN') %}
  913. <a class=\"btn btn-primary\" href=\"{{ path('admin_classrooms_edit', {id: classroom.id}) }}\">
  914. <i class=\"fa fa-edit\"></i>
  915. </a>
  916. <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}) }}\">
  917. <i class=\"fa fa-file-pdf-o\"></i>
  918. Recap. Seq
  919. </a>
  920. <a target=\"_blank\" class=\"btn btn-warning\" href=\"{{ path('admin_classrooms_reportcards_seq', {id: classroom.id}) }}\">
  921. <i class=\"fa fa-file\"></i>
  922. Bull Seq
  923. </a>
  924. <a target=\"_blank\" class=\"btn btn-file\" data-toggle=\"modal\" id=\"bull_trim\" data-target=\"#form_modal_reportcard_params\" data-action=\"{{ path('admin_classrooms_reportcards_trim_2024', {'id':classroom.id}) }}\">
  925. <i class=\"fa fa-file\"></i>
  926. Bull Trim
  927. </a>
  928. <a target=\"_blank\" class=\"btn btn-outline-info\" id=\"bull_ann\" data-toggle=\"modal\" data-target=\"#form_modal_reportcard_params\" data-action=\"{{ path('admin_class_reportcards_year_2024', {'id': classroom.id}) }}\" >
  929. <i class=\"fa fa-file-pdf-o\"></i>
  930. Bull Ann
  931. </a>
  932. <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}) }}\" >
  933. <i class=\"fa fa-file-pdf-o\"></i>
  934. Recap Trim
  935. </a>
  936. <a target=\"_blank\" class=\"btn btn-outline-success\" id=\"recap_trim_excel\" data-toggle=\"modal\" data-target=\"#form_modal_courses\" data-action=\"{{ path('admin_classrooms_recapitulatif_ann_excel', {id: classroom.id}) }}\" >
  937. <i class=\"fa fa-file-excel-o\"></i>
  938. Recap Ann
  939. </a>
  940. <a target=\"_blank\" class=\"btn btn-file\" href=\"{{ path('admin_class_reportcards_apc_year', {id: classroom.id}) }}\">
  941. <i class=\"fa fa-file\"></i>
  942. Bull Ann V1
  943. </a>
  944. <button class=\"btn btn-danger\" type=\"submit\">
  945. <i class=\"fa fa-trash-o\"></i>
  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 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. \$(document).ready(function () {
  1195. // Quand on clique sur un lien qui ouvre le modal
  1196. \$('[data-toggle=\"modal\"]').on('click', function () {
  1197. // Récupère l'URL depuis data-action
  1198. var actionUrl = \$(this).data('action');
  1199. console.log(actionUrl);
  1200. // Met à jour l'attribut action du formulaire du modal
  1201. \$('#form_modal_reportcard_params form').attr('action', actionUrl);
  1202. });
  1203. });
  1204. </script>
  1205. <script type=\"text/javascript\">
  1206. const schoolPerformanceGraph = \$(\"#schoolPerformanceGraph\");
  1207. const datasets = [];
  1208. //Generate a random color
  1209. const randomRgbColor = () => {
  1210. let r = Math.floor(Math.random() * 256); // Random between 0-255
  1211. let g = Math.floor(Math.random() * 256); // Random between 0-255
  1212. let b = Math.floor(Math.random() * 256); // Random between 0-255
  1213. return 'rgb(' + r + ',' + g + ',' + b + ')';
  1214. };
  1215. {% if session1 is defined %}
  1216. datasets.push( {
  1217. label: \"Session 1\",
  1218. data : {{session1|raw}},
  1219. fill : false,
  1220. backgroundColor: randomRgbColor()
  1221. } )
  1222. {% endif %}
  1223. {% if session2 is defined %}
  1224. datasets.push( {
  1225. label: \"Session 2\",
  1226. data : {{session2|raw}},
  1227. fill : false,
  1228. backgroundColor: randomRgbColor()
  1229. } )
  1230. {% endif %}
  1231. {% if session3 is defined %}
  1232. datasets.push( {
  1233. label: \"Session 3\",
  1234. data : {{session3|raw}},
  1235. fill : false,
  1236. backgroundColor: randomRgbColor()
  1237. } )
  1238. {% endif %}
  1239. {% if session4 is defined %}
  1240. datasets.push( {
  1241. label: \"Session 4\",
  1242. data : {{session4|raw}},
  1243. fill : false,
  1244. backgroundColor: randomRgbColor()
  1245. } )
  1246. {% endif %}
  1247. {% if session5 is defined %}
  1248. datasets.push( {
  1249. label: \"Session 5\",
  1250. data : {{session5|raw}},
  1251. fill : false,
  1252. backgroundColor: randomRgbColor()
  1253. } )
  1254. {% endif %}
  1255. {% if session6 is defined %}
  1256. datasets.push( {
  1257. label: \"Session 6\",
  1258. data : {{session6|raw}},
  1259. fill : false,
  1260. backgroundColor: randomRgbColor()
  1261. } )
  1262. {% endif %}
  1263. let graph = new Chart(schoolPerformanceGraph, {
  1264. type:\"bar\",
  1265. data : {
  1266. labels: {{ cours|raw }},
  1267. datasets: datasets,
  1268. },
  1269. options: {
  1270. plugins: {
  1271. title: {
  1272. display: true,
  1273. text: 'Performances generales annuelles ',
  1274. font: {
  1275. size: 24,
  1276. style: 'bold',
  1277. family: 'Helvetica Neue',
  1278. },
  1279. position: 'bottom',
  1280. }
  1281. }
  1282. }
  1283. });
  1284. // Get the chart element for student category
  1285. let studentCategoryChartElement = document.querySelector(\"#studentCategoryChart\");
  1286. // Create the chart for student category
  1287. let studentCategoryChart = new Chart(studentCategoryChartElement, {
  1288. type: \"pie\",
  1289. data: {
  1290. labels: [\"Passed\", \"Failed\"],
  1291. datasets: [{
  1292. data: [/* Add data here for the number of students passed and failed */],
  1293. backgroundColor: [\"green\", \"red\"]
  1294. }]
  1295. }
  1296. });
  1297. // Get the chart element for mention category
  1298. let officialExamsGraph = document.querySelector(\"#officialExamsGraph\");
  1299. // Create the chart for mention category
  1300. const colors = [];
  1301. const mentionCountCategories = {{mentionCountCategories}};
  1302. mentionCountCategories.map(cat => {
  1303. colors.push(randomRgbColor());
  1304. })
  1305. let officialExamsChart = new Chart(officialExamsGraph, {
  1306. type: \"pie\",
  1307. data: {
  1308. labels: {{ mentionCategories|raw }},
  1309. datasets: [{
  1310. data: {{mentionCountCategories|raw}},
  1311. backgroundColor: colors
  1312. }]
  1313. },
  1314. options: {
  1315. plugins: {
  1316. title: {
  1317. display: true,
  1318. text: 'Resultats aux examens officiels ',
  1319. font: {
  1320. size: 24,
  1321. style: 'bold',
  1322. family: 'Helvetica Neue',
  1323. },
  1324. position: 'bottom',
  1325. }
  1326. }
  1327. }
  1328. });
  1329. </script>
  1330. {% endblock %}
  1331. ", "classroom/show.html.twig", "/var/www/prod/liveedu/templates/classroom/show.html.twig");
  1332. }
  1333. }