<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* school/roomList.html.twig */
class __TwigTemplate_f8fe860fff610d00a5b7954c820b8dca extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'name' => [$this, 'block_name'],
'body' => [$this, 'block_body'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "layout/frontEndLayout.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "school/roomList.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "school/roomList.html.twig"));
$this->parent = $this->loadTemplate("layout/frontEndLayout.html.twig", "school/roomList.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 3
public function block_name($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "name"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "name"));
// line 4
echo " Classrooms of Bethesda
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 8
public function block_body($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
// line 9
echo "
<div id=\"overviews\" class=\"section wb\">
<div class=\"container\">
<div class=\"section-title row text-center\">
<div class=\"col-md-8 offset-md-2\">
<h1 class=\"card-title text-center\">
Liste des classes et resultats aux examens officiels 2022-2023
</h1>
</div>
</div>
<!-- end title -->
<hr class=\"invis\">
";
// line 22
if ((twig_length_filter($this->env, (isset($context["rooms"]) || array_key_exists("rooms", $context) ? $context["rooms"] : (function () { throw new RuntimeError('Variable "rooms" does not exist.', 22, $this->source); })())) > 0)) {
// line 23
echo " <div id=\"teachers\" class=\"section wb\">
";
// line 25
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_array_batch((isset($context["rooms"]) || array_key_exists("rooms", $context) ? $context["rooms"] : (function () { throw new RuntimeError('Variable "rooms" does not exist.', 25, $this->source); })()), 4));
foreach ($context['_seq'] as $context["_key"] => $context["row"]) {
// line 26
echo " <div class=\"row\">
";
// line 27
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable($context["row"]);
foreach ($context['_seq'] as $context["_key"] => $context["room"]) {
// line 28
echo " <div class=\"col-lg-4 col-md-6 col-12\">
<div class=\"course-item\">
<div class=\"image-blog\">
";
// line 31
if (twig_in_filter(twig_get_attribute($this->env, $this->source, $context["room"], "id", [], "any", false, false, false, 31), twig_get_array_keys_filter((isset($context["mainTeachersMap"]) || array_key_exists("mainTeachersMap", $context) ? $context["mainTeachersMap"] : (function () { throw new RuntimeError('Variable "mainTeachersMap" does not exist.', 31, $this->source); })())))) {
// line 32
echo " <img
src=\"";
// line 33
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($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); })()), twig_get_attribute($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);
echo "\" alt=\"\" class=\"img-fluid\"/>
";
} else {
// line 36
echo " <img src=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/images/teacher_default.png"), "html", null, true);
echo "\" alt=\"\" class=\"img-fluid\">
";
}
// line 38
echo " </div>
<div class=\"course-br\">
<div class=\"course-title\">
<h2>
<a href=\"#\" title=\"\">
";
// line 43
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["room"], "name", [], "any", false, false, false, 43), "html", null, true);
echo "
</a>
</h2>
</div>
";
// line 48
if (twig_get_attribute($this->env, $this->source, $context["room"], "apc", [], "any", false, false, false, 48)) {
// line 49
echo " ";
$context["success"] = 0;
// line 50
echo " ";
$context["candidats"] = 0;
// line 51
echo " <ul class=\"list-group\">
";
// line 52
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["subscriptions"]) || array_key_exists("subscriptions", $context) ? $context["subscriptions"] : (function () { throw new RuntimeError('Variable "subscriptions" does not exist.', 52, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["subscription"]) {
// line 53
echo "
";
// line 54
if ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["subscription"], "classRoom", [], "any", false, false, false, 54), "id", [], "any", false, false, false, 54) == twig_get_attribute($this->env, $this->source, $context["room"], "id", [], "any", false, false, false, 54))) {
// line 55
echo " ";
$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);
// line 56
echo " ";
if ((twig_get_attribute($this->env, $this->source, $context["subscription"], "officialExamResult", [], "any", false, false, false, 56) != "0")) {
// line 57
echo " ";
$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);
// line 58
echo " ";
}
// line 59
echo " <li class=\"list-group-item d-flex justify-content-between align-items-center row m-1\">
<div class=\"col-3\">
<img src=\"";
// line 61
echo twig_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["subscription"], "student", [], "any", false, false, false, 61), "imageName", [], "any", false, false, false, 61)) ? ($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(("assets/images/student/" . twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["subscription"], "student", [], "any", false, false, false, 61), "imageName", [], "any", false, false, false, 61)))) : (((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["subscription"], "student", [], "any", false, false, false, 61), "gender", [], "any", false, false, false, 61)) ? ($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/images/student/female-default-avatar.jpg")) : ($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/images/student/male-default-avatar.jpg"))))), "html", null, true);
echo "\" alt=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["subscription"], "student", [], "any", false, false, false, 61), "lastname", [], "any", false, false, false, 61), "html", null, true);
echo "\" class=\"img-fluid rounded-start\">
</div>
<div class=\"col-3 \">
<h5> ";
// line 65
echo twig_escape_filter($this->env, (twig_title_string_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["subscription"], "student", [], "any", false, false, false, 65), "lastname", [], "any", false, false, false, 65)) . twig_title_string_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["subscription"], "student", [], "any", false, false, false, 65), "firstname", [], "any", false, false, false, 65))), "html", null, true);
echo " </h5>
</div>
<div class=\"col-3 \">
<h5 class=\"text-muted\"><b>";
// line 70
echo twig_escape_filter($this->env, twig_lower_filter($this->env, twig_get_attribute($this->env, $this->source, $context["subscription"], "verbalOfficialExamResult", [], "any", false, false, false, 70)), "html", null, true);
echo "</b></h5>
</div>
</li>
";
}
// line 75
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['subscription'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 76
echo " </ul>
<div class=\"course-rating text-center\">
";
// line 79
echo twig_escape_filter($this->env, (twig_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);
echo "
";
// line 91
echo "
</div>
";
}
// line 94
echo " </div>
<div class=\"course-meta-bot\">
<ul>
<li>
<i class=\"fa fa-book\" aria-hidden=\"true\"></i>
";
// line 99
echo twig_escape_filter($this->env, $this->extensions['App\Twig\AppExtension']->pluralize(twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, $context["room"], "modules", [], "any", false, false, false, 99)), "Module", "Modules"), "html", null, true);
echo "
</li>
</ul>
</div>
</div>
</div>
<!-- end row -->
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['room'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 107
echo " </div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['row'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 109
echo " <div class=\"navigation text-center h3 m-5\">
";
// line 110
echo $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); })()));
echo "
</div>
<!-- end container -->
";
} else {
// line 114
echo " <p class=\"mt-5 h1 text-center\">
No classroom yet. \t
";
// line 117
if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("IS_AUTHENTICATED_REMEMBERED")) {
// line 118
echo " <a href=\"";
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_classrooms_new");
echo "\">
Be the first!
</a>
";
}
// line 123
echo " </p>
";
}
// line 125
echo "
</div>
</div>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "school/roomList.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 301 => 125, 297 => 123, 288 => 118, 286 => 117, 281 => 114, 274 => 110, 271 => 109, 264 => 107, 250 => 99, 243 => 94, 238 => 91, 232 => 79, 227 => 76, 221 => 75, 213 => 70, 205 => 65, 196 => 61, 192 => 59, 189 => 58, 186 => 57, 183 => 56, 180 => 55, 178 => 54, 175 => 53, 171 => 52, 168 => 51, 165 => 50, 162 => 49, 160 => 48, 152 => 43, 145 => 38, 139 => 36, 133 => 33, 130 => 32, 128 => 31, 123 => 28, 119 => 27, 116 => 26, 112 => 25, 108 => 23, 106 => 22, 91 => 9, 81 => 8, 69 => 4, 59 => 3, 36 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'layout/frontEndLayout.html.twig' %}
{% block name %}
Classrooms of Bethesda
{% endblock %}
{% block body %}
<div id=\"overviews\" class=\"section wb\">
<div class=\"container\">
<div class=\"section-title row text-center\">
<div class=\"col-md-8 offset-md-2\">
<h1 class=\"card-title text-center\">
Liste des classes et resultats aux examens officiels 2022-2023
</h1>
</div>
</div>
<!-- end title -->
<hr class=\"invis\">
{% if rooms|length > 0 %}
<div id=\"teachers\" class=\"section wb\">
{% for row in rooms|batch(4) %}
<div class=\"row\">
{% for room in row %}
<div class=\"col-lg-4 col-md-6 col-12\">
<div class=\"course-item\">
<div class=\"image-blog\">
{% if room.id in mainTeachersMap|keys %}
<img
src=\"{{ mainTeachersMap[room.id].avatar(75) }}\" alt=\"\" class=\"img-fluid\"/>
{% else %}
<img src=\"{{ asset('assets/images/teacher_default.png') }}\" alt=\"\" class=\"img-fluid\">
{% endif %}
</div>
<div class=\"course-br\">
<div class=\"course-title\">
<h2>
<a href=\"#\" title=\"\">
{{ room.name }}
</a>
</h2>
</div>
{% if room.apc %}
{% set success = 0 %}
{% set candidats = 0 %}
<ul class=\"list-group\">
{% for subscription in subscriptions %}
{% if(subscription.classRoom.id == room.id) %}
{% set candidats = candidats + 1 %}
{% if subscription.officialExamResult != \"0\" %}
{% set success = success + 1 %}
{% endif %}
<li class=\"list-group-item d-flex justify-content-between align-items-center row m-1\">
<div class=\"col-3\">
<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\">
</div>
<div class=\"col-3 \">
<h5> {{subscription.student.lastname|title ~ subscription.student.firstname|title}} </h5>
</div>
<div class=\"col-3 \">
<h5 class=\"text-muted\"><b>{{subscription.verbalOfficialExamResult|lower}}</b></h5>
</div>
</li>
{% endif %}
{% endfor %}
</ul>
<div class=\"course-rating text-center\">
{{ (100 * success / candidats)|round(2, 'floor') ~ \"%\"}}
{#<i class=\"fa fa-star\"></i>
<i class=\"fa fa-star\"></i>
<i class=\"fa fa-star\"></i>
<i class=\"fa fa-star\"></i>
{% if success == candidats %}
<i class=\"fa fa-star\"></i>
{% else %}
<i class=\"fa fa-star-half\"></i>
{% endif %}#}
</div>
{% endif %}
</div>
<div class=\"course-meta-bot\">
<ul>
<li>
<i class=\"fa fa-book\" aria-hidden=\"true\"></i>
{{ pluralize(room.modules|length, 'Module' , 'Modules') }}
</li>
</ul>
</div>
</div>
</div>
<!-- end row -->
{% endfor %}
</div>
{% endfor %}
<div class=\"navigation text-center h3 m-5\">
{{ knp_pagination_render(rooms) }}
</div>
<!-- end container -->
{% else %}
<p class=\"mt-5 h1 text-center\">
No classroom yet. \t
{% if is_granted(\"IS_AUTHENTICATED_REMEMBERED\") %}
<a href=\"{{ path('admin_classrooms_new') }}\">
Be the first!
</a>
{% endif %}
</p>
{% endif %}
</div>
</div>
{% endblock %}
", "school/roomList.html.twig", "/var/www/liveedu/public/preprod/liveedu/templates/school/roomList.html.twig");
}
}