From 328588c1b8ded53dfae0d12270aaefbf703ddd8e Mon Sep 17 00:00:00 2001
From: Kathrin Osswald <kathrin.osswald@uni-ulm.de>
Date: Thu, 28 Nov 2019 14:06:20 +0100
Subject: [PATCH] Moved the variable output.standard_end_of_body_html from
 footer.mustache to solve Javascript issues with behat tests.

---
 CHANGES.md                  | 4 ++++
 templates/columns2.mustache | 3 +++
 templates/footer.mustache   | 7 ++++++-
 3 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/CHANGES.md b/CHANGES.md
index f25359e..9ded5a8 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -4,6 +4,10 @@ moodle-theme_boost_campus
 Changes
 -------
 
+### Unreleased
+
+* 2019-11-29 - Moved the variable output.standard_end_of_body_html from footer.mustache to solve Javascript issues with behat tests.
+
 ### Release v3.7-r3
 
 * 2019-11-13 - Improved Video JS Skin for hiding big play button in audio players and removed centered placement of this button in SCSS.
diff --git a/templates/columns2.mustache b/templates/columns2.mustache
index 8107592..fff505a 100644
--- a/templates/columns2.mustache
+++ b/templates/columns2.mustache
@@ -57,6 +57,7 @@
       template and use the equivalent own javascript "incoursesettings".
     * Call to own navbar mustache template instead of boost/navbar.
     * Add own additional layout elements: the footer, footnote or image area.
+    * Moved the variable output.standard_end_of_body_html from footer.mustache to solve Javascript issues with behat tests.
 }}
 {{> theme_boost/head }}
 
@@ -107,6 +108,8 @@
     {{> theme_boost/nav-drawer }}
     {{{ pagebottomelements }}}
 </div>
+{{! Moved the variable here from footer.mustache to solve Javascript issues with behat tests. }}
+{{{ output.standard_end_of_body_html }}}
 
 </body>
 </html>
diff --git a/templates/footer.mustache b/templates/footer.mustache
index 4e09671..ba4a231 100644
--- a/templates/footer.mustache
+++ b/templates/footer.mustache
@@ -33,6 +33,9 @@
         "footerrightblocks": "<aside id='block-region-footer-right' class='block-region' data-blockregion='footer-right' data-droptarget='1'>This is the right footer region</aside>"
     }
 }}
+{{! MODIFICATION:
+    * Moved the variable output.standard_end_of_body_html to the end of the columns2.mustache template to solve Javascript issues with behat tests.
+}}
 <footer id="page-footer" class="py-3 bg-dark text-light">
     <div class="container-fluid">
         <div class="row-fluid">
@@ -103,7 +106,9 @@
                     {{/ output.custom_menu_flat }}
                 </nav>
                 {{{ output.standard_footer_html }}}
-                {{{ output.standard_end_of_body_html }}}
+                {{! Moved the variable
+                output.standard_end_of_body_html
+                to the end of the columns2.mustache template to solve Javascript issues with behat tests. }}
             </div>
         </div>
     </div>
-- 
GitLab