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