From 3a47ece97ee54c060fe6efff3269cf798ab35af2 Mon Sep 17 00:00:00 2001 From: Nicolas Martignoni Date: Tue, 2 Aug 2022 20:06:05 +0200 Subject: [PATCH] Fix for footer buttons - This will fix #103. - We use `_before_footer()` instead of `_standard_footer_html`. - Reference: https://tracker.moodle.org/browse/MDL-68564. - See also: https://github.com/davosmith/moodle-navbuttons/commit/f257bdc700eb5194e4096dd57daf1ab79c847ea1 --- lib.php | 4 ++-- styles.css | 4 ++++ version.php | 6 +++--- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lib.php b/lib.php index d429d29..01328b9 100644 --- a/lib.php +++ b/lib.php @@ -35,7 +35,7 @@ * * @return string HTML footer content */ -function tool_moodlebox_standard_footer_html() { +function tool_moodlebox_before_footer() { global $CFG; @@ -72,7 +72,7 @@ function tool_moodlebox_standard_footer_html() { } } - $output = $restartshutdownform->render(); + $output = html_writer::div($restartshutdownform->render(), "", array('id' => 'footerbuttons')); return $output; } diff --git a/styles.css b/styles.css index f9601e6..db4d012 100644 --- a/styles.css +++ b/styles.css @@ -66,3 +66,7 @@ input#id_shutdownbutton { border-color: rgba(189, 54, 47, 0.1) rgba(189, 54, 47, 0.1) rgba(128, 36, 32, 0.25); filter: progid:dximagetransform.microsoft.gradient(enabled = false); } + +#footerbuttons { + margin-top: 2rem; +} diff --git a/version.php b/version.php index b8afef8..138608a 100644 --- a/version.php +++ b/version.php @@ -26,9 +26,9 @@ $plugin = new stdClass(); -$plugin->version = 2022042300; -$plugin->release = '2.12.0'; +$plugin->version = 2022080200; +$plugin->release = '2.13.0-beta'; $plugin->requires = 2018120300; $plugin->supported = [36, 400]; -$plugin->maturity = MATURITY_STABLE; +$plugin->maturity = MATURITY_BETA; $plugin->component = 'tool_moodlebox';