<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
use Twig\Extension\SandboxExtension;
use Twig\MacroNamespace;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Sandbox\SecurityNotAllowedTestError;
use Twig\Source;
use Twig\Template;
use Twig\TemplateWrapper;
/* Front/Scholar/Chapter/show.html.twig */
class __TwigTemplate_22ba3bb7e01bf6b29855cc4fc9789845 extends Template
{
private Source $source;
/**
* @var array<string, MacroNamespace>
*/
private array $macros = [];
private \Twig\Runtime\EscaperRuntime $escaper;
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->escaper = $env->getRuntime('Twig\Runtime\EscaperRuntime');
$this->blocks = [
'back_to_dashboard' => [$this, 'block_back_to_dashboard'],
'title' => [$this, 'block_title'],
'stylesheets' => [$this, 'block_stylesheets'],
'before_navbar' => [$this, 'block_before_navbar'],
'body_markup' => [$this, 'block_body_markup'],
'content' => [$this, 'block_content'],
'body' => [$this, 'block_body'],
'javascripts' => [$this, 'block_javascripts'],
];
}
protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
{
// line 1
return $this->parent ??= $this->load("base.html.twig", 1);
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$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", "Front/Scholar/Chapter/show.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Front/Scholar/Chapter/show.html.twig"));
// line 7
if ( !array_key_exists("canSeeMessages", $context)) {
// line 8
yield " ";
$context["canSeeMessages"] = true;
}
// line 13
$context["currentRoute"] = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 13, $this->source); })()), "request", [], "any", false, false, false, 13), "attributes", [], "any", false, false, false, 13), "get", ["_route"], "method", false, false, false, 13);
// line 14
$context["enableChatBot"] = ($this->env->getRuntime('App\Twig\Runtime\Scholar\ScholarChapterRuntime')->isChatBotEnabled((isset($context["chapter"]) || array_key_exists("chapter", $context) ? $context["chapter"] : (function () { throw new RuntimeError('Variable "chapter" does not exist.', 14, $this->source); })())) && ((isset($context["currentRoute"]) || array_key_exists("currentRoute", $context) ? $context["currentRoute"] : (function () { throw new RuntimeError('Variable "currentRoute" does not exist.', 14, $this->source); })()) == "front_channel_chapter_show"));
// line 1
$this->parent = $this->load("base.html.twig", 1);
yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 3
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_back_to_dashboard(array $context, array $blocks = []): iterable
{
$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", "back_to_dashboard"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "back_to_dashboard"));
// line 4
yield " ";
yield from $this->load("Front/Scholar/Partial/_back_to_dashboard.html.twig", 4)->unwrap()->yield($context);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
return; yield;
}
// line 11
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_title(array $context, array $blocks = []): iterable
{
$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", "title"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
yield (string) $this->escaper->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["chapter"]) || array_key_exists("chapter", $context) ? $context["chapter"] : (function () { throw new RuntimeError('Variable "chapter" does not exist.', 11, $this->source); })()), "lesson", [], "any", false, false, false, 11), "name", [], "any", false, false, false, 11), "html", null, true);
yield " - ";
yield from $this->yieldParentBlock("title", $context, $blocks);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
return; yield;
}
// line 16
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_stylesheets(array $context, array $blocks = []): iterable
{
$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", "stylesheets"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheets"));
// line 17
yield " ";
yield from $this->yieldParentBlock("stylesheets", $context, $blocks);
yield "
";
// line 18
yield (string) $this->extensions['Symfony\WebpackEncoreBundle\Twig\EntryFilesTwigExtension']->renderWebpackLinkTags("styles", "core", "core");
yield "
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
return; yield;
}
// line 21
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_before_navbar(array $context, array $blocks = []): iterable
{
$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", "before_navbar"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "before_navbar"));
// line 22
yield " ";
yield from $this->load("Front/Scholar/Partial/_preview_manager_heager.html.twig", 22)->unwrap()->yield(CoreExtension::merge($context, ["channel" => // line 23
(isset($context["channel"]) || array_key_exists("channel", $context) ? $context["channel"] : (function () { throw new RuntimeError('Variable "channel" does not exist.', 23, $this->source); })()), "currentRoute" => // line 24
(isset($context["currentRoute"]) || array_key_exists("currentRoute", $context) ? $context["currentRoute"] : (function () { throw new RuntimeError('Variable "currentRoute" does not exist.', 24, $this->source); })())]));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
return; yield;
}
// line 28
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_body_markup(array $context, array $blocks = []): iterable
{
$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_markup"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body_markup"));
// line 29
yield "<body class=\"progression chapter-view ";
if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("IS_AUTHENTICATED_REMEMBERED")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
yield "logged-in";
}
yield "\"
style=\"font-family: \x27Poppins\x27;\"
id=\"page-training-lesson\"
";
// line 32
if (((isset($context["currentRoute"]) || array_key_exists("currentRoute", $context) ? $context["currentRoute"] : (function () { throw new RuntimeError('Variable "currentRoute" does not exist.', 32, $this->source); })()) == "front_channel_chapter_show")) {
// line 33
yield " data-training_id=";
yield (string) $this->escaper->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["training"]) || array_key_exists("training", $context) ? $context["training"] : (function () { throw new RuntimeError('Variable "training" does not exist.', 33, $this->source); })()), "id", [], "any", false, false, false, 33), "html", null, true);
yield "
data-module_id=";
// line 34
yield (string) $this->escaper->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["module"]) || array_key_exists("module", $context) ? $context["module"] : (function () { throw new RuntimeError('Variable "module" does not exist.', 34, $this->source); })()), "id", [], "any", false, false, false, 34), "html", null, true);
yield "
data-lesson_id=";
// line 35
yield (string) $this->escaper->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["lesson"]) || array_key_exists("lesson", $context) ? $context["lesson"] : (function () { throw new RuntimeError('Variable "lesson" does not exist.', 35, $this->source); })()), "id", [], "any", false, false, false, 35), "html", null, true);
yield "
data-chapter_id=\"";
// line 36
yield (string) $this->escaper->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["chapter"]) || array_key_exists("chapter", $context) ? $context["chapter"] : (function () { throw new RuntimeError('Variable "chapter" does not exist.', 36, $this->source); })()), "id", [], "any", false, false, false, 36), "html", null, true);
yield "\"
";
}
// line 38
yield ">
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
return; yield;
}
// line 41
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_content(array $context, array $blocks = []): iterable
{
$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", "content"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
// line 42
yield " ";
if (CoreExtension::inFilter((isset($context["currentRoute"]) || array_key_exists("currentRoute", $context) ? $context["currentRoute"] : (function () { throw new RuntimeError('Variable "currentRoute" does not exist.', 42, $this->source); })()), ["front_channel_chapter_show", "manager_channel_module_chapter_show", "manager_channel_training_module_chapter_show"])) {
// line 43
yield " ";
$context["trainingModuleLessons"] = $this->env->getRuntime('App\Twig\Runtime\Scholar\ScholarModuleRuntime')->getLessons((isset($context["module"]) || array_key_exists("module", $context) ? $context["module"] : (function () { throw new RuntimeError('Variable "module" does not exist.', 43, $this->source); })()));
// line 44
yield " ";
} elseif (CoreExtension::inFilter((isset($context["currentRoute"]) || array_key_exists("currentRoute", $context) ? $context["currentRoute"] : (function () { throw new RuntimeError('Variable "currentRoute" does not exist.', 44, $this->source); })()), ["manager_channel_chapter_show_message", "manager_channel_chapter_show"])) {
// line 45
yield " ";
$context["trainingModuleLessons"] = [(isset($context["lesson"]) || array_key_exists("lesson", $context) ? $context["lesson"] : (function () { throw new RuntimeError('Variable "lesson" does not exist.', 45, $this->source); })())];
// line 46
yield " ";
}
// line 47
yield "
";
// line 48
if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 48, $this->source); })()), "user", [], "any", false, false, false, 48)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 49
yield " ";
$preRendered = $this->extensions["Symfony\\UX\\TwigComponent\\Twig\\ComponentExtension"]->extensionPreCreateForRender("ChannelUserData:CursusLockout", Twig\Extension\CoreExtension::toArray(["cursus" => (((array_key_exists("cursus", $context) && !(null === $context["cursus"]))) ? ($context["cursus"]) : (null))]));
if (null !== $preRendered) {
echo $preRendered;
} else {
$preRenderEvent = $this->extensions["Symfony\\UX\\TwigComponent\\Twig\\ComponentExtension"]->startEmbeddedComponentRender("ChannelUserData:CursusLockout", Twig\Extension\CoreExtension::toArray(["cursus" => (((array_key_exists("cursus", $context) && !(null === $context["cursus"]))) ? ($context["cursus"]) : (null))]), $context, "Front/Scholar/Chapter/show.html.twig", 6729837851);
$embeddedContext = $preRenderEvent->getVariables();
$embeddedContext["__parent__"] = $preRenderEvent->getTemplate();
if (!isset($embeddedContext["outerBlocks"])) {
$embeddedContext["outerBlocks"] = new \Symfony\UX\TwigComponent\BlockStack();
}
$embeddedBlocks = $embeddedContext["outerBlocks"]->convert($blocks, 6729837851);
$this->loadTemplate("Front/Scholar/Chapter/show.html.twig", "Front/Scholar/Chapter/show.html.twig", 49, "6729837851")->display($embeddedContext, $embeddedBlocks);
$this->extensions["Symfony\\UX\\TwigComponent\\Twig\\ComponentExtension"]->finishEmbeddedComponentRender();
}
// line 50
yield " ";
}
// line 51
yield "
";
// line 52
yield from $this->load("Front/Scholar/Partial/_menu_lessons_mobile.html.twig", 52)->unwrap()->yield(CoreExtension::merge($context, ["current_chapter" => // line 53
(isset($context["chapter"]) || array_key_exists("chapter", $context) ? $context["chapter"] : (function () { throw new RuntimeError('Variable "chapter" does not exist.', 53, $this->source); })())]));
// line 55
yield "
<div class=\"container pt-md-5 pb-md-5 pt-3 pb-3 summary-lesson font-size-14\">
<div class=\"row\">
<div class=\"col-md-9 col-12\">
<div>
";
// line 60
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 60, $this->source); })()), "flashes", [], "method", false, false, false, 60));
foreach ($context['_seq'] as $context["key"] => $context["messageType"]) {
// line 61
yield " <div>
";
// line 62
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable($context["messageType"]);
foreach ($context['_seq'] as $context["_key"] => $context["message"]) {
// line 63
yield " <div class=\"alert alert-";
yield (string) $this->escaper->escape(Twig\Extension\CoreExtension::replace($context["key"], ["error" => "danger"]), "html", null, true);
yield "\">
";
// line 64
yield (string) $this->escaper->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans($context["message"]), "html", null, true);
yield "
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['message'], $context['_parent']);
$context = array_intersect_key($context, $_parent);
$context += $_parent;
// line 67
yield " </div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['key'], $context['messageType'], $context['_parent']);
$context = array_intersect_key($context, $_parent);
$context += $_parent;
// line 69
yield " </div>
<h2 class=\"font-weight-bold font-size-16px\">";
// line 71
yield (string) $this->escaper->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.lesson.show.title.label", ["%name%" => CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["chapter"]) || array_key_exists("chapter", $context) ? $context["chapter"] : (function () { throw new RuntimeError('Variable "chapter" does not exist.', 71, $this->source); })()), "lesson", [], "any", false, false, false, 71), "name", [], "any", false, false, false, 71)]), "html", null, true);
yield "</h2>
<h1 class=\"v2-title-big\">";
// line 72
yield (string) $this->escaper->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["chapter"]) || array_key_exists("chapter", $context) ? $context["chapter"] : (function () { throw new RuntimeError('Variable "chapter" does not exist.', 72, $this->source); })()), "name", [], "any", false, false, false, 72), "html", null, true);
yield "</h1>
";
// line 74
yield from $this->load("Front/Scholar/Partial/_content_alert.html.twig", 74)->unwrap()->yield($context);
// line 75
yield "
<div class=\"col-12 col-lg-6 d-flex justify-content-between p-0\"> ";
// line 77
yield " <div class=\"d-flex align-items-center\"> ";
// line 78
yield " <img class=\"star-space chapter-comment-logo\"
src=\"";
// line 79
yield (string) $this->escaper->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("build/common/icon-chat.svg", "common"), "html", null, true);
yield "\" alt=\"Count comments\"/>
<div class=\"marks d-flex justify-content-center align-items-center\">";
// line 80
yield (string) $this->escaper->escape($this->env->getRuntime('App\Twig\Runtime\Scholar\ScholarChapterRuntime')->getMessageCount((isset($context["chapter"]) || array_key_exists("chapter", $context) ? $context["chapter"] : (function () { throw new RuntimeError('Variable "chapter" does not exist.', 80, $this->source); })())), "html", null, true);
yield "</div>
</div>
<div class=\"d-flex justify-content-center align-items-center\">";
// line 84
if ( !(null === CoreExtension::getAttribute($this->env, $this->source, (isset($context["lesson"]) || array_key_exists("lesson", $context) ? $context["lesson"] : (function () { throw new RuntimeError('Variable "lesson" does not exist.', 84, $this->source); })()), "updatedAt", [], "any", false, false, false, 84))) {
// line 85
yield (string) $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.training.show.createdAt.label", ["%date%" => $this->extensions['Twig\Extra\Intl\IntlExtension']->formatDate($this->env, CoreExtension::getAttribute($this->env, $this->source, // line 86
(isset($context["lesson"]) || array_key_exists("lesson", $context) ? $context["lesson"] : (function () { throw new RuntimeError('Variable "lesson" does not exist.', 86, $this->source); })()), "updatedAt", [], "any", false, false, false, 86), "long", "", null, null, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 86, $this->source); })()), "request", [], "any", false, false, false, 86), "locale", [], "any", false, false, false, 86))]);
} else {
// line 89
yield (string) $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.training.show.createdAt.label", ["%date%" => $this->extensions['Twig\Extra\Intl\IntlExtension']->formatDate($this->env, CoreExtension::getAttribute($this->env, $this->source, // line 90
(isset($context["lesson"]) || array_key_exists("lesson", $context) ? $context["lesson"] : (function () { throw new RuntimeError('Variable "lesson" does not exist.', 90, $this->source); })()), "createdAt", [], "any", false, false, false, 90), "long", "", null, null, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 90, $this->source); })()), "request", [], "any", false, false, false, 90), "locale", [], "any", false, false, false, 90))]);
}
// line 93
yield "</div>
</div>
";
// line 97
if ( !(null === CoreExtension::getAttribute($this->env, $this->source, (isset($context["chapter"]) || array_key_exists("chapter", $context) ? $context["chapter"] : (function () { throw new RuntimeError('Variable "chapter" does not exist.', 97, $this->source); })()), "description", [], "any", false, false, false, 97))) {
// line 98
yield " <div class=\"description-lesson mt-4\">
<p class=\"text-subcateg description-style\">";
// line 99
yield (string) $this->escaper->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["chapter"]) || array_key_exists("chapter", $context) ? $context["chapter"] : (function () { throw new RuntimeError('Variable "chapter" does not exist.', 99, $this->source); })()), "description", [], "any", false, false, false, 99), "html", null, true);
yield "</p>
</div>
";
}
// line 102
yield "
<div class=\"mt-4 lesson-content\">";
// line 103
yield (string) CoreExtension::getAttribute($this->env, $this->source, (isset($context["chapter"]) || array_key_exists("chapter", $context) ? $context["chapter"] : (function () { throw new RuntimeError('Variable "chapter" does not exist.', 103, $this->source); })()), "body", [], "any", false, false, false, 103);
yield "</div>
";
// line 105
if (((isset($context["currentRoute"]) || array_key_exists("currentRoute", $context) ? $context["currentRoute"] : (function () { throw new RuntimeError('Variable "currentRoute" does not exist.', 105, $this->source); })()) == "front_channel_chapter_show")) {
// line 106
yield " ";
yield from $this->load("Front/Scholar/Partial/_scholar_navigation_previous_after.html.twig", 106)->unwrap()->yield(CoreExtension::merge($context, ["next_informations" => $this->env->getRuntime('App\Twig\Runtime\Scholar\ScholarNavigationRuntime')->getNextInformationsChapter( // line 107
(isset($context["training"]) || array_key_exists("training", $context) ? $context["training"] : (function () { throw new RuntimeError('Variable "training" does not exist.', 107, $this->source); })()), (isset($context["module"]) || array_key_exists("module", $context) ? $context["module"] : (function () { throw new RuntimeError('Variable "module" does not exist.', 107, $this->source); })()), (isset($context["lesson"]) || array_key_exists("lesson", $context) ? $context["lesson"] : (function () { throw new RuntimeError('Variable "lesson" does not exist.', 107, $this->source); })()), (isset($context["chapter"]) || array_key_exists("chapter", $context) ? $context["chapter"] : (function () { throw new RuntimeError('Variable "chapter" does not exist.', 107, $this->source); })())), "previous_informations" => $this->env->getRuntime('App\Twig\Runtime\Scholar\ScholarNavigationRuntime')->getPreviousInformationsChapter( // line 108
(isset($context["training"]) || array_key_exists("training", $context) ? $context["training"] : (function () { throw new RuntimeError('Variable "training" does not exist.', 108, $this->source); })()), (isset($context["module"]) || array_key_exists("module", $context) ? $context["module"] : (function () { throw new RuntimeError('Variable "module" does not exist.', 108, $this->source); })()), (isset($context["lesson"]) || array_key_exists("lesson", $context) ? $context["lesson"] : (function () { throw new RuntimeError('Variable "lesson" does not exist.', 108, $this->source); })()), (isset($context["chapter"]) || array_key_exists("chapter", $context) ? $context["chapter"] : (function () { throw new RuntimeError('Variable "chapter" does not exist.', 108, $this->source); })()))]));
// line 110
yield " ";
}
// line 111
yield "
";
// line 112
if (((isset($context["canSeeMessages"]) || array_key_exists("canSeeMessages", $context) ? $context["canSeeMessages"] : (function () { throw new RuntimeError('Variable "canSeeMessages" does not exist.', 112, $this->source); })()) === true)) {
// line 113
yield " <div class=\"mt-5 chapter-questions-separator\"></div>
<div class=\"mt-5\" id=\"forum-messages\">
<div class=\"font-weight-bold font-size-16px mb-4\">";
// line 116
yield (string) $this->escaper->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.lesson.show.message.title.label", ["%count%" => $this->env->getRuntime('App\Twig\Runtime\Scholar\ScholarChapterRuntime')->getMessageCount((isset($context["chapter"]) || array_key_exists("chapter", $context) ? $context["chapter"] : (function () { throw new RuntimeError('Variable "chapter" does not exist.', 116, $this->source); })()))]), "html", null, true);
yield "</div>
";
// line 118
if ((Twig\Extension\CoreExtension::length($this->env->getCharset(), (isset($context["messages"]) || array_key_exists("messages", $context) ? $context["messages"] : (function () { throw new RuntimeError('Variable "messages" does not exist.', 118, $this->source); })())) == 0)) {
// line 119
yield " <div>";
yield (string) $this->escaper->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.lesson.show.message.no_message.label"), "html", null, true);
yield "</div>
";
}
// line 121
yield "
";
// line 122
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["messages"]) || array_key_exists("messages", $context) ? $context["messages"] : (function () { throw new RuntimeError('Variable "messages" does not exist.', 122, $this->source); })()));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["message"]) {
// line 123
yield " ";
if ((CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index0", [], "any", false, false, false, 123) != 0)) {
// line 124
yield " <div class=\"mt-3 mb-3 ml-5 mr-5 chapter-questions-separator\"></div>
";
}
// line 126
yield "
";
// line 127
$context["messageToAnswer"] = null;
// line 128
yield " ";
$context["children"] = $this->env->getRuntime('App\Twig\Runtime\Scholar\ScholarChapterRuntime')->getMessageChildren($context["message"]);
// line 129
yield " ";
if ((Twig\Extension\CoreExtension::length($this->env->getCharset(), (isset($context["children"]) || array_key_exists("children", $context) ? $context["children"] : (function () { throw new RuntimeError('Variable "children" does not exist.', 129, $this->source); })())) === 0)) {
// line 130
yield " ";
$context["messageToAnswer"] = $context["message"];
// line 131
yield " ";
}
// line 132
yield "
";
// line 133
yield from $this->load("Front/Scholar/Chapter/show_forum_message.html.twig", 133)->unwrap()->yield(CoreExtension::merge($context, ["message" => // line 134
$context["message"], "canDelete" => ((($tmp = // line 135
(isset($context["is_granted_comment"]) || array_key_exists("is_granted_comment", $context) ? $context["is_granted_comment"] : (function () { throw new RuntimeError('Variable "is_granted_comment" does not exist.', 135, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp) || ( !(null === CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 135, $this->source); })()), "user", [], "any", false, false, false, 135)) && $this->env->getRuntime('Nellapp\Bundle\SDKBundle\Permission\Twig\Runtime\Info\UserOwnerRuntime')->isOwner(CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 135, $this->source); })()), "user", [], "any", false, false, false, 135), $context["message"]))), "messageToAnswer" => // line 136
(isset($context["messageToAnswer"]) || array_key_exists("messageToAnswer", $context) ? $context["messageToAnswer"] : (function () { throw new RuntimeError('Variable "messageToAnswer" does not exist.', 136, $this->source); })())]));
// line 138
yield "
";
// line 139
$context["messageToAnswer"] = null;
// line 140
yield " ";
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["children"]) || array_key_exists("children", $context) ? $context["children"] : (function () { throw new RuntimeError('Variable "children" does not exist.', 140, $this->source); })()));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["child"]) {
// line 141
yield " ";
if ((CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, false, 141) === true)) {
// line 142
yield " ";
$context["messageToAnswer"] = $context["message"];
// line 143
yield " ";
}
// line 144
yield " ";
yield from $this->load("Front/Scholar/Chapter/show_forum_message.html.twig", 144)->unwrap()->yield(CoreExtension::merge($context, ["message" => // line 145
$context["child"], "canDelete" => ((($tmp = // line 146
(isset($context["is_granted_comment"]) || array_key_exists("is_granted_comment", $context) ? $context["is_granted_comment"] : (function () { throw new RuntimeError('Variable "is_granted_comment" does not exist.', 146, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp) || ( !(null === CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 146, $this->source); })()), "user", [], "any", false, false, false, 146)) && $this->env->getRuntime('Nellapp\Bundle\SDKBundle\Permission\Twig\Runtime\Info\UserOwnerRuntime')->isOwner(CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 146, $this->source); })()), "user", [], "any", false, false, false, 146), $context["child"]))), "messageToAnswer" => // line 147
(isset($context["messageToAnswer"]) || array_key_exists("messageToAnswer", $context) ? $context["messageToAnswer"] : (function () { throw new RuntimeError('Variable "messageToAnswer" does not exist.', 147, $this->source); })())]));
// line 149
yield " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['child'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent);
$context += $_parent;
// line 150
yield " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['message'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent);
$context += $_parent;
// line 151
yield "
";
// line 152
if (array_key_exists("form", $context)) {
// line 153
yield " <div id=\"form-message-anchor\" class=\"row";
if ( !(($tmp = CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 153, $this->source); })()), "user", [], "any", false, false, false, 153)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
yield " justify-content-center align-items-center";
}
yield " mt-5\">
";
// line 154
if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 154, $this->source); })()), "user", [], "any", false, false, false, 154)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 155
yield " <div class=\"col-1 d-none d-md-block\">
";
// line 156
if ((null === CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 156, $this->source); })()), "user", [], "any", false, false, false, 156), "avatarPath", [], "any", false, false, false, 156))) {
// line 157
yield " <span class=\"user-account\">
<i class=\"fas fa-user\"></i>
</span>
";
} else {
// line 161
yield " <img class=\"user-account\" src=\"";
yield (string) $this->escaper->escape($this->env->getRuntime('Nellapp\Bundle\SDKBundle\Twig\Runtime\ImageRunTime')->getUserAvatarThumbnail(CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 161, $this->source); })()), "user", [], "any", false, false, false, 161)), "html", null, true);
yield "\"
alt=\"User avatar\">
";
}
// line 164
yield " </div>
<div class=\"col-md-11 col-12 pr-0 pl-0\">
";
// line 167
if (((isset($context["enableChatBot"]) || array_key_exists("enableChatBot", $context) ? $context["enableChatBot"] : (function () { throw new RuntimeError('Variable "enableChatBot" does not exist.', 167, $this->source); })()) === false)) {
// line 168
yield " ";
yield (string) $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 168, $this->source); })()), 'form_start', ["attr" => ["class" => "m-0 d-flex flex-column flex-md-row"]]);
yield "
<div class=\"col-md-10 col-12\">
<div>";
// line 170
yield (string) $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 170, $this->source); })()), "content", [], "any", false, false, false, 170), 'row');
yield "</div>
<div>";
// line 171
yield (string) $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 171, $this->source); })()), 'errors');
yield "</div>
</div>
<div class=\"col-md-2 col-12 mt-send-mobile\">
<button
class=\"btn-nellapp-v2\"
style=\"display: flex;justify-content: space-between;align-items: center;padding: 10px 15px;\"
type=\"submit\"
>
<span>";
// line 180
yield "Envoyer";
yield "</span>
<i class=\"ml-2 fas fa-paper-plane\"></i>
</button>
</div>
";
// line 184
yield (string) $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 184, $this->source); })()), 'form_end');
yield "
";
} else {
// line 186
yield " <button
class=\"btn-nellapp-v2\"
style=\"display: flex;justify-content: space-between;align-items: center;padding: 10px 15px;\"
type=\"button\"
data-toggle=\"modal\"
data-target=\"#chat-bot-modal\"
id=\"chat-bot-modal-label\"
>
<span>Posez votre question</span>
<i class=\"ml-2 fas fa-paper-plane\"></i>
</button>
";
}
// line 199
yield " </div>
";
} else {
// line 201
yield " <div class=\"col-1\">
<span class=\"user-account\" style=\"border: 1px solid #dee2e6;\">
<i class=\"fas fa-user\"></i>
</span>
</div>
<div class=\"col-9\">";
// line 207
yield (string) $this->escaper->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.lesson.show.message.modal.please_connect.label"), "html", null, true);
// line 208
yield "</div>
<div class=\"col-2\">
<a href=\"";
// line 210
yield (string) $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("nellapp_sdk_connect_nellapp");
yield "\" class=\"btn-nellapp-v2\">";
// line 211
yield (string) $this->escaper->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.lesson.show.message.modal.login.label"), "html", null, true);
// line 212
yield "</a>
</div>
";
}
// line 215
yield " </div>
";
}
// line 217
yield " </div>
";
}
// line 219
yield " </div>
<div class=\"col-3 d-none d-md-block\">
";
// line 222
yield from $this->load("Front/Scholar/Partial/menu_lessons.html.twig", 222)->unwrap()->yield(CoreExtension::merge($context, ["current_chapter" => // line 223
(isset($context["chapter"]) || array_key_exists("chapter", $context) ? $context["chapter"] : (function () { throw new RuntimeError('Variable "chapter" does not exist.', 223, $this->source); })())]));
// line 225
yield " </div>
</div>
</div>
";
// line 229
yield from $this->yieldParentBlock("content", $context, $blocks);
yield "
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
return; yield;
}
// line 232
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_body(array $context, array $blocks = []): iterable
{
$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 233
yield " ";
yield from $this->yieldParentBlock("body", $context, $blocks);
yield "
";
// line 235
if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 235, $this->source); })()), "user", [], "any", false, false, false, 235)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 236
yield " <!-- Modal -->
<div class=\"modal fade\" id=\"modalMessage\" tabindex=\"-1\" role=\"dialog\" aria-hidden=\"true\"
style=\"font-family: \x27Poppins\x27\">
<div class=\"modal-dialog modal-dialog-centered forum-message-modal\" role=\"document\">
<div class=\"modal-content border-8\">
<div class=\"modal-header\">
<h5 class=\"modal-title title-main-modal-message question-title\"
style=\"font-size: 0.875rem;font-weight: bold;\">
";
// line 244
yield (string) $this->escaper->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.lesson.show.message.modal.title.label"), "html", null, true);
yield "
</h5>
<h5 class=\"modal-title title-main-modal-message response-title\"
style=\"display:none; font-size: 0.875rem; font-weight: bold\">
";
// line 248
yield (string) $this->escaper->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.lesson.show.message.modal.title_response.label"), "html", null, true);
yield "
<span class=\"span-response-title\"></span>
</h5>
<button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">
<span aria-hidden=\"true\">×</span>
</button>
</div>
<div class=\"modal-body\" style=\"padding: 20px 24px 0px 24px;\">
<div id=\"modal-response-message\"></div>
";
// line 258
yield (string) $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["formAnswer"]) || array_key_exists("formAnswer", $context) ? $context["formAnswer"] : (function () { throw new RuntimeError('Variable "formAnswer" does not exist.', 258, $this->source); })()), 'form_start');
yield "
";
// line 259
yield (string) $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env, $this->source, (isset($context["formAnswer"]) || array_key_exists("formAnswer", $context) ? $context["formAnswer"] : (function () { throw new RuntimeError('Variable "formAnswer" does not exist.', 259, $this->source); })()), "content", [], "any", false, false, false, 259), 'row');
yield "
</div>
<div class=\"modal-footer\" style=\"padding:8px 24px 16px 24px;\">
<button type=\"button\" class=\"btn-close-modale\"
data-dismiss=\"modal\">";
// line 264
yield (string) $this->escaper->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.lesson.show.message.modal.close.label"), "html", null, true);
yield "</button>
<button type=\"submit\"
class=\"btn-valid-modale\">";
// line 266
yield (string) $this->escaper->escape(((array_key_exists("button_label", $context)) ? (Twig\Extension\CoreExtension::default((isset($context["button_label"]) || array_key_exists("button_label", $context) ? $context["button_label"] : (function () { throw new RuntimeError('Variable "button_label" does not exist.', 266, $this->source); })()), $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("message.entity.save.label"))) : ($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("message.entity.save.label"))), "html", null, true);
yield "</button>
</div>
";
// line 269
yield (string) $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["formAnswer"]) || array_key_exists("formAnswer", $context) ? $context["formAnswer"] : (function () { throw new RuntimeError('Variable "formAnswer" does not exist.', 269, $this->source); })()), 'form_end');
yield "
</div>
</div>
</div>
";
// line 274
if (((isset($context["enableChatBot"]) || array_key_exists("enableChatBot", $context) ? $context["enableChatBot"] : (function () { throw new RuntimeError('Variable "enableChatBot" does not exist.', 274, $this->source); })()) === true)) {
// line 275
yield " ";
yield from $this->load("Front/Scholar/Chapter/_chat_bot_modal.html.twig", 275)->unwrap()->yield($context);
// line 276
yield " ";
}
// line 277
yield " ";
}
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
return; yield;
}
// line 280
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_javascripts(array $context, array $blocks = []): iterable
{
$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", "javascripts"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
// line 281
yield " ";
if (((($tmp = CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 281, $this->source); })()), "user", [], "any", false, false, false, 281)) && $tmp instanceof Markup ? (string) $tmp : $tmp) && ((isset($context["currentRoute"]) || array_key_exists("currentRoute", $context) ? $context["currentRoute"] : (function () { throw new RuntimeError('Variable "currentRoute" does not exist.', 281, $this->source); })()) == "front_channel_chapter_show"))) {
// line 282
yield " <script>
var attendanceUrl = \x27";
// line 283
yield (string) $this->escaper->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("async_channel_scholar_attendance_chapter", ["channelId" => CoreExtension::getAttribute($this->env, $this->source, // line 284
(isset($context["channel"]) || array_key_exists("channel", $context) ? $context["channel"] : (function () { throw new RuntimeError('Variable "channel" does not exist.', 284, $this->source); })()), "id", [], "any", false, false, false, 284)]), "html", null, true);
// line 285
yield "\x27;
</script>
";
}
// line 288
yield "
";
// line 289
yield from $this->yieldParentBlock("javascripts", $context, $blocks);
yield "
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
return; yield;
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "Front/Scholar/Chapter/show.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDefaultEscapeStrategy(): string|false
{
return "html";
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 850 => 289, 847 => 288, 842 => 285, 840 => 284, 839 => 283, 836 => 282, 833 => 281, 820 => 280, 808 => 277, 805 => 276, 802 => 275, 800 => 274, 792 => 269, 786 => 266, 781 => 264, 773 => 259, 769 => 258, 756 => 248, 749 => 244, 739 => 236, 737 => 235, 731 => 233, 718 => 232, 705 => 229, 699 => 225, 697 => 223, 696 => 222, 691 => 219, 687 => 217, 683 => 215, 678 => 212, 676 => 211, 673 => 210, 669 => 208, 667 => 207, 660 => 201, 656 => 199, 641 => 186, 636 => 184, 629 => 180, 617 => 171, 613 => 170, 607 => 168, 605 => 167, 600 => 164, 593 => 161, 587 => 157, 585 => 156, 582 => 155, 580 => 154, 573 => 153, 571 => 152, 568 => 151, 553 => 150, 538 => 149, 536 => 147, 535 => 146, 534 => 145, 532 => 144, 529 => 143, 526 => 142, 523 => 141, 505 => 140, 503 => 139, 500 => 138, 498 => 136, 497 => 135, 496 => 134, 495 => 133, 492 => 132, 489 => 131, 486 => 130, 483 => 129, 480 => 128, 478 => 127, 475 => 126, 471 => 124, 468 => 123, 451 => 122, 448 => 121, 442 => 119, 440 => 118, 435 => 116, 430 => 113, 428 => 112, 425 => 111, 422 => 110, 420 => 108, 419 => 107, 417 => 106, 415 => 105, 410 => 103, 407 => 102, 401 => 99, 398 => 98, 396 => 97, 390 => 93, 387 => 90, 386 => 89, 383 => 86, 382 => 85, 380 => 84, 374 => 80, 370 => 79, 367 => 78, 365 => 77, 362 => 75, 360 => 74, 355 => 72, 351 => 71, 347 => 69, 339 => 67, 329 => 64, 324 => 63, 320 => 62, 317 => 61, 313 => 60, 306 => 55, 304 => 53, 303 => 52, 300 => 51, 297 => 50, 281 => 49, 279 => 48, 276 => 47, 273 => 46, 270 => 45, 267 => 44, 264 => 43, 261 => 42, 248 => 41, 236 => 38, 231 => 36, 227 => 35, 223 => 34, 218 => 33, 216 => 32, 207 => 29, 194 => 28, 183 => 24, 182 => 23, 180 => 22, 167 => 21, 154 => 18, 149 => 17, 136 => 16, 111 => 11, 99 => 4, 86 => 3, 75 => 1, 73 => 14, 71 => 13, 67 => 8, 65 => 7, 52 => 1,);
}
public function getSourceContext(): Source
{
return new Source("{% extends \x27base.html.twig\x27 %}
{% block back_to_dashboard %}
{% include \x27Front/Scholar/Partial/_back_to_dashboard.html.twig\x27 %}
{% endblock back_to_dashboard %}
{% if canSeeMessages is not defined %}
{% set canSeeMessages = true %}
{% endif %}
{% block title %}{{ chapter.lesson.name }} - {{ parent() }}{% endblock %}
{% set currentRoute = app.request.attributes.get(\x27_route\x27) %}
{% set enableChatBot = chapter is chat_bot_enabled and currentRoute == \x27front_channel_chapter_show\x27 %}
{% block stylesheets %}
{{ parent() }}
{{ encore_entry_link_tags(\x27styles\x27, \x27core\x27, \x27core\x27) }}
{% endblock %}
{% block before_navbar %}
{% include \x27Front/Scholar/Partial/_preview_manager_heager.html.twig\x27 with {
\x27channel\x27: channel,
\x27currentRoute\x27: currentRoute,
} %}
{% endblock before_navbar %}
{% block body_markup %}
<body class=\"progression chapter-view {% if is_granted(\x27IS_AUTHENTICATED_REMEMBERED\x27) %}logged-in{% endif %}\"
style=\"font-family: \x27Poppins\x27;\"
id=\"page-training-lesson\"
{% if currentRoute == \x27front_channel_chapter_show\x27 %}
data-training_id={{ training.id }}
data-module_id={{ module.id }}
data-lesson_id={{ lesson.id }}
data-chapter_id=\"{{ chapter.id }}\"
{% endif %}
>
{% endblock body_markup %}
{% block content %}
{% if currentRoute in [\x27front_channel_chapter_show\x27, \x27manager_channel_module_chapter_show\x27, \x27manager_channel_training_module_chapter_show\x27] %}
{% set trainingModuleLessons = module | get_lessons %}
{% elseif currentRoute in [\x27manager_channel_chapter_show_message\x27, \x27manager_channel_chapter_show\x27] %}
{% set trainingModuleLessons = [lesson] %}
{% endif %}
{% if app.user %}
{% component \x27ChannelUserData:CursusLockout\x27 with { cursus: cursus ?? null } %}{% endcomponent %}
{% endif %}
{% include \x27Front/Scholar/Partial/_menu_lessons_mobile.html.twig\x27 with {
\x27current_chapter\x27: chapter
} %}
<div class=\"container pt-md-5 pb-md-5 pt-3 pb-3 summary-lesson font-size-14\">
<div class=\"row\">
<div class=\"col-md-9 col-12\">
<div>
{% for key, messageType in app.flashes() %}
<div>
{% for message in messageType %}
<div class=\"alert alert-{{ key|replace({\x27error\x27: \x27danger\x27}) }}\">
{{ message | trans }}
</div>
{% endfor %}
</div>
{% endfor %}
</div>
<h2 class=\"font-weight-bold font-size-16px\">{{- \x27front.scholar.lesson.show.title.label\x27|trans({\x27%name%\x27: chapter.lesson.name}) -}}</h2>
<h1 class=\"v2-title-big\">{{- chapter.name -}}</h1>
{% include \x27Front/Scholar/Partial/_content_alert.html.twig\x27 %}
<div class=\"col-12 col-lg-6 d-flex justify-content-between p-0\"> {# align-items-baseline #}
<div class=\"d-flex align-items-center\"> {# align-items-baseline #}
<img class=\"star-space chapter-comment-logo\"
src=\"{{- asset(\x27build/common/icon-chat.svg\x27, \x27common\x27) -}}\" alt=\"Count comments\"/>
<div class=\"marks d-flex justify-content-center align-items-center\">{{ chapter | getMessageCount }}</div>
</div>
<div class=\"d-flex justify-content-center align-items-center\">
{%- if lesson.updatedAt is not null -%}
{{- \x27front.scholar.training.show.createdAt.label\x27|trans({
\x27%date%\x27: lesson.updatedAt|format_date(\x27long\x27, locale=app.request.locale),
})|raw -}}
{%- else -%}
{{- \x27front.scholar.training.show.createdAt.label\x27|trans({
\x27%date%\x27: lesson.createdAt|format_date(\x27long\x27, locale=app.request.locale),
})|raw -}}
{%- endif -%}
</div>
</div>
{% if chapter.description is not null %}
<div class=\"description-lesson mt-4\">
<p class=\"text-subcateg description-style\">{{- chapter.description -}}</p>
</div>
{% endif %}
<div class=\"mt-4 lesson-content\">{{- chapter.body|raw -}}</div>
{% if currentRoute == \x27front_channel_chapter_show\x27 %}
{% include \x27Front/Scholar/Partial/_scholar_navigation_previous_after.html.twig\x27 with {
next_informations: get_next_informations_chapter(training, module, lesson, chapter),
previous_informations: get_previous_informations_chapter(training, module, lesson, chapter),
} %}
{% endif %}
{% if canSeeMessages is same as true %}
<div class=\"mt-5 chapter-questions-separator\"></div>
<div class=\"mt-5\" id=\"forum-messages\">
<div class=\"font-weight-bold font-size-16px mb-4\">{{- \x27front.scholar.lesson.show.message.title.label\x27|trans({\x27%count%\x27: chapter|getMessageCount}) -}}</div>
{% if messages|length == 0 %}
<div>{{- \x27front.scholar.lesson.show.message.no_message.label\x27|trans -}}</div>
{% endif %}
{% for message in messages %}
{% if loop.index0 != 0 %}
<div class=\"mt-3 mb-3 ml-5 mr-5 chapter-questions-separator\"></div>
{% endif %}
{% set messageToAnswer = null %}
{% set children = message|getMessageChildren %}
{% if children|length is same as 0 %}
{% set messageToAnswer = message %}
{% endif %}
{% include \x27Front/Scholar/Chapter/show_forum_message.html.twig\x27 with {
\x27message\x27: message,
\x27canDelete\x27: is_granted_comment or app.user is not null and app.user is owner_of(message),
\x27messageToAnswer\x27: messageToAnswer
} %}
{% set messageToAnswer = null %}
{% for child in children %}
{% if loop.last is same as true %}
{% set messageToAnswer = message %}
{% endif %}
{% include \x27Front/Scholar/Chapter/show_forum_message.html.twig\x27 with {
\x27message\x27: child,
\x27canDelete\x27: is_granted_comment or app.user is not null and app.user is owner_of(child),
\x27messageToAnswer\x27: messageToAnswer
} %}
{% endfor %}
{% endfor %}
{% if form is defined %}
<div id=\"form-message-anchor\" class=\"row{% if not app.user %} justify-content-center align-items-center{% endif %} mt-5\">
{% if app.user %}
<div class=\"col-1 d-none d-md-block\">
{% if app.user.avatarPath is null %}
<span class=\"user-account\">
<i class=\"fas fa-user\"></i>
</span>
{% else %}
<img class=\"user-account\" src=\"{{ get_user_avatar_thumbnail(app.user) }}\"
alt=\"User avatar\">
{% endif %}
</div>
<div class=\"col-md-11 col-12 pr-0 pl-0\">
{% if enableChatBot is same as false %}
{{ form_start(form, {\x27attr\x27: {\x27class\x27: \x27m-0 d-flex flex-column flex-md-row\x27}}) }}
<div class=\"col-md-10 col-12\">
<div>{{ form_row(form.content) }}</div>
<div>{{ form_errors(form) }}</div>
</div>
<div class=\"col-md-2 col-12 mt-send-mobile\">
<button
class=\"btn-nellapp-v2\"
style=\"display: flex;justify-content: space-between;align-items: center;padding: 10px 15px;\"
type=\"submit\"
>
<span>{{ \"Envoyer\" }}</span>
<i class=\"ml-2 fas fa-paper-plane\"></i>
</button>
</div>
{{ form_end(form) }}
{% else %}
<button
class=\"btn-nellapp-v2\"
style=\"display: flex;justify-content: space-between;align-items: center;padding: 10px 15px;\"
type=\"button\"
data-toggle=\"modal\"
data-target=\"#chat-bot-modal\"
id=\"chat-bot-modal-label\"
>
<span>Posez votre question</span>
<i class=\"ml-2 fas fa-paper-plane\"></i>
</button>
{% endif %}
</div>
{% else %}
<div class=\"col-1\">
<span class=\"user-account\" style=\"border: 1px solid #dee2e6;\">
<i class=\"fas fa-user\"></i>
</span>
</div>
<div class=\"col-9\">
{{- \x27front.scholar.lesson.show.message.modal.please_connect.label\x27|trans -}}
</div>
<div class=\"col-2\">
<a href=\"{{ path(\x27nellapp_sdk_connect_nellapp\x27) }}\" class=\"btn-nellapp-v2\">
{{- \x27front.scholar.lesson.show.message.modal.login.label\x27|trans -}}
</a>
</div>
{% endif %}
</div>
{% endif %}
</div>
{% endif %}
</div>
<div class=\"col-3 d-none d-md-block\">
{% include \x27Front/Scholar/Partial/menu_lessons.html.twig\x27 with {
\x27current_chapter\x27: chapter
} %}
</div>
</div>
</div>
{{ parent() }}
{% endblock content %}
{% block body %}
{{ parent() }}
{% if app.user %}
<!-- Modal -->
<div class=\"modal fade\" id=\"modalMessage\" tabindex=\"-1\" role=\"dialog\" aria-hidden=\"true\"
style=\"font-family: \x27Poppins\x27\">
<div class=\"modal-dialog modal-dialog-centered forum-message-modal\" role=\"document\">
<div class=\"modal-content border-8\">
<div class=\"modal-header\">
<h5 class=\"modal-title title-main-modal-message question-title\"
style=\"font-size: 0.875rem;font-weight: bold;\">
{{ \x27front.scholar.lesson.show.message.modal.title.label\x27|trans }}
</h5>
<h5 class=\"modal-title title-main-modal-message response-title\"
style=\"display:none; font-size: 0.875rem; font-weight: bold\">
{{ \x27front.scholar.lesson.show.message.modal.title_response.label\x27|trans }}
<span class=\"span-response-title\"></span>
</h5>
<button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">
<span aria-hidden=\"true\">×</span>
</button>
</div>
<div class=\"modal-body\" style=\"padding: 20px 24px 0px 24px;\">
<div id=\"modal-response-message\"></div>
{{ form_start(formAnswer) }}
{{ form_row(formAnswer.content) }}
</div>
<div class=\"modal-footer\" style=\"padding:8px 24px 16px 24px;\">
<button type=\"button\" class=\"btn-close-modale\"
data-dismiss=\"modal\">{{ \x27front.scholar.lesson.show.message.modal.close.label\x27|trans }}</button>
<button type=\"submit\"
class=\"btn-valid-modale\">{{ button_label|default(\x27message.entity.save.label\x27|trans) }}</button>
</div>
{{ form_end(formAnswer) }}
</div>
</div>
</div>
{% if enableChatBot is same as true %}
{% include \x27Front/Scholar/Chapter/_chat_bot_modal.html.twig\x27 %}
{% endif %}
{% endif %}
{% endblock %}
{% block javascripts %}
{% if app.user and currentRoute == \x27front_channel_chapter_show\x27 %}
<script>
var attendanceUrl = \x27{{ url(\x27async_channel_scholar_attendance_chapter\x27, {
\x27channelId\x27: channel.id
}) }}\x27;
</script>
{% endif %}
{{ parent() }}
{% endblock %}
", "Front/Scholar/Chapter/show.html.twig", "/var/www/html/templates/Front/Scholar/Chapter/show.html.twig");
}
}
/* Front/Scholar/Chapter/show.html.twig */
class __TwigTemplate_22ba3bb7e01bf6b29855cc4fc9789845___6729837851 extends Template
{
private Source $source;
/**
* @var array<string, MacroNamespace>
*/
private array $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'outer__block_fallback' => [$this, 'block_outer__block_fallback'],
];
}
protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
{
// line 49
return $this->load((isset($context["__parent__"]) || array_key_exists("__parent__", $context) ? $context["__parent__"] : (function () { throw new RuntimeError('Variable "__parent__" does not exist.', 49, $this->source); })()), 49);
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$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", "Front/Scholar/Chapter/show.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Front/Scholar/Chapter/show.html.twig"));
yield from $this->getParent($context)->unwrap()->yield($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_outer__block_fallback(array $context, array $blocks = []): iterable
{
$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", "outer__block_fallback"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "outer__block_fallback"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
return; yield;
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "Front/Scholar/Chapter/show.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDefaultEscapeStrategy(): string|false
{
return "html";
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 1214 => 49, 850 => 289, 847 => 288, 842 => 285, 840 => 284, 839 => 283, 836 => 282, 833 => 281, 820 => 280, 808 => 277, 805 => 276, 802 => 275, 800 => 274, 792 => 269, 786 => 266, 781 => 264, 773 => 259, 769 => 258, 756 => 248, 749 => 244, 739 => 236, 737 => 235, 731 => 233, 718 => 232, 705 => 229, 699 => 225, 697 => 223, 696 => 222, 691 => 219, 687 => 217, 683 => 215, 678 => 212, 676 => 211, 673 => 210, 669 => 208, 667 => 207, 660 => 201, 656 => 199, 641 => 186, 636 => 184, 629 => 180, 617 => 171, 613 => 170, 607 => 168, 605 => 167, 600 => 164, 593 => 161, 587 => 157, 585 => 156, 582 => 155, 580 => 154, 573 => 153, 571 => 152, 568 => 151, 553 => 150, 538 => 149, 536 => 147, 535 => 146, 534 => 145, 532 => 144, 529 => 143, 526 => 142, 523 => 141, 505 => 140, 503 => 139, 500 => 138, 498 => 136, 497 => 135, 496 => 134, 495 => 133, 492 => 132, 489 => 131, 486 => 130, 483 => 129, 480 => 128, 478 => 127, 475 => 126, 471 => 124, 468 => 123, 451 => 122, 448 => 121, 442 => 119, 440 => 118, 435 => 116, 430 => 113, 428 => 112, 425 => 111, 422 => 110, 420 => 108, 419 => 107, 417 => 106, 415 => 105, 410 => 103, 407 => 102, 401 => 99, 398 => 98, 396 => 97, 390 => 93, 387 => 90, 386 => 89, 383 => 86, 382 => 85, 380 => 84, 374 => 80, 370 => 79, 367 => 78, 365 => 77, 362 => 75, 360 => 74, 355 => 72, 351 => 71, 347 => 69, 339 => 67, 329 => 64, 324 => 63, 320 => 62, 317 => 61, 313 => 60, 306 => 55, 304 => 53, 303 => 52, 300 => 51, 297 => 50, 281 => 49, 279 => 48, 276 => 47, 273 => 46, 270 => 45, 267 => 44, 264 => 43, 261 => 42, 248 => 41, 236 => 38, 231 => 36, 227 => 35, 223 => 34, 218 => 33, 216 => 32, 207 => 29, 194 => 28, 183 => 24, 182 => 23, 180 => 22, 167 => 21, 154 => 18, 149 => 17, 136 => 16, 111 => 11, 99 => 4, 86 => 3, 75 => 1, 73 => 14, 71 => 13, 67 => 8, 65 => 7, 52 => 1,);
}
public function getSourceContext(): Source
{
return new Source("{% extends \x27base.html.twig\x27 %}
{% block back_to_dashboard %}
{% include \x27Front/Scholar/Partial/_back_to_dashboard.html.twig\x27 %}
{% endblock back_to_dashboard %}
{% if canSeeMessages is not defined %}
{% set canSeeMessages = true %}
{% endif %}
{% block title %}{{ chapter.lesson.name }} - {{ parent() }}{% endblock %}
{% set currentRoute = app.request.attributes.get(\x27_route\x27) %}
{% set enableChatBot = chapter is chat_bot_enabled and currentRoute == \x27front_channel_chapter_show\x27 %}
{% block stylesheets %}
{{ parent() }}
{{ encore_entry_link_tags(\x27styles\x27, \x27core\x27, \x27core\x27) }}
{% endblock %}
{% block before_navbar %}
{% include \x27Front/Scholar/Partial/_preview_manager_heager.html.twig\x27 with {
\x27channel\x27: channel,
\x27currentRoute\x27: currentRoute,
} %}
{% endblock before_navbar %}
{% block body_markup %}
<body class=\"progression chapter-view {% if is_granted(\x27IS_AUTHENTICATED_REMEMBERED\x27) %}logged-in{% endif %}\"
style=\"font-family: \x27Poppins\x27;\"
id=\"page-training-lesson\"
{% if currentRoute == \x27front_channel_chapter_show\x27 %}
data-training_id={{ training.id }}
data-module_id={{ module.id }}
data-lesson_id={{ lesson.id }}
data-chapter_id=\"{{ chapter.id }}\"
{% endif %}
>
{% endblock body_markup %}
{% block content %}
{% if currentRoute in [\x27front_channel_chapter_show\x27, \x27manager_channel_module_chapter_show\x27, \x27manager_channel_training_module_chapter_show\x27] %}
{% set trainingModuleLessons = module | get_lessons %}
{% elseif currentRoute in [\x27manager_channel_chapter_show_message\x27, \x27manager_channel_chapter_show\x27] %}
{% set trainingModuleLessons = [lesson] %}
{% endif %}
{% if app.user %}
{% component \x27ChannelUserData:CursusLockout\x27 with { cursus: cursus ?? null } %}{% endcomponent %}
{% endif %}
{% include \x27Front/Scholar/Partial/_menu_lessons_mobile.html.twig\x27 with {
\x27current_chapter\x27: chapter
} %}
<div class=\"container pt-md-5 pb-md-5 pt-3 pb-3 summary-lesson font-size-14\">
<div class=\"row\">
<div class=\"col-md-9 col-12\">
<div>
{% for key, messageType in app.flashes() %}
<div>
{% for message in messageType %}
<div class=\"alert alert-{{ key|replace({\x27error\x27: \x27danger\x27}) }}\">
{{ message | trans }}
</div>
{% endfor %}
</div>
{% endfor %}
</div>
<h2 class=\"font-weight-bold font-size-16px\">{{- \x27front.scholar.lesson.show.title.label\x27|trans({\x27%name%\x27: chapter.lesson.name}) -}}</h2>
<h1 class=\"v2-title-big\">{{- chapter.name -}}</h1>
{% include \x27Front/Scholar/Partial/_content_alert.html.twig\x27 %}
<div class=\"col-12 col-lg-6 d-flex justify-content-between p-0\"> {# align-items-baseline #}
<div class=\"d-flex align-items-center\"> {# align-items-baseline #}
<img class=\"star-space chapter-comment-logo\"
src=\"{{- asset(\x27build/common/icon-chat.svg\x27, \x27common\x27) -}}\" alt=\"Count comments\"/>
<div class=\"marks d-flex justify-content-center align-items-center\">{{ chapter | getMessageCount }}</div>
</div>
<div class=\"d-flex justify-content-center align-items-center\">
{%- if lesson.updatedAt is not null -%}
{{- \x27front.scholar.training.show.createdAt.label\x27|trans({
\x27%date%\x27: lesson.updatedAt|format_date(\x27long\x27, locale=app.request.locale),
})|raw -}}
{%- else -%}
{{- \x27front.scholar.training.show.createdAt.label\x27|trans({
\x27%date%\x27: lesson.createdAt|format_date(\x27long\x27, locale=app.request.locale),
})|raw -}}
{%- endif -%}
</div>
</div>
{% if chapter.description is not null %}
<div class=\"description-lesson mt-4\">
<p class=\"text-subcateg description-style\">{{- chapter.description -}}</p>
</div>
{% endif %}
<div class=\"mt-4 lesson-content\">{{- chapter.body|raw -}}</div>
{% if currentRoute == \x27front_channel_chapter_show\x27 %}
{% include \x27Front/Scholar/Partial/_scholar_navigation_previous_after.html.twig\x27 with {
next_informations: get_next_informations_chapter(training, module, lesson, chapter),
previous_informations: get_previous_informations_chapter(training, module, lesson, chapter),
} %}
{% endif %}
{% if canSeeMessages is same as true %}
<div class=\"mt-5 chapter-questions-separator\"></div>
<div class=\"mt-5\" id=\"forum-messages\">
<div class=\"font-weight-bold font-size-16px mb-4\">{{- \x27front.scholar.lesson.show.message.title.label\x27|trans({\x27%count%\x27: chapter|getMessageCount}) -}}</div>
{% if messages|length == 0 %}
<div>{{- \x27front.scholar.lesson.show.message.no_message.label\x27|trans -}}</div>
{% endif %}
{% for message in messages %}
{% if loop.index0 != 0 %}
<div class=\"mt-3 mb-3 ml-5 mr-5 chapter-questions-separator\"></div>
{% endif %}
{% set messageToAnswer = null %}
{% set children = message|getMessageChildren %}
{% if children|length is same as 0 %}
{% set messageToAnswer = message %}
{% endif %}
{% include \x27Front/Scholar/Chapter/show_forum_message.html.twig\x27 with {
\x27message\x27: message,
\x27canDelete\x27: is_granted_comment or app.user is not null and app.user is owner_of(message),
\x27messageToAnswer\x27: messageToAnswer
} %}
{% set messageToAnswer = null %}
{% for child in children %}
{% if loop.last is same as true %}
{% set messageToAnswer = message %}
{% endif %}
{% include \x27Front/Scholar/Chapter/show_forum_message.html.twig\x27 with {
\x27message\x27: child,
\x27canDelete\x27: is_granted_comment or app.user is not null and app.user is owner_of(child),
\x27messageToAnswer\x27: messageToAnswer
} %}
{% endfor %}
{% endfor %}
{% if form is defined %}
<div id=\"form-message-anchor\" class=\"row{% if not app.user %} justify-content-center align-items-center{% endif %} mt-5\">
{% if app.user %}
<div class=\"col-1 d-none d-md-block\">
{% if app.user.avatarPath is null %}
<span class=\"user-account\">
<i class=\"fas fa-user\"></i>
</span>
{% else %}
<img class=\"user-account\" src=\"{{ get_user_avatar_thumbnail(app.user) }}\"
alt=\"User avatar\">
{% endif %}
</div>
<div class=\"col-md-11 col-12 pr-0 pl-0\">
{% if enableChatBot is same as false %}
{{ form_start(form, {\x27attr\x27: {\x27class\x27: \x27m-0 d-flex flex-column flex-md-row\x27}}) }}
<div class=\"col-md-10 col-12\">
<div>{{ form_row(form.content) }}</div>
<div>{{ form_errors(form) }}</div>
</div>
<div class=\"col-md-2 col-12 mt-send-mobile\">
<button
class=\"btn-nellapp-v2\"
style=\"display: flex;justify-content: space-between;align-items: center;padding: 10px 15px;\"
type=\"submit\"
>
<span>{{ \"Envoyer\" }}</span>
<i class=\"ml-2 fas fa-paper-plane\"></i>
</button>
</div>
{{ form_end(form) }}
{% else %}
<button
class=\"btn-nellapp-v2\"
style=\"display: flex;justify-content: space-between;align-items: center;padding: 10px 15px;\"
type=\"button\"
data-toggle=\"modal\"
data-target=\"#chat-bot-modal\"
id=\"chat-bot-modal-label\"
>
<span>Posez votre question</span>
<i class=\"ml-2 fas fa-paper-plane\"></i>
</button>
{% endif %}
</div>
{% else %}
<div class=\"col-1\">
<span class=\"user-account\" style=\"border: 1px solid #dee2e6;\">
<i class=\"fas fa-user\"></i>
</span>
</div>
<div class=\"col-9\">
{{- \x27front.scholar.lesson.show.message.modal.please_connect.label\x27|trans -}}
</div>
<div class=\"col-2\">
<a href=\"{{ path(\x27nellapp_sdk_connect_nellapp\x27) }}\" class=\"btn-nellapp-v2\">
{{- \x27front.scholar.lesson.show.message.modal.login.label\x27|trans -}}
</a>
</div>
{% endif %}
</div>
{% endif %}
</div>
{% endif %}
</div>
<div class=\"col-3 d-none d-md-block\">
{% include \x27Front/Scholar/Partial/menu_lessons.html.twig\x27 with {
\x27current_chapter\x27: chapter
} %}
</div>
</div>
</div>
{{ parent() }}
{% endblock content %}
{% block body %}
{{ parent() }}
{% if app.user %}
<!-- Modal -->
<div class=\"modal fade\" id=\"modalMessage\" tabindex=\"-1\" role=\"dialog\" aria-hidden=\"true\"
style=\"font-family: \x27Poppins\x27\">
<div class=\"modal-dialog modal-dialog-centered forum-message-modal\" role=\"document\">
<div class=\"modal-content border-8\">
<div class=\"modal-header\">
<h5 class=\"modal-title title-main-modal-message question-title\"
style=\"font-size: 0.875rem;font-weight: bold;\">
{{ \x27front.scholar.lesson.show.message.modal.title.label\x27|trans }}
</h5>
<h5 class=\"modal-title title-main-modal-message response-title\"
style=\"display:none; font-size: 0.875rem; font-weight: bold\">
{{ \x27front.scholar.lesson.show.message.modal.title_response.label\x27|trans }}
<span class=\"span-response-title\"></span>
</h5>
<button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">
<span aria-hidden=\"true\">×</span>
</button>
</div>
<div class=\"modal-body\" style=\"padding: 20px 24px 0px 24px;\">
<div id=\"modal-response-message\"></div>
{{ form_start(formAnswer) }}
{{ form_row(formAnswer.content) }}
</div>
<div class=\"modal-footer\" style=\"padding:8px 24px 16px 24px;\">
<button type=\"button\" class=\"btn-close-modale\"
data-dismiss=\"modal\">{{ \x27front.scholar.lesson.show.message.modal.close.label\x27|trans }}</button>
<button type=\"submit\"
class=\"btn-valid-modale\">{{ button_label|default(\x27message.entity.save.label\x27|trans) }}</button>
</div>
{{ form_end(formAnswer) }}
</div>
</div>
</div>
{% if enableChatBot is same as true %}
{% include \x27Front/Scholar/Chapter/_chat_bot_modal.html.twig\x27 %}
{% endif %}
{% endif %}
{% endblock %}
{% block javascripts %}
{% if app.user and currentRoute == \x27front_channel_chapter_show\x27 %}
<script>
var attendanceUrl = \x27{{ url(\x27async_channel_scholar_attendance_chapter\x27, {
\x27channelId\x27: channel.id
}) }}\x27;
</script>
{% endif %}
{{ parent() }}
{% endblock %}
", "Front/Scholar/Chapter/show.html.twig", "/var/www/html/templates/Front/Scholar/Chapter/show.html.twig");
}
}