var/cache/dev/twig/8d/8d1a4a389e6507067b89d0e0e943b17b.php line 55

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\CoreExtension;
  6. use Twig\Extension\SandboxExtension;
  7. use Twig\MacroNamespace;
  8. use Twig\Markup;
  9. use Twig\Sandbox\SecurityError;
  10. use Twig\Sandbox\SecurityNotAllowedTagError;
  11. use Twig\Sandbox\SecurityNotAllowedFilterError;
  12. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  13. use Twig\Sandbox\SecurityNotAllowedTestError;
  14. use Twig\Source;
  15. use Twig\Template;
  16. use Twig\TemplateWrapper;
  17. /* Front/Scholar/Chapter/show.html.twig */
  18. class __TwigTemplate_22ba3bb7e01bf6b29855cc4fc9789845 extends Template
  19. {
  20. private Source $source;
  21. /**
  22. * @var array<string, MacroNamespace>
  23. */
  24. private array $macros = [];
  25. private \Twig\Runtime\EscaperRuntime $escaper;
  26. public function __construct(Environment $env)
  27. {
  28. parent::__construct($env);
  29. $this->source = $this->getSourceContext();
  30. $this->escaper = $env->getRuntime('Twig\Runtime\EscaperRuntime');
  31. $this->blocks = [
  32. 'back_to_dashboard' => [$this, 'block_back_to_dashboard'],
  33. 'title' => [$this, 'block_title'],
  34. 'stylesheets' => [$this, 'block_stylesheets'],
  35. 'before_navbar' => [$this, 'block_before_navbar'],
  36. 'body_markup' => [$this, 'block_body_markup'],
  37. 'content' => [$this, 'block_content'],
  38. 'body' => [$this, 'block_body'],
  39. 'javascripts' => [$this, 'block_javascripts'],
  40. ];
  41. }
  42. protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
  43. {
  44. // line 1
  45. return $this->parent ??= $this->load("base.html.twig", 1);
  46. }
  47. protected function doDisplay(array $context, array $blocks = []): iterable
  48. {
  49. $macros = $this->macros;
  50. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  51. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Front/Scholar/Chapter/show.html.twig"));
  52. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  53. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Front/Scholar/Chapter/show.html.twig"));
  54. // line 7
  55. if ( !array_key_exists("canSeeMessages", $context)) {
  56. // line 8
  57. yield " ";
  58. $context["canSeeMessages"] = true;
  59. }
  60. // line 13
  61. $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);
  62. // line 14
  63. $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"));
  64. // line 1
  65. $this->parent = $this->load("base.html.twig", 1);
  66. yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
  67. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  68. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  69. }
  70. // line 3
  71. /**
  72. * @return iterable<null|scalar|\Stringable>
  73. */
  74. public function block_back_to_dashboard(array $context, array $blocks = []): iterable
  75. {
  76. $macros = $this->macros;
  77. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  78. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "back_to_dashboard"));
  79. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  80. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "back_to_dashboard"));
  81. // line 4
  82. yield " ";
  83. yield from $this->load("Front/Scholar/Partial/_back_to_dashboard.html.twig", 4)->unwrap()->yield($context);
  84. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  85. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  86. return; yield;
  87. }
  88. // line 11
  89. /**
  90. * @return iterable<null|scalar|\Stringable>
  91. */
  92. public function block_title(array $context, array $blocks = []): iterable
  93. {
  94. $macros = $this->macros;
  95. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  96. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
  97. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  98. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
  99. 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);
  100. yield " - ";
  101. yield from $this->yieldParentBlock("title", $context, $blocks);
  102. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  103. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  104. return; yield;
  105. }
  106. // line 16
  107. /**
  108. * @return iterable<null|scalar|\Stringable>
  109. */
  110. public function block_stylesheets(array $context, array $blocks = []): iterable
  111. {
  112. $macros = $this->macros;
  113. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  114. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheets"));
  115. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  116. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheets"));
  117. // line 17
  118. yield " ";
  119. yield from $this->yieldParentBlock("stylesheets", $context, $blocks);
  120. yield "
  121. ";
  122. // line 18
  123. yield (string) $this->extensions['Symfony\WebpackEncoreBundle\Twig\EntryFilesTwigExtension']->renderWebpackLinkTags("styles", "core", "core");
  124. yield "
  125. ";
  126. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  127. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  128. return; yield;
  129. }
  130. // line 21
  131. /**
  132. * @return iterable<null|scalar|\Stringable>
  133. */
  134. public function block_before_navbar(array $context, array $blocks = []): iterable
  135. {
  136. $macros = $this->macros;
  137. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  138. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "before_navbar"));
  139. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  140. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "before_navbar"));
  141. // line 22
  142. yield " ";
  143. yield from $this->load("Front/Scholar/Partial/_preview_manager_heager.html.twig", 22)->unwrap()->yield(CoreExtension::merge($context, ["channel" => // line 23
  144. (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
  145. (isset($context["currentRoute"]) || array_key_exists("currentRoute", $context) ? $context["currentRoute"] : (function () { throw new RuntimeError('Variable "currentRoute" does not exist.', 24, $this->source); })())]));
  146. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  147. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  148. return; yield;
  149. }
  150. // line 28
  151. /**
  152. * @return iterable<null|scalar|\Stringable>
  153. */
  154. public function block_body_markup(array $context, array $blocks = []): iterable
  155. {
  156. $macros = $this->macros;
  157. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  158. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body_markup"));
  159. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  160. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body_markup"));
  161. // line 29
  162. yield "<body class=\"progression chapter-view ";
  163. if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("IS_AUTHENTICATED_REMEMBERED")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  164. yield "logged-in";
  165. }
  166. yield "\"
  167. style=\"font-family: \x27Poppins\x27;\"
  168. id=\"page-training-lesson\"
  169. ";
  170. // line 32
  171. 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")) {
  172. // line 33
  173. yield " data-training_id=";
  174. 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);
  175. yield "
  176. data-module_id=";
  177. // line 34
  178. 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);
  179. yield "
  180. data-lesson_id=";
  181. // line 35
  182. 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);
  183. yield "
  184. data-chapter_id=\"";
  185. // line 36
  186. 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);
  187. yield "\"
  188. ";
  189. }
  190. // line 38
  191. yield ">
  192. ";
  193. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  194. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  195. return; yield;
  196. }
  197. // line 41
  198. /**
  199. * @return iterable<null|scalar|\Stringable>
  200. */
  201. public function block_content(array $context, array $blocks = []): iterable
  202. {
  203. $macros = $this->macros;
  204. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  205. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
  206. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  207. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
  208. // line 42
  209. yield " ";
  210. 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"])) {
  211. // line 43
  212. yield " ";
  213. $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); })()));
  214. // line 44
  215. yield " ";
  216. } 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"])) {
  217. // line 45
  218. yield " ";
  219. $context["trainingModuleLessons"] = [(isset($context["lesson"]) || array_key_exists("lesson", $context) ? $context["lesson"] : (function () { throw new RuntimeError('Variable "lesson" does not exist.', 45, $this->source); })())];
  220. // line 46
  221. yield " ";
  222. }
  223. // line 47
  224. yield "
  225. ";
  226. // line 48
  227. 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)) {
  228. // line 49
  229. yield " ";
  230. $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))]));
  231. if (null !== $preRendered) {
  232. echo $preRendered;
  233. } else {
  234. $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);
  235. $embeddedContext = $preRenderEvent->getVariables();
  236. $embeddedContext["__parent__"] = $preRenderEvent->getTemplate();
  237. if (!isset($embeddedContext["outerBlocks"])) {
  238. $embeddedContext["outerBlocks"] = new \Symfony\UX\TwigComponent\BlockStack();
  239. }
  240. $embeddedBlocks = $embeddedContext["outerBlocks"]->convert($blocks, 6729837851);
  241. $this->loadTemplate("Front/Scholar/Chapter/show.html.twig", "Front/Scholar/Chapter/show.html.twig", 49, "6729837851")->display($embeddedContext, $embeddedBlocks);
  242. $this->extensions["Symfony\\UX\\TwigComponent\\Twig\\ComponentExtension"]->finishEmbeddedComponentRender();
  243. }
  244. // line 50
  245. yield " ";
  246. }
  247. // line 51
  248. yield "
  249. ";
  250. // line 52
  251. yield from $this->load("Front/Scholar/Partial/_menu_lessons_mobile.html.twig", 52)->unwrap()->yield(CoreExtension::merge($context, ["current_chapter" => // line 53
  252. (isset($context["chapter"]) || array_key_exists("chapter", $context) ? $context["chapter"] : (function () { throw new RuntimeError('Variable "chapter" does not exist.', 53, $this->source); })())]));
  253. // line 55
  254. yield "
  255. <div class=\"container pt-md-5 pb-md-5 pt-3 pb-3 summary-lesson font-size-14\">
  256. <div class=\"row\">
  257. <div class=\"col-md-9 col-12\">
  258. <div>
  259. ";
  260. // line 60
  261. $context['_parent'] = $context;
  262. $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));
  263. foreach ($context['_seq'] as $context["key"] => $context["messageType"]) {
  264. // line 61
  265. yield " <div>
  266. ";
  267. // line 62
  268. $context['_parent'] = $context;
  269. $context['_seq'] = CoreExtension::ensureTraversable($context["messageType"]);
  270. foreach ($context['_seq'] as $context["_key"] => $context["message"]) {
  271. // line 63
  272. yield " <div class=\"alert alert-";
  273. yield (string) $this->escaper->escape(Twig\Extension\CoreExtension::replace($context["key"], ["error" => "danger"]), "html", null, true);
  274. yield "\">
  275. ";
  276. // line 64
  277. yield (string) $this->escaper->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans($context["message"]), "html", null, true);
  278. yield "
  279. </div>
  280. ";
  281. }
  282. $_parent = $context['_parent'];
  283. unset($context['_seq'], $context['_key'], $context['message'], $context['_parent']);
  284. $context = array_intersect_key($context, $_parent);
  285. $context += $_parent;
  286. // line 67
  287. yield " </div>
  288. ";
  289. }
  290. $_parent = $context['_parent'];
  291. unset($context['_seq'], $context['key'], $context['messageType'], $context['_parent']);
  292. $context = array_intersect_key($context, $_parent);
  293. $context += $_parent;
  294. // line 69
  295. yield " </div>
  296. <h2 class=\"font-weight-bold font-size-16px\">";
  297. // line 71
  298. 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);
  299. yield "</h2>
  300. <h1 class=\"v2-title-big\">";
  301. // line 72
  302. 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);
  303. yield "</h1>
  304. ";
  305. // line 74
  306. yield from $this->load("Front/Scholar/Partial/_content_alert.html.twig", 74)->unwrap()->yield($context);
  307. // line 75
  308. yield "
  309. <div class=\"col-12 col-lg-6 d-flex justify-content-between p-0\"> ";
  310. // line 77
  311. yield " <div class=\"d-flex align-items-center\"> ";
  312. // line 78
  313. yield " <img class=\"star-space chapter-comment-logo\"
  314. src=\"";
  315. // line 79
  316. yield (string) $this->escaper->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("build/common/icon-chat.svg", "common"), "html", null, true);
  317. yield "\" alt=\"Count comments\"/>
  318. <div class=\"marks d-flex justify-content-center align-items-center\">";
  319. // line 80
  320. 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);
  321. yield "</div>
  322. </div>
  323. <div class=\"d-flex justify-content-center align-items-center\">";
  324. // line 84
  325. 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))) {
  326. // line 85
  327. 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
  328. (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))]);
  329. } else {
  330. // line 89
  331. 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
  332. (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))]);
  333. }
  334. // line 93
  335. yield "</div>
  336. </div>
  337. ";
  338. // line 97
  339. 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))) {
  340. // line 98
  341. yield " <div class=\"description-lesson mt-4\">
  342. <p class=\"text-subcateg description-style\">";
  343. // line 99
  344. 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);
  345. yield "</p>
  346. </div>
  347. ";
  348. }
  349. // line 102
  350. yield "
  351. <div class=\"mt-4 lesson-content\">";
  352. // line 103
  353. 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);
  354. yield "</div>
  355. ";
  356. // line 105
  357. 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")) {
  358. // line 106
  359. yield " ";
  360. 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
  361. (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
  362. (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); })()))]));
  363. // line 110
  364. yield " ";
  365. }
  366. // line 111
  367. yield "
  368. ";
  369. // line 112
  370. if (((isset($context["canSeeMessages"]) || array_key_exists("canSeeMessages", $context) ? $context["canSeeMessages"] : (function () { throw new RuntimeError('Variable "canSeeMessages" does not exist.', 112, $this->source); })()) === true)) {
  371. // line 113
  372. yield " <div class=\"mt-5 chapter-questions-separator\"></div>
  373. <div class=\"mt-5\" id=\"forum-messages\">
  374. <div class=\"font-weight-bold font-size-16px mb-4\">";
  375. // line 116
  376. 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);
  377. yield "</div>
  378. ";
  379. // line 118
  380. 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)) {
  381. // line 119
  382. yield " <div>";
  383. yield (string) $this->escaper->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.lesson.show.message.no_message.label"), "html", null, true);
  384. yield "</div>
  385. ";
  386. }
  387. // line 121
  388. yield "
  389. ";
  390. // line 122
  391. $context['_parent'] = $context;
  392. $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); })()));
  393. $context['loop'] = [
  394. 'parent' => $context['_parent'],
  395. 'index0' => 0,
  396. 'index' => 1,
  397. 'first' => true,
  398. ];
  399. if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  400. $length = count($context['_seq']);
  401. $context['loop']['revindex0'] = $length - 1;
  402. $context['loop']['revindex'] = $length;
  403. $context['loop']['length'] = $length;
  404. $context['loop']['last'] = 1 === $length;
  405. }
  406. foreach ($context['_seq'] as $context["_key"] => $context["message"]) {
  407. // line 123
  408. yield " ";
  409. if ((CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index0", [], "any", false, false, false, 123) != 0)) {
  410. // line 124
  411. yield " <div class=\"mt-3 mb-3 ml-5 mr-5 chapter-questions-separator\"></div>
  412. ";
  413. }
  414. // line 126
  415. yield "
  416. ";
  417. // line 127
  418. $context["messageToAnswer"] = null;
  419. // line 128
  420. yield " ";
  421. $context["children"] = $this->env->getRuntime('App\Twig\Runtime\Scholar\ScholarChapterRuntime')->getMessageChildren($context["message"]);
  422. // line 129
  423. yield " ";
  424. 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)) {
  425. // line 130
  426. yield " ";
  427. $context["messageToAnswer"] = $context["message"];
  428. // line 131
  429. yield " ";
  430. }
  431. // line 132
  432. yield "
  433. ";
  434. // line 133
  435. yield from $this->load("Front/Scholar/Chapter/show_forum_message.html.twig", 133)->unwrap()->yield(CoreExtension::merge($context, ["message" => // line 134
  436. $context["message"], "canDelete" => ((($tmp = // line 135
  437. (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
  438. (isset($context["messageToAnswer"]) || array_key_exists("messageToAnswer", $context) ? $context["messageToAnswer"] : (function () { throw new RuntimeError('Variable "messageToAnswer" does not exist.', 136, $this->source); })())]));
  439. // line 138
  440. yield "
  441. ";
  442. // line 139
  443. $context["messageToAnswer"] = null;
  444. // line 140
  445. yield " ";
  446. $context['_parent'] = $context;
  447. $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); })()));
  448. $context['loop'] = [
  449. 'parent' => $context['_parent'],
  450. 'index0' => 0,
  451. 'index' => 1,
  452. 'first' => true,
  453. ];
  454. if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  455. $length = count($context['_seq']);
  456. $context['loop']['revindex0'] = $length - 1;
  457. $context['loop']['revindex'] = $length;
  458. $context['loop']['length'] = $length;
  459. $context['loop']['last'] = 1 === $length;
  460. }
  461. foreach ($context['_seq'] as $context["_key"] => $context["child"]) {
  462. // line 141
  463. yield " ";
  464. if ((CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, false, 141) === true)) {
  465. // line 142
  466. yield " ";
  467. $context["messageToAnswer"] = $context["message"];
  468. // line 143
  469. yield " ";
  470. }
  471. // line 144
  472. yield " ";
  473. yield from $this->load("Front/Scholar/Chapter/show_forum_message.html.twig", 144)->unwrap()->yield(CoreExtension::merge($context, ["message" => // line 145
  474. $context["child"], "canDelete" => ((($tmp = // line 146
  475. (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
  476. (isset($context["messageToAnswer"]) || array_key_exists("messageToAnswer", $context) ? $context["messageToAnswer"] : (function () { throw new RuntimeError('Variable "messageToAnswer" does not exist.', 147, $this->source); })())]));
  477. // line 149
  478. yield " ";
  479. ++$context['loop']['index0'];
  480. ++$context['loop']['index'];
  481. $context['loop']['first'] = false;
  482. if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
  483. --$context['loop']['revindex0'];
  484. --$context['loop']['revindex'];
  485. $context['loop']['last'] = 0 === $context['loop']['revindex0'];
  486. }
  487. }
  488. $_parent = $context['_parent'];
  489. unset($context['_seq'], $context['_key'], $context['child'], $context['_parent'], $context['loop']);
  490. $context = array_intersect_key($context, $_parent);
  491. $context += $_parent;
  492. // line 150
  493. yield " ";
  494. ++$context['loop']['index0'];
  495. ++$context['loop']['index'];
  496. $context['loop']['first'] = false;
  497. if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
  498. --$context['loop']['revindex0'];
  499. --$context['loop']['revindex'];
  500. $context['loop']['last'] = 0 === $context['loop']['revindex0'];
  501. }
  502. }
  503. $_parent = $context['_parent'];
  504. unset($context['_seq'], $context['_key'], $context['message'], $context['_parent'], $context['loop']);
  505. $context = array_intersect_key($context, $_parent);
  506. $context += $_parent;
  507. // line 151
  508. yield "
  509. ";
  510. // line 152
  511. if (array_key_exists("form", $context)) {
  512. // line 153
  513. yield " <div id=\"form-message-anchor\" class=\"row";
  514. 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)) {
  515. yield " justify-content-center align-items-center";
  516. }
  517. yield " mt-5\">
  518. ";
  519. // line 154
  520. 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)) {
  521. // line 155
  522. yield " <div class=\"col-1 d-none d-md-block\">
  523. ";
  524. // line 156
  525. 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))) {
  526. // line 157
  527. yield " <span class=\"user-account\">
  528. <i class=\"fas fa-user\"></i>
  529. </span>
  530. ";
  531. } else {
  532. // line 161
  533. yield " <img class=\"user-account\" src=\"";
  534. 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);
  535. yield "\"
  536. alt=\"User avatar\">
  537. ";
  538. }
  539. // line 164
  540. yield " </div>
  541. <div class=\"col-md-11 col-12 pr-0 pl-0\">
  542. ";
  543. // line 167
  544. if (((isset($context["enableChatBot"]) || array_key_exists("enableChatBot", $context) ? $context["enableChatBot"] : (function () { throw new RuntimeError('Variable "enableChatBot" does not exist.', 167, $this->source); })()) === false)) {
  545. // line 168
  546. yield " ";
  547. 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"]]);
  548. yield "
  549. <div class=\"col-md-10 col-12\">
  550. <div>";
  551. // line 170
  552. 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');
  553. yield "</div>
  554. <div>";
  555. // line 171
  556. 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');
  557. yield "</div>
  558. </div>
  559. <div class=\"col-md-2 col-12 mt-send-mobile\">
  560. <button
  561. class=\"btn-nellapp-v2\"
  562. style=\"display: flex;justify-content: space-between;align-items: center;padding: 10px 15px;\"
  563. type=\"submit\"
  564. >
  565. <span>";
  566. // line 180
  567. yield "Envoyer";
  568. yield "</span>
  569. <i class=\"ml-2 fas fa-paper-plane\"></i>
  570. </button>
  571. </div>
  572. ";
  573. // line 184
  574. 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');
  575. yield "
  576. ";
  577. } else {
  578. // line 186
  579. yield " <button
  580. class=\"btn-nellapp-v2\"
  581. style=\"display: flex;justify-content: space-between;align-items: center;padding: 10px 15px;\"
  582. type=\"button\"
  583. data-toggle=\"modal\"
  584. data-target=\"#chat-bot-modal\"
  585. id=\"chat-bot-modal-label\"
  586. >
  587. <span>Posez votre question</span>
  588. <i class=\"ml-2 fas fa-paper-plane\"></i>
  589. </button>
  590. ";
  591. }
  592. // line 199
  593. yield " </div>
  594. ";
  595. } else {
  596. // line 201
  597. yield " <div class=\"col-1\">
  598. <span class=\"user-account\" style=\"border: 1px solid #dee2e6;\">
  599. <i class=\"fas fa-user\"></i>
  600. </span>
  601. </div>
  602. <div class=\"col-9\">";
  603. // line 207
  604. 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);
  605. // line 208
  606. yield "</div>
  607. <div class=\"col-2\">
  608. <a href=\"";
  609. // line 210
  610. yield (string) $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("nellapp_sdk_connect_nellapp");
  611. yield "\" class=\"btn-nellapp-v2\">";
  612. // line 211
  613. yield (string) $this->escaper->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.lesson.show.message.modal.login.label"), "html", null, true);
  614. // line 212
  615. yield "</a>
  616. </div>
  617. ";
  618. }
  619. // line 215
  620. yield " </div>
  621. ";
  622. }
  623. // line 217
  624. yield " </div>
  625. ";
  626. }
  627. // line 219
  628. yield " </div>
  629. <div class=\"col-3 d-none d-md-block\">
  630. ";
  631. // line 222
  632. yield from $this->load("Front/Scholar/Partial/menu_lessons.html.twig", 222)->unwrap()->yield(CoreExtension::merge($context, ["current_chapter" => // line 223
  633. (isset($context["chapter"]) || array_key_exists("chapter", $context) ? $context["chapter"] : (function () { throw new RuntimeError('Variable "chapter" does not exist.', 223, $this->source); })())]));
  634. // line 225
  635. yield " </div>
  636. </div>
  637. </div>
  638. ";
  639. // line 229
  640. yield from $this->yieldParentBlock("content", $context, $blocks);
  641. yield "
  642. ";
  643. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  644. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  645. return; yield;
  646. }
  647. // line 232
  648. /**
  649. * @return iterable<null|scalar|\Stringable>
  650. */
  651. public function block_body(array $context, array $blocks = []): iterable
  652. {
  653. $macros = $this->macros;
  654. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  655. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
  656. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  657. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
  658. // line 233
  659. yield " ";
  660. yield from $this->yieldParentBlock("body", $context, $blocks);
  661. yield "
  662. ";
  663. // line 235
  664. 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)) {
  665. // line 236
  666. yield " <!-- Modal -->
  667. <div class=\"modal fade\" id=\"modalMessage\" tabindex=\"-1\" role=\"dialog\" aria-hidden=\"true\"
  668. style=\"font-family: \x27Poppins\x27\">
  669. <div class=\"modal-dialog modal-dialog-centered forum-message-modal\" role=\"document\">
  670. <div class=\"modal-content border-8\">
  671. <div class=\"modal-header\">
  672. <h5 class=\"modal-title title-main-modal-message question-title\"
  673. style=\"font-size: 0.875rem;font-weight: bold;\">
  674. ";
  675. // line 244
  676. yield (string) $this->escaper->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.lesson.show.message.modal.title.label"), "html", null, true);
  677. yield "
  678. </h5>
  679. <h5 class=\"modal-title title-main-modal-message response-title\"
  680. style=\"display:none; font-size: 0.875rem; font-weight: bold\">
  681. ";
  682. // line 248
  683. 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);
  684. yield "
  685. <span class=\"span-response-title\"></span>
  686. </h5>
  687. <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">
  688. <span aria-hidden=\"true\">&times;</span>
  689. </button>
  690. </div>
  691. <div class=\"modal-body\" style=\"padding: 20px 24px 0px 24px;\">
  692. <div id=\"modal-response-message\"></div>
  693. ";
  694. // line 258
  695. 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');
  696. yield "
  697. ";
  698. // line 259
  699. 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');
  700. yield "
  701. </div>
  702. <div class=\"modal-footer\" style=\"padding:8px 24px 16px 24px;\">
  703. <button type=\"button\" class=\"btn-close-modale\"
  704. data-dismiss=\"modal\">";
  705. // line 264
  706. yield (string) $this->escaper->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.scholar.lesson.show.message.modal.close.label"), "html", null, true);
  707. yield "</button>
  708. <button type=\"submit\"
  709. class=\"btn-valid-modale\">";
  710. // line 266
  711. 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);
  712. yield "</button>
  713. </div>
  714. ";
  715. // line 269
  716. 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');
  717. yield "
  718. </div>
  719. </div>
  720. </div>
  721. ";
  722. // line 274
  723. if (((isset($context["enableChatBot"]) || array_key_exists("enableChatBot", $context) ? $context["enableChatBot"] : (function () { throw new RuntimeError('Variable "enableChatBot" does not exist.', 274, $this->source); })()) === true)) {
  724. // line 275
  725. yield " ";
  726. yield from $this->load("Front/Scholar/Chapter/_chat_bot_modal.html.twig", 275)->unwrap()->yield($context);
  727. // line 276
  728. yield " ";
  729. }
  730. // line 277
  731. yield " ";
  732. }
  733. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  734. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  735. return; yield;
  736. }
  737. // line 280
  738. /**
  739. * @return iterable<null|scalar|\Stringable>
  740. */
  741. public function block_javascripts(array $context, array $blocks = []): iterable
  742. {
  743. $macros = $this->macros;
  744. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  745. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
  746. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  747. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
  748. // line 281
  749. yield " ";
  750. 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"))) {
  751. // line 282
  752. yield " <script>
  753. var attendanceUrl = \x27";
  754. // line 283
  755. 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
  756. (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);
  757. // line 285
  758. yield "\x27;
  759. </script>
  760. ";
  761. }
  762. // line 288
  763. yield "
  764. ";
  765. // line 289
  766. yield from $this->yieldParentBlock("javascripts", $context, $blocks);
  767. yield "
  768. ";
  769. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  770. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  771. return; yield;
  772. }
  773. /**
  774. * @codeCoverageIgnore
  775. */
  776. public function getTemplateName(): string
  777. {
  778. return "Front/Scholar/Chapter/show.html.twig";
  779. }
  780. /**
  781. * @codeCoverageIgnore
  782. */
  783. public function isTraitable(): bool
  784. {
  785. return false;
  786. }
  787. /**
  788. * @codeCoverageIgnore
  789. */
  790. public function getDefaultEscapeStrategy(): string|false
  791. {
  792. return "html";
  793. }
  794. /**
  795. * @codeCoverageIgnore
  796. */
  797. public function getDebugInfo(): array
  798. {
  799. 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,);
  800. }
  801. public function getSourceContext(): Source
  802. {
  803. return new Source("{% extends \x27base.html.twig\x27 %}
  804. {% block back_to_dashboard %}
  805. {% include \x27Front/Scholar/Partial/_back_to_dashboard.html.twig\x27 %}
  806. {% endblock back_to_dashboard %}
  807. {% if canSeeMessages is not defined %}
  808. {% set canSeeMessages = true %}
  809. {% endif %}
  810. {% block title %}{{ chapter.lesson.name }} - {{ parent() }}{% endblock %}
  811. {% set currentRoute = app.request.attributes.get(\x27_route\x27) %}
  812. {% set enableChatBot = chapter is chat_bot_enabled and currentRoute == \x27front_channel_chapter_show\x27 %}
  813. {% block stylesheets %}
  814. {{ parent() }}
  815. {{ encore_entry_link_tags(\x27styles\x27, \x27core\x27, \x27core\x27) }}
  816. {% endblock %}
  817. {% block before_navbar %}
  818. {% include \x27Front/Scholar/Partial/_preview_manager_heager.html.twig\x27 with {
  819. \x27channel\x27: channel,
  820. \x27currentRoute\x27: currentRoute,
  821. } %}
  822. {% endblock before_navbar %}
  823. {% block body_markup %}
  824. <body class=\"progression chapter-view {% if is_granted(\x27IS_AUTHENTICATED_REMEMBERED\x27) %}logged-in{% endif %}\"
  825. style=\"font-family: \x27Poppins\x27;\"
  826. id=\"page-training-lesson\"
  827. {% if currentRoute == \x27front_channel_chapter_show\x27 %}
  828. data-training_id={{ training.id }}
  829. data-module_id={{ module.id }}
  830. data-lesson_id={{ lesson.id }}
  831. data-chapter_id=\"{{ chapter.id }}\"
  832. {% endif %}
  833. >
  834. {% endblock body_markup %}
  835. {% block content %}
  836. {% if currentRoute in [\x27front_channel_chapter_show\x27, \x27manager_channel_module_chapter_show\x27, \x27manager_channel_training_module_chapter_show\x27] %}
  837. {% set trainingModuleLessons = module | get_lessons %}
  838. {% elseif currentRoute in [\x27manager_channel_chapter_show_message\x27, \x27manager_channel_chapter_show\x27] %}
  839. {% set trainingModuleLessons = [lesson] %}
  840. {% endif %}
  841. {% if app.user %}
  842. {% component \x27ChannelUserData:CursusLockout\x27 with { cursus: cursus ?? null } %}{% endcomponent %}
  843. {% endif %}
  844. {% include \x27Front/Scholar/Partial/_menu_lessons_mobile.html.twig\x27 with {
  845. \x27current_chapter\x27: chapter
  846. } %}
  847. <div class=\"container pt-md-5 pb-md-5 pt-3 pb-3 summary-lesson font-size-14\">
  848. <div class=\"row\">
  849. <div class=\"col-md-9 col-12\">
  850. <div>
  851. {% for key, messageType in app.flashes() %}
  852. <div>
  853. {% for message in messageType %}
  854. <div class=\"alert alert-{{ key|replace({\x27error\x27: \x27danger\x27}) }}\">
  855. {{ message | trans }}
  856. </div>
  857. {% endfor %}
  858. </div>
  859. {% endfor %}
  860. </div>
  861. <h2 class=\"font-weight-bold font-size-16px\">{{- \x27front.scholar.lesson.show.title.label\x27|trans({\x27%name%\x27: chapter.lesson.name}) -}}</h2>
  862. <h1 class=\"v2-title-big\">{{- chapter.name -}}</h1>
  863. {% include \x27Front/Scholar/Partial/_content_alert.html.twig\x27 %}
  864. <div class=\"col-12 col-lg-6 d-flex justify-content-between p-0\"> {# align-items-baseline #}
  865. <div class=\"d-flex align-items-center\"> {# align-items-baseline #}
  866. <img class=\"star-space chapter-comment-logo\"
  867. src=\"{{- asset(\x27build/common/icon-chat.svg\x27, \x27common\x27) -}}\" alt=\"Count comments\"/>
  868. <div class=\"marks d-flex justify-content-center align-items-center\">{{ chapter | getMessageCount }}</div>
  869. </div>
  870. <div class=\"d-flex justify-content-center align-items-center\">
  871. {%- if lesson.updatedAt is not null -%}
  872. {{- \x27front.scholar.training.show.createdAt.label\x27|trans({
  873. \x27%date%\x27: lesson.updatedAt|format_date(\x27long\x27, locale=app.request.locale),
  874. })|raw -}}
  875. {%- else -%}
  876. {{- \x27front.scholar.training.show.createdAt.label\x27|trans({
  877. \x27%date%\x27: lesson.createdAt|format_date(\x27long\x27, locale=app.request.locale),
  878. })|raw -}}
  879. {%- endif -%}
  880. </div>
  881. </div>
  882. {% if chapter.description is not null %}
  883. <div class=\"description-lesson mt-4\">
  884. <p class=\"text-subcateg description-style\">{{- chapter.description -}}</p>
  885. </div>
  886. {% endif %}
  887. <div class=\"mt-4 lesson-content\">{{- chapter.body|raw -}}</div>
  888. {% if currentRoute == \x27front_channel_chapter_show\x27 %}
  889. {% include \x27Front/Scholar/Partial/_scholar_navigation_previous_after.html.twig\x27 with {
  890. next_informations: get_next_informations_chapter(training, module, lesson, chapter),
  891. previous_informations: get_previous_informations_chapter(training, module, lesson, chapter),
  892. } %}
  893. {% endif %}
  894. {% if canSeeMessages is same as true %}
  895. <div class=\"mt-5 chapter-questions-separator\"></div>
  896. <div class=\"mt-5\" id=\"forum-messages\">
  897. <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>
  898. {% if messages|length == 0 %}
  899. <div>{{- \x27front.scholar.lesson.show.message.no_message.label\x27|trans -}}</div>
  900. {% endif %}
  901. {% for message in messages %}
  902. {% if loop.index0 != 0 %}
  903. <div class=\"mt-3 mb-3 ml-5 mr-5 chapter-questions-separator\"></div>
  904. {% endif %}
  905. {% set messageToAnswer = null %}
  906. {% set children = message|getMessageChildren %}
  907. {% if children|length is same as 0 %}
  908. {% set messageToAnswer = message %}
  909. {% endif %}
  910. {% include \x27Front/Scholar/Chapter/show_forum_message.html.twig\x27 with {
  911. \x27message\x27: message,
  912. \x27canDelete\x27: is_granted_comment or app.user is not null and app.user is owner_of(message),
  913. \x27messageToAnswer\x27: messageToAnswer
  914. } %}
  915. {% set messageToAnswer = null %}
  916. {% for child in children %}
  917. {% if loop.last is same as true %}
  918. {% set messageToAnswer = message %}
  919. {% endif %}
  920. {% include \x27Front/Scholar/Chapter/show_forum_message.html.twig\x27 with {
  921. \x27message\x27: child,
  922. \x27canDelete\x27: is_granted_comment or app.user is not null and app.user is owner_of(child),
  923. \x27messageToAnswer\x27: messageToAnswer
  924. } %}
  925. {% endfor %}
  926. {% endfor %}
  927. {% if form is defined %}
  928. <div id=\"form-message-anchor\" class=\"row{% if not app.user %} justify-content-center align-items-center{% endif %} mt-5\">
  929. {% if app.user %}
  930. <div class=\"col-1 d-none d-md-block\">
  931. {% if app.user.avatarPath is null %}
  932. <span class=\"user-account\">
  933. <i class=\"fas fa-user\"></i>
  934. </span>
  935. {% else %}
  936. <img class=\"user-account\" src=\"{{ get_user_avatar_thumbnail(app.user) }}\"
  937. alt=\"User avatar\">
  938. {% endif %}
  939. </div>
  940. <div class=\"col-md-11 col-12 pr-0 pl-0\">
  941. {% if enableChatBot is same as false %}
  942. {{ form_start(form, {\x27attr\x27: {\x27class\x27: \x27m-0 d-flex flex-column flex-md-row\x27}}) }}
  943. <div class=\"col-md-10 col-12\">
  944. <div>{{ form_row(form.content) }}</div>
  945. <div>{{ form_errors(form) }}</div>
  946. </div>
  947. <div class=\"col-md-2 col-12 mt-send-mobile\">
  948. <button
  949. class=\"btn-nellapp-v2\"
  950. style=\"display: flex;justify-content: space-between;align-items: center;padding: 10px 15px;\"
  951. type=\"submit\"
  952. >
  953. <span>{{ \"Envoyer\" }}</span>
  954. <i class=\"ml-2 fas fa-paper-plane\"></i>
  955. </button>
  956. </div>
  957. {{ form_end(form) }}
  958. {% else %}
  959. <button
  960. class=\"btn-nellapp-v2\"
  961. style=\"display: flex;justify-content: space-between;align-items: center;padding: 10px 15px;\"
  962. type=\"button\"
  963. data-toggle=\"modal\"
  964. data-target=\"#chat-bot-modal\"
  965. id=\"chat-bot-modal-label\"
  966. >
  967. <span>Posez votre question</span>
  968. <i class=\"ml-2 fas fa-paper-plane\"></i>
  969. </button>
  970. {% endif %}
  971. </div>
  972. {% else %}
  973. <div class=\"col-1\">
  974. <span class=\"user-account\" style=\"border: 1px solid #dee2e6;\">
  975. <i class=\"fas fa-user\"></i>
  976. </span>
  977. </div>
  978. <div class=\"col-9\">
  979. {{- \x27front.scholar.lesson.show.message.modal.please_connect.label\x27|trans -}}
  980. </div>
  981. <div class=\"col-2\">
  982. <a href=\"{{ path(\x27nellapp_sdk_connect_nellapp\x27) }}\" class=\"btn-nellapp-v2\">
  983. {{- \x27front.scholar.lesson.show.message.modal.login.label\x27|trans -}}
  984. </a>
  985. </div>
  986. {% endif %}
  987. </div>
  988. {% endif %}
  989. </div>
  990. {% endif %}
  991. </div>
  992. <div class=\"col-3 d-none d-md-block\">
  993. {% include \x27Front/Scholar/Partial/menu_lessons.html.twig\x27 with {
  994. \x27current_chapter\x27: chapter
  995. } %}
  996. </div>
  997. </div>
  998. </div>
  999. {{ parent() }}
  1000. {% endblock content %}
  1001. {% block body %}
  1002. {{ parent() }}
  1003. {% if app.user %}
  1004. <!-- Modal -->
  1005. <div class=\"modal fade\" id=\"modalMessage\" tabindex=\"-1\" role=\"dialog\" aria-hidden=\"true\"
  1006. style=\"font-family: \x27Poppins\x27\">
  1007. <div class=\"modal-dialog modal-dialog-centered forum-message-modal\" role=\"document\">
  1008. <div class=\"modal-content border-8\">
  1009. <div class=\"modal-header\">
  1010. <h5 class=\"modal-title title-main-modal-message question-title\"
  1011. style=\"font-size: 0.875rem;font-weight: bold;\">
  1012. {{ \x27front.scholar.lesson.show.message.modal.title.label\x27|trans }}
  1013. </h5>
  1014. <h5 class=\"modal-title title-main-modal-message response-title\"
  1015. style=\"display:none; font-size: 0.875rem; font-weight: bold\">
  1016. {{ \x27front.scholar.lesson.show.message.modal.title_response.label\x27|trans }}
  1017. <span class=\"span-response-title\"></span>
  1018. </h5>
  1019. <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">
  1020. <span aria-hidden=\"true\">&times;</span>
  1021. </button>
  1022. </div>
  1023. <div class=\"modal-body\" style=\"padding: 20px 24px 0px 24px;\">
  1024. <div id=\"modal-response-message\"></div>
  1025. {{ form_start(formAnswer) }}
  1026. {{ form_row(formAnswer.content) }}
  1027. </div>
  1028. <div class=\"modal-footer\" style=\"padding:8px 24px 16px 24px;\">
  1029. <button type=\"button\" class=\"btn-close-modale\"
  1030. data-dismiss=\"modal\">{{ \x27front.scholar.lesson.show.message.modal.close.label\x27|trans }}</button>
  1031. <button type=\"submit\"
  1032. class=\"btn-valid-modale\">{{ button_label|default(\x27message.entity.save.label\x27|trans) }}</button>
  1033. </div>
  1034. {{ form_end(formAnswer) }}
  1035. </div>
  1036. </div>
  1037. </div>
  1038. {% if enableChatBot is same as true %}
  1039. {% include \x27Front/Scholar/Chapter/_chat_bot_modal.html.twig\x27 %}
  1040. {% endif %}
  1041. {% endif %}
  1042. {% endblock %}
  1043. {% block javascripts %}
  1044. {% if app.user and currentRoute == \x27front_channel_chapter_show\x27 %}
  1045. <script>
  1046. var attendanceUrl = \x27{{ url(\x27async_channel_scholar_attendance_chapter\x27, {
  1047. \x27channelId\x27: channel.id
  1048. }) }}\x27;
  1049. </script>
  1050. {% endif %}
  1051. {{ parent() }}
  1052. {% endblock %}
  1053. ", "Front/Scholar/Chapter/show.html.twig", "/var/www/html/templates/Front/Scholar/Chapter/show.html.twig");
  1054. }
  1055. }
  1056. /* Front/Scholar/Chapter/show.html.twig */
  1057. class __TwigTemplate_22ba3bb7e01bf6b29855cc4fc9789845___6729837851 extends Template
  1058. {
  1059. private Source $source;
  1060. /**
  1061. * @var array<string, MacroNamespace>
  1062. */
  1063. private array $macros = [];
  1064. public function __construct(Environment $env)
  1065. {
  1066. parent::__construct($env);
  1067. $this->source = $this->getSourceContext();
  1068. $this->blocks = [
  1069. 'outer__block_fallback' => [$this, 'block_outer__block_fallback'],
  1070. ];
  1071. }
  1072. protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
  1073. {
  1074. // line 49
  1075. 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);
  1076. }
  1077. protected function doDisplay(array $context, array $blocks = []): iterable
  1078. {
  1079. $macros = $this->macros;
  1080. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  1081. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Front/Scholar/Chapter/show.html.twig"));
  1082. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  1083. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Front/Scholar/Chapter/show.html.twig"));
  1084. yield from $this->getParent($context)->unwrap()->yield($context, array_merge($this->blocks, $blocks));
  1085. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  1086. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  1087. }
  1088. /**
  1089. * @return iterable<null|scalar|\Stringable>
  1090. */
  1091. public function block_outer__block_fallback(array $context, array $blocks = []): iterable
  1092. {
  1093. $macros = $this->macros;
  1094. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  1095. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "outer__block_fallback"));
  1096. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  1097. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "outer__block_fallback"));
  1098. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  1099. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  1100. return; yield;
  1101. }
  1102. /**
  1103. * @codeCoverageIgnore
  1104. */
  1105. public function getTemplateName(): string
  1106. {
  1107. return "Front/Scholar/Chapter/show.html.twig";
  1108. }
  1109. /**
  1110. * @codeCoverageIgnore
  1111. */
  1112. public function isTraitable(): bool
  1113. {
  1114. return false;
  1115. }
  1116. /**
  1117. * @codeCoverageIgnore
  1118. */
  1119. public function getDefaultEscapeStrategy(): string|false
  1120. {
  1121. return "html";
  1122. }
  1123. /**
  1124. * @codeCoverageIgnore
  1125. */
  1126. public function getDebugInfo(): array
  1127. {
  1128. 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,);
  1129. }
  1130. public function getSourceContext(): Source
  1131. {
  1132. return new Source("{% extends \x27base.html.twig\x27 %}
  1133. {% block back_to_dashboard %}
  1134. {% include \x27Front/Scholar/Partial/_back_to_dashboard.html.twig\x27 %}
  1135. {% endblock back_to_dashboard %}
  1136. {% if canSeeMessages is not defined %}
  1137. {% set canSeeMessages = true %}
  1138. {% endif %}
  1139. {% block title %}{{ chapter.lesson.name }} - {{ parent() }}{% endblock %}
  1140. {% set currentRoute = app.request.attributes.get(\x27_route\x27) %}
  1141. {% set enableChatBot = chapter is chat_bot_enabled and currentRoute == \x27front_channel_chapter_show\x27 %}
  1142. {% block stylesheets %}
  1143. {{ parent() }}
  1144. {{ encore_entry_link_tags(\x27styles\x27, \x27core\x27, \x27core\x27) }}
  1145. {% endblock %}
  1146. {% block before_navbar %}
  1147. {% include \x27Front/Scholar/Partial/_preview_manager_heager.html.twig\x27 with {
  1148. \x27channel\x27: channel,
  1149. \x27currentRoute\x27: currentRoute,
  1150. } %}
  1151. {% endblock before_navbar %}
  1152. {% block body_markup %}
  1153. <body class=\"progression chapter-view {% if is_granted(\x27IS_AUTHENTICATED_REMEMBERED\x27) %}logged-in{% endif %}\"
  1154. style=\"font-family: \x27Poppins\x27;\"
  1155. id=\"page-training-lesson\"
  1156. {% if currentRoute == \x27front_channel_chapter_show\x27 %}
  1157. data-training_id={{ training.id }}
  1158. data-module_id={{ module.id }}
  1159. data-lesson_id={{ lesson.id }}
  1160. data-chapter_id=\"{{ chapter.id }}\"
  1161. {% endif %}
  1162. >
  1163. {% endblock body_markup %}
  1164. {% block content %}
  1165. {% if currentRoute in [\x27front_channel_chapter_show\x27, \x27manager_channel_module_chapter_show\x27, \x27manager_channel_training_module_chapter_show\x27] %}
  1166. {% set trainingModuleLessons = module | get_lessons %}
  1167. {% elseif currentRoute in [\x27manager_channel_chapter_show_message\x27, \x27manager_channel_chapter_show\x27] %}
  1168. {% set trainingModuleLessons = [lesson] %}
  1169. {% endif %}
  1170. {% if app.user %}
  1171. {% component \x27ChannelUserData:CursusLockout\x27 with { cursus: cursus ?? null } %}{% endcomponent %}
  1172. {% endif %}
  1173. {% include \x27Front/Scholar/Partial/_menu_lessons_mobile.html.twig\x27 with {
  1174. \x27current_chapter\x27: chapter
  1175. } %}
  1176. <div class=\"container pt-md-5 pb-md-5 pt-3 pb-3 summary-lesson font-size-14\">
  1177. <div class=\"row\">
  1178. <div class=\"col-md-9 col-12\">
  1179. <div>
  1180. {% for key, messageType in app.flashes() %}
  1181. <div>
  1182. {% for message in messageType %}
  1183. <div class=\"alert alert-{{ key|replace({\x27error\x27: \x27danger\x27}) }}\">
  1184. {{ message | trans }}
  1185. </div>
  1186. {% endfor %}
  1187. </div>
  1188. {% endfor %}
  1189. </div>
  1190. <h2 class=\"font-weight-bold font-size-16px\">{{- \x27front.scholar.lesson.show.title.label\x27|trans({\x27%name%\x27: chapter.lesson.name}) -}}</h2>
  1191. <h1 class=\"v2-title-big\">{{- chapter.name -}}</h1>
  1192. {% include \x27Front/Scholar/Partial/_content_alert.html.twig\x27 %}
  1193. <div class=\"col-12 col-lg-6 d-flex justify-content-between p-0\"> {# align-items-baseline #}
  1194. <div class=\"d-flex align-items-center\"> {# align-items-baseline #}
  1195. <img class=\"star-space chapter-comment-logo\"
  1196. src=\"{{- asset(\x27build/common/icon-chat.svg\x27, \x27common\x27) -}}\" alt=\"Count comments\"/>
  1197. <div class=\"marks d-flex justify-content-center align-items-center\">{{ chapter | getMessageCount }}</div>
  1198. </div>
  1199. <div class=\"d-flex justify-content-center align-items-center\">
  1200. {%- if lesson.updatedAt is not null -%}
  1201. {{- \x27front.scholar.training.show.createdAt.label\x27|trans({
  1202. \x27%date%\x27: lesson.updatedAt|format_date(\x27long\x27, locale=app.request.locale),
  1203. })|raw -}}
  1204. {%- else -%}
  1205. {{- \x27front.scholar.training.show.createdAt.label\x27|trans({
  1206. \x27%date%\x27: lesson.createdAt|format_date(\x27long\x27, locale=app.request.locale),
  1207. })|raw -}}
  1208. {%- endif -%}
  1209. </div>
  1210. </div>
  1211. {% if chapter.description is not null %}
  1212. <div class=\"description-lesson mt-4\">
  1213. <p class=\"text-subcateg description-style\">{{- chapter.description -}}</p>
  1214. </div>
  1215. {% endif %}
  1216. <div class=\"mt-4 lesson-content\">{{- chapter.body|raw -}}</div>
  1217. {% if currentRoute == \x27front_channel_chapter_show\x27 %}
  1218. {% include \x27Front/Scholar/Partial/_scholar_navigation_previous_after.html.twig\x27 with {
  1219. next_informations: get_next_informations_chapter(training, module, lesson, chapter),
  1220. previous_informations: get_previous_informations_chapter(training, module, lesson, chapter),
  1221. } %}
  1222. {% endif %}
  1223. {% if canSeeMessages is same as true %}
  1224. <div class=\"mt-5 chapter-questions-separator\"></div>
  1225. <div class=\"mt-5\" id=\"forum-messages\">
  1226. <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>
  1227. {% if messages|length == 0 %}
  1228. <div>{{- \x27front.scholar.lesson.show.message.no_message.label\x27|trans -}}</div>
  1229. {% endif %}
  1230. {% for message in messages %}
  1231. {% if loop.index0 != 0 %}
  1232. <div class=\"mt-3 mb-3 ml-5 mr-5 chapter-questions-separator\"></div>
  1233. {% endif %}
  1234. {% set messageToAnswer = null %}
  1235. {% set children = message|getMessageChildren %}
  1236. {% if children|length is same as 0 %}
  1237. {% set messageToAnswer = message %}
  1238. {% endif %}
  1239. {% include \x27Front/Scholar/Chapter/show_forum_message.html.twig\x27 with {
  1240. \x27message\x27: message,
  1241. \x27canDelete\x27: is_granted_comment or app.user is not null and app.user is owner_of(message),
  1242. \x27messageToAnswer\x27: messageToAnswer
  1243. } %}
  1244. {% set messageToAnswer = null %}
  1245. {% for child in children %}
  1246. {% if loop.last is same as true %}
  1247. {% set messageToAnswer = message %}
  1248. {% endif %}
  1249. {% include \x27Front/Scholar/Chapter/show_forum_message.html.twig\x27 with {
  1250. \x27message\x27: child,
  1251. \x27canDelete\x27: is_granted_comment or app.user is not null and app.user is owner_of(child),
  1252. \x27messageToAnswer\x27: messageToAnswer
  1253. } %}
  1254. {% endfor %}
  1255. {% endfor %}
  1256. {% if form is defined %}
  1257. <div id=\"form-message-anchor\" class=\"row{% if not app.user %} justify-content-center align-items-center{% endif %} mt-5\">
  1258. {% if app.user %}
  1259. <div class=\"col-1 d-none d-md-block\">
  1260. {% if app.user.avatarPath is null %}
  1261. <span class=\"user-account\">
  1262. <i class=\"fas fa-user\"></i>
  1263. </span>
  1264. {% else %}
  1265. <img class=\"user-account\" src=\"{{ get_user_avatar_thumbnail(app.user) }}\"
  1266. alt=\"User avatar\">
  1267. {% endif %}
  1268. </div>
  1269. <div class=\"col-md-11 col-12 pr-0 pl-0\">
  1270. {% if enableChatBot is same as false %}
  1271. {{ form_start(form, {\x27attr\x27: {\x27class\x27: \x27m-0 d-flex flex-column flex-md-row\x27}}) }}
  1272. <div class=\"col-md-10 col-12\">
  1273. <div>{{ form_row(form.content) }}</div>
  1274. <div>{{ form_errors(form) }}</div>
  1275. </div>
  1276. <div class=\"col-md-2 col-12 mt-send-mobile\">
  1277. <button
  1278. class=\"btn-nellapp-v2\"
  1279. style=\"display: flex;justify-content: space-between;align-items: center;padding: 10px 15px;\"
  1280. type=\"submit\"
  1281. >
  1282. <span>{{ \"Envoyer\" }}</span>
  1283. <i class=\"ml-2 fas fa-paper-plane\"></i>
  1284. </button>
  1285. </div>
  1286. {{ form_end(form) }}
  1287. {% else %}
  1288. <button
  1289. class=\"btn-nellapp-v2\"
  1290. style=\"display: flex;justify-content: space-between;align-items: center;padding: 10px 15px;\"
  1291. type=\"button\"
  1292. data-toggle=\"modal\"
  1293. data-target=\"#chat-bot-modal\"
  1294. id=\"chat-bot-modal-label\"
  1295. >
  1296. <span>Posez votre question</span>
  1297. <i class=\"ml-2 fas fa-paper-plane\"></i>
  1298. </button>
  1299. {% endif %}
  1300. </div>
  1301. {% else %}
  1302. <div class=\"col-1\">
  1303. <span class=\"user-account\" style=\"border: 1px solid #dee2e6;\">
  1304. <i class=\"fas fa-user\"></i>
  1305. </span>
  1306. </div>
  1307. <div class=\"col-9\">
  1308. {{- \x27front.scholar.lesson.show.message.modal.please_connect.label\x27|trans -}}
  1309. </div>
  1310. <div class=\"col-2\">
  1311. <a href=\"{{ path(\x27nellapp_sdk_connect_nellapp\x27) }}\" class=\"btn-nellapp-v2\">
  1312. {{- \x27front.scholar.lesson.show.message.modal.login.label\x27|trans -}}
  1313. </a>
  1314. </div>
  1315. {% endif %}
  1316. </div>
  1317. {% endif %}
  1318. </div>
  1319. {% endif %}
  1320. </div>
  1321. <div class=\"col-3 d-none d-md-block\">
  1322. {% include \x27Front/Scholar/Partial/menu_lessons.html.twig\x27 with {
  1323. \x27current_chapter\x27: chapter
  1324. } %}
  1325. </div>
  1326. </div>
  1327. </div>
  1328. {{ parent() }}
  1329. {% endblock content %}
  1330. {% block body %}
  1331. {{ parent() }}
  1332. {% if app.user %}
  1333. <!-- Modal -->
  1334. <div class=\"modal fade\" id=\"modalMessage\" tabindex=\"-1\" role=\"dialog\" aria-hidden=\"true\"
  1335. style=\"font-family: \x27Poppins\x27\">
  1336. <div class=\"modal-dialog modal-dialog-centered forum-message-modal\" role=\"document\">
  1337. <div class=\"modal-content border-8\">
  1338. <div class=\"modal-header\">
  1339. <h5 class=\"modal-title title-main-modal-message question-title\"
  1340. style=\"font-size: 0.875rem;font-weight: bold;\">
  1341. {{ \x27front.scholar.lesson.show.message.modal.title.label\x27|trans }}
  1342. </h5>
  1343. <h5 class=\"modal-title title-main-modal-message response-title\"
  1344. style=\"display:none; font-size: 0.875rem; font-weight: bold\">
  1345. {{ \x27front.scholar.lesson.show.message.modal.title_response.label\x27|trans }}
  1346. <span class=\"span-response-title\"></span>
  1347. </h5>
  1348. <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">
  1349. <span aria-hidden=\"true\">&times;</span>
  1350. </button>
  1351. </div>
  1352. <div class=\"modal-body\" style=\"padding: 20px 24px 0px 24px;\">
  1353. <div id=\"modal-response-message\"></div>
  1354. {{ form_start(formAnswer) }}
  1355. {{ form_row(formAnswer.content) }}
  1356. </div>
  1357. <div class=\"modal-footer\" style=\"padding:8px 24px 16px 24px;\">
  1358. <button type=\"button\" class=\"btn-close-modale\"
  1359. data-dismiss=\"modal\">{{ \x27front.scholar.lesson.show.message.modal.close.label\x27|trans }}</button>
  1360. <button type=\"submit\"
  1361. class=\"btn-valid-modale\">{{ button_label|default(\x27message.entity.save.label\x27|trans) }}</button>
  1362. </div>
  1363. {{ form_end(formAnswer) }}
  1364. </div>
  1365. </div>
  1366. </div>
  1367. {% if enableChatBot is same as true %}
  1368. {% include \x27Front/Scholar/Chapter/_chat_bot_modal.html.twig\x27 %}
  1369. {% endif %}
  1370. {% endif %}
  1371. {% endblock %}
  1372. {% block javascripts %}
  1373. {% if app.user and currentRoute == \x27front_channel_chapter_show\x27 %}
  1374. <script>
  1375. var attendanceUrl = \x27{{ url(\x27async_channel_scholar_attendance_chapter\x27, {
  1376. \x27channelId\x27: channel.id
  1377. }) }}\x27;
  1378. </script>
  1379. {% endif %}
  1380. {{ parent() }}
  1381. {% endblock %}
  1382. ", "Front/Scholar/Chapter/show.html.twig", "/var/www/html/templates/Front/Scholar/Chapter/show.html.twig");
  1383. }
  1384. }