var/cache/dev/twig/8a/8a5d3d63908b1b2b392b3be3df77fbb6.php line 54

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\CoreExtension;
  6. use Twig\Extension\SandboxExtension;
  7. use Twig\Markup;
  8. use Twig\Sandbox\SecurityError;
  9. use Twig\Sandbox\SecurityNotAllowedTagError;
  10. use Twig\Sandbox\SecurityNotAllowedFilterError;
  11. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  12. use Twig\Source;
  13. use Twig\Template;
  14. use Twig\TemplateWrapper;
  15. /* school/roomList.html.twig */
  16. class __TwigTemplate_af9fa14077f32f595d3b9e5b5a05111f 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. 'name' => [$this, 'block_name'],
  29. 'body' => [$this, 'block_body'],
  30. ];
  31. }
  32. protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
  33. {
  34. // line 1
  35. return "layout/frontEndLayout.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", "school/roomList.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", "school/roomList.html.twig"));
  44. $this->parent = $this->loadTemplate("layout/frontEndLayout.html.twig", "school/roomList.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_name(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", "name"));
  58. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  59. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "name"));
  60. // line 4
  61. yield " Classrooms of Bethesda
  62. ";
  63. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  64. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  65. yield from [];
  66. }
  67. // line 8
  68. /**
  69. * @return iterable<null|scalar|\Stringable>
  70. */
  71. public function block_body(array $context, array $blocks = []): iterable
  72. {
  73. $macros = $this->macros;
  74. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  75. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
  76. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  77. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
  78. // line 9
  79. yield "
  80. <div id=\"overviews\" class=\"section wb\">
  81. <div class=\"container\">
  82. <div class=\"section-title row text-center\">
  83. <div class=\"col-md-8 offset-md-2\">
  84. <h1 class=\"card-title text-center\">
  85. Liste des classes et resultats aux examens officiels 2022-2023
  86. </h1>
  87. </div>
  88. </div>
  89. <!-- end title -->
  90. <hr class=\"invis\">
  91. ";
  92. // line 22
  93. if ((Twig\Extension\CoreExtension::length($this->env->getCharset(), (isset($context["rooms"]) || array_key_exists("rooms", $context) ? $context["rooms"] : (function () { throw new RuntimeError('Variable "rooms" does not exist.', 22, $this->source); })())) > 0)) {
  94. // line 23
  95. yield " <div id=\"teachers\" class=\"section wb\">
  96. ";
  97. // line 25
  98. $context['_parent'] = $context;
  99. $context['_seq'] = CoreExtension::ensureTraversable(Twig\Extension\CoreExtension::batch((isset($context["rooms"]) || array_key_exists("rooms", $context) ? $context["rooms"] : (function () { throw new RuntimeError('Variable "rooms" does not exist.', 25, $this->source); })()), 4));
  100. foreach ($context['_seq'] as $context["_key"] => $context["row"]) {
  101. // line 26
  102. yield " <div class=\"row\">
  103. ";
  104. // line 27
  105. $context['_parent'] = $context;
  106. $context['_seq'] = CoreExtension::ensureTraversable($context["row"]);
  107. foreach ($context['_seq'] as $context["_key"] => $context["room"]) {
  108. // line 28
  109. yield " <div class=\"col-lg-4 col-md-6 col-12\">
  110. <div class=\"course-item\">
  111. <div class=\"image-blog\">
  112. ";
  113. // line 31
  114. if (CoreExtension::inFilter(CoreExtension::getAttribute($this->env, $this->source, $context["room"], "id", [], "any", false, false, false, 31), Twig\Extension\CoreExtension::keys((isset($context["mainTeachersMap"]) || array_key_exists("mainTeachersMap", $context) ? $context["mainTeachersMap"] : (function () { throw new RuntimeError('Variable "mainTeachersMap" does not exist.', 31, $this->source); })())))) {
  115. // line 32
  116. yield " <img
  117. src=\"";
  118. // line 33
  119. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["mainTeachersMap"]) || array_key_exists("mainTeachersMap", $context) ? $context["mainTeachersMap"] : (function () { throw new RuntimeError('Variable "mainTeachersMap" does not exist.', 33, $this->source); })()), CoreExtension::getAttribute($this->env, $this->source, $context["room"], "id", [], "any", false, false, false, 33), [], "array", false, false, false, 33), "avatar", [75], "method", false, false, false, 33), "html", null, true);
  120. yield "\" alt=\"\" class=\"img-fluid\"/>
  121. ";
  122. } else {
  123. // line 36
  124. yield " <img src=\"";
  125. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/images/teacher_default.png"), "html", null, true);
  126. yield "\" alt=\"\" class=\"img-fluid\">
  127. ";
  128. }
  129. // line 38
  130. yield " </div>
  131. <div class=\"course-br\">
  132. <div class=\"course-title\">
  133. <h2>
  134. <a href=\"#\" title=\"\">
  135. ";
  136. // line 43
  137. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["room"], "name", [], "any", false, false, false, 43), "html", null, true);
  138. yield "
  139. </a>
  140. </h2>
  141. </div>
  142. ";
  143. // line 48
  144. if (CoreExtension::getAttribute($this->env, $this->source, $context["room"], "apc", [], "any", false, false, false, 48)) {
  145. // line 49
  146. yield " ";
  147. $context["success"] = 0;
  148. // line 50
  149. yield " ";
  150. $context["candidats"] = 0;
  151. // line 51
  152. yield " <ul class=\"list-group\">
  153. ";
  154. // line 52
  155. $context['_parent'] = $context;
  156. $context['_seq'] = CoreExtension::ensureTraversable((isset($context["subscriptions"]) || array_key_exists("subscriptions", $context) ? $context["subscriptions"] : (function () { throw new RuntimeError('Variable "subscriptions" does not exist.', 52, $this->source); })()));
  157. foreach ($context['_seq'] as $context["_key"] => $context["subscription"]) {
  158. // line 53
  159. yield "
  160. ";
  161. // line 54
  162. if ((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["subscription"], "classRoom", [], "any", false, false, false, 54), "id", [], "any", false, false, false, 54) == CoreExtension::getAttribute($this->env, $this->source, $context["room"], "id", [], "any", false, false, false, 54))) {
  163. // line 55
  164. yield " ";
  165. $context["candidats"] = ((isset($context["candidats"]) || array_key_exists("candidats", $context) ? $context["candidats"] : (function () { throw new RuntimeError('Variable "candidats" does not exist.', 55, $this->source); })()) + 1);
  166. // line 56
  167. yield " ";
  168. if ((CoreExtension::getAttribute($this->env, $this->source, $context["subscription"], "officialExamResult", [], "any", false, false, false, 56) != "0")) {
  169. // line 57
  170. yield " ";
  171. $context["success"] = ((isset($context["success"]) || array_key_exists("success", $context) ? $context["success"] : (function () { throw new RuntimeError('Variable "success" does not exist.', 57, $this->source); })()) + 1);
  172. // line 58
  173. yield " ";
  174. }
  175. // line 59
  176. yield " <li class=\"list-group-item d-flex justify-content-between align-items-center row m-1\">
  177. <div class=\"col-3\">
  178. <img src=\"";
  179. // line 61
  180. yield ((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["subscription"], "student", [], "any", false, false, false, 61), "imageName", [], "any", false, false, false, 61)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(("assets/images/student/" . CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["subscription"], "student", [], "any", false, false, false, 61), "imageName", [], "any", false, false, false, 61))), "html", null, true)) : (((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["subscription"], "student", [], "any", false, false, false, 61), "gender", [], "any", false, false, false, 61)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/images/student/female-default-avatar.jpg"), "html", null, true)) : ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/images/student/male-default-avatar.jpg"), "html", null, true)))));
  181. yield "\" alt=\"";
  182. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["subscription"], "student", [], "any", false, false, false, 61), "lastname", [], "any", false, false, false, 61), "html", null, true);
  183. yield "\" class=\"img-fluid rounded-start\">
  184. </div>
  185. <div class=\"col-3 \">
  186. <h5> ";
  187. // line 65
  188. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((Twig\Extension\CoreExtension::titleCase($this->env->getCharset(), CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["subscription"], "student", [], "any", false, false, false, 65), "lastname", [], "any", false, false, false, 65)) . Twig\Extension\CoreExtension::titleCase($this->env->getCharset(), CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["subscription"], "student", [], "any", false, false, false, 65), "firstname", [], "any", false, false, false, 65))), "html", null, true);
  189. yield " </h5>
  190. </div>
  191. <div class=\"col-3 \">
  192. <h5 class=\"text-muted\"><b>";
  193. // line 70
  194. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::lower($this->env->getCharset(), CoreExtension::getAttribute($this->env, $this->source, $context["subscription"], "verbalOfficialExamResult", [], "any", false, false, false, 70)), "html", null, true);
  195. yield "</b></h5>
  196. </div>
  197. </li>
  198. ";
  199. }
  200. // line 75
  201. yield " ";
  202. }
  203. $_parent = $context['_parent'];
  204. unset($context['_seq'], $context['_key'], $context['subscription'], $context['_parent']);
  205. $context = array_intersect_key($context, $_parent) + $_parent;
  206. // line 76
  207. yield " </ul>
  208. <div class=\"course-rating text-center\">
  209. ";
  210. // line 79
  211. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((Twig\Extension\CoreExtension::round(((100 * (isset($context["success"]) || array_key_exists("success", $context) ? $context["success"] : (function () { throw new RuntimeError('Variable "success" does not exist.', 79, $this->source); })())) / (isset($context["candidats"]) || array_key_exists("candidats", $context) ? $context["candidats"] : (function () { throw new RuntimeError('Variable "candidats" does not exist.', 79, $this->source); })())), 2, "floor") . "%"), "html", null, true);
  212. yield "
  213. ";
  214. // line 91
  215. yield "
  216. </div>
  217. ";
  218. }
  219. // line 94
  220. yield " </div>
  221. <div class=\"course-meta-bot\">
  222. <ul>
  223. <li>
  224. <i class=\"fa fa-book\" aria-hidden=\"true\"></i>
  225. ";
  226. // line 99
  227. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['App\Twig\AppExtension']->pluralize(Twig\Extension\CoreExtension::length($this->env->getCharset(), CoreExtension::getAttribute($this->env, $this->source, $context["room"], "modules", [], "any", false, false, false, 99)), "Module", "Modules"), "html", null, true);
  228. yield "
  229. </li>
  230. </ul>
  231. </div>
  232. </div>
  233. </div>
  234. <!-- end row -->
  235. ";
  236. }
  237. $_parent = $context['_parent'];
  238. unset($context['_seq'], $context['_key'], $context['room'], $context['_parent']);
  239. $context = array_intersect_key($context, $_parent) + $_parent;
  240. // line 107
  241. yield " </div>
  242. ";
  243. }
  244. $_parent = $context['_parent'];
  245. unset($context['_seq'], $context['_key'], $context['row'], $context['_parent']);
  246. $context = array_intersect_key($context, $_parent) + $_parent;
  247. // line 109
  248. yield " <div class=\"navigation text-center h3 m-5\">
  249. ";
  250. // line 110
  251. yield $this->extensions['Knp\Bundle\PaginatorBundle\Twig\Extension\PaginationExtension']->render($this->env, (isset($context["rooms"]) || array_key_exists("rooms", $context) ? $context["rooms"] : (function () { throw new RuntimeError('Variable "rooms" does not exist.', 110, $this->source); })()));
  252. yield "
  253. </div>
  254. <!-- end container -->
  255. ";
  256. } else {
  257. // line 114
  258. yield " <p class=\"mt-5 h1 text-center\">
  259. No classroom yet. \t
  260. ";
  261. // line 117
  262. if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("IS_AUTHENTICATED_REMEMBERED")) {
  263. // line 118
  264. yield " <a href=\"";
  265. yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_classrooms_new");
  266. yield "\">
  267. Be the first!
  268. </a>
  269. ";
  270. }
  271. // line 123
  272. yield " </p>
  273. ";
  274. }
  275. // line 125
  276. yield "
  277. </div>
  278. </div>
  279. ";
  280. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  281. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  282. yield from [];
  283. }
  284. /**
  285. * @codeCoverageIgnore
  286. */
  287. public function getTemplateName(): string
  288. {
  289. return "school/roomList.html.twig";
  290. }
  291. /**
  292. * @codeCoverageIgnore
  293. */
  294. public function isTraitable(): bool
  295. {
  296. return false;
  297. }
  298. /**
  299. * @codeCoverageIgnore
  300. */
  301. public function getDebugInfo(): array
  302. {
  303. return array ( 313 => 125, 309 => 123, 300 => 118, 298 => 117, 293 => 114, 286 => 110, 283 => 109, 276 => 107, 262 => 99, 255 => 94, 250 => 91, 244 => 79, 239 => 76, 233 => 75, 225 => 70, 217 => 65, 208 => 61, 204 => 59, 201 => 58, 198 => 57, 195 => 56, 192 => 55, 190 => 54, 187 => 53, 183 => 52, 180 => 51, 177 => 50, 174 => 49, 172 => 48, 164 => 43, 157 => 38, 151 => 36, 145 => 33, 142 => 32, 140 => 31, 135 => 28, 131 => 27, 128 => 26, 124 => 25, 120 => 23, 118 => 22, 103 => 9, 90 => 8, 77 => 4, 64 => 3, 41 => 1,);
  304. }
  305. public function getSourceContext(): Source
  306. {
  307. return new Source("{% extends 'layout/frontEndLayout.html.twig' %}
  308. {% block name %}
  309. Classrooms of Bethesda
  310. {% endblock %}
  311. {% block body %}
  312. <div id=\"overviews\" class=\"section wb\">
  313. <div class=\"container\">
  314. <div class=\"section-title row text-center\">
  315. <div class=\"col-md-8 offset-md-2\">
  316. <h1 class=\"card-title text-center\">
  317. Liste des classes et resultats aux examens officiels 2022-2023
  318. </h1>
  319. </div>
  320. </div>
  321. <!-- end title -->
  322. <hr class=\"invis\">
  323. {% if rooms|length > 0 %}
  324. <div id=\"teachers\" class=\"section wb\">
  325. {% for row in rooms|batch(4) %}
  326. <div class=\"row\">
  327. {% for room in row %}
  328. <div class=\"col-lg-4 col-md-6 col-12\">
  329. <div class=\"course-item\">
  330. <div class=\"image-blog\">
  331. {% if room.id in mainTeachersMap|keys %}
  332. <img
  333. src=\"{{ mainTeachersMap[room.id].avatar(75) }}\" alt=\"\" class=\"img-fluid\"/>
  334. {% else %}
  335. <img src=\"{{ asset('assets/images/teacher_default.png') }}\" alt=\"\" class=\"img-fluid\">
  336. {% endif %}
  337. </div>
  338. <div class=\"course-br\">
  339. <div class=\"course-title\">
  340. <h2>
  341. <a href=\"#\" title=\"\">
  342. {{ room.name }}
  343. </a>
  344. </h2>
  345. </div>
  346. {% if room.apc %}
  347. {% set success = 0 %}
  348. {% set candidats = 0 %}
  349. <ul class=\"list-group\">
  350. {% for subscription in subscriptions %}
  351. {% if(subscription.classRoom.id == room.id) %}
  352. {% set candidats = candidats + 1 %}
  353. {% if subscription.officialExamResult != \"0\" %}
  354. {% set success = success + 1 %}
  355. {% endif %}
  356. <li class=\"list-group-item d-flex justify-content-between align-items-center row m-1\">
  357. <div class=\"col-3\">
  358. <img src=\"{{ (subscription.student.imageName ? asset('assets/images/student/'~ subscription.student.imageName ) : (subscription.student.gender ? asset('assets/images/student/female-default-avatar.jpg') : asset('assets/images/student/male-default-avatar.jpg'))) }}\" alt=\"{{ subscription.student.lastname }}\" class=\"img-fluid rounded-start\">
  359. </div>
  360. <div class=\"col-3 \">
  361. <h5> {{subscription.student.lastname|title ~ subscription.student.firstname|title}} </h5>
  362. </div>
  363. <div class=\"col-3 \">
  364. <h5 class=\"text-muted\"><b>{{subscription.verbalOfficialExamResult|lower}}</b></h5>
  365. </div>
  366. </li>
  367. {% endif %}
  368. {% endfor %}
  369. </ul>
  370. <div class=\"course-rating text-center\">
  371. {{ (100 * success / candidats)|round(2, 'floor') ~ \"%\"}}
  372. {#<i class=\"fa fa-star\"></i>
  373. <i class=\"fa fa-star\"></i>
  374. <i class=\"fa fa-star\"></i>
  375. <i class=\"fa fa-star\"></i>
  376. {% if success == candidats %}
  377. <i class=\"fa fa-star\"></i>
  378. {% else %}
  379. <i class=\"fa fa-star-half\"></i>
  380. {% endif %}#}
  381. </div>
  382. {% endif %}
  383. </div>
  384. <div class=\"course-meta-bot\">
  385. <ul>
  386. <li>
  387. <i class=\"fa fa-book\" aria-hidden=\"true\"></i>
  388. {{ pluralize(room.modules|length, 'Module' , 'Modules') }}
  389. </li>
  390. </ul>
  391. </div>
  392. </div>
  393. </div>
  394. <!-- end row -->
  395. {% endfor %}
  396. </div>
  397. {% endfor %}
  398. <div class=\"navigation text-center h3 m-5\">
  399. {{ knp_pagination_render(rooms) }}
  400. </div>
  401. <!-- end container -->
  402. {% else %}
  403. <p class=\"mt-5 h1 text-center\">
  404. No classroom yet. \t
  405. {% if is_granted(\"IS_AUTHENTICATED_REMEMBERED\") %}
  406. <a href=\"{{ path('admin_classrooms_new') }}\">
  407. Be the first!
  408. </a>
  409. {% endif %}
  410. </p>
  411. {% endif %}
  412. </div>
  413. </div>
  414. {% endblock %}
  415. ", "school/roomList.html.twig", "/var/www/prod/liveedu/templates/school/roomList.html.twig");
  416. }
  417. }