diff --git a/contentbank/contenttype/h5p/classes/form/editor.php b/contentbank/contenttype/h5p/classes/form/editor.php index 768a1c2c833..7ac641be0ab 100644 --- a/contentbank/contenttype/h5p/classes/form/editor.php +++ b/contentbank/contenttype/h5p/classes/form/editor.php @@ -69,6 +69,8 @@ class editor extends edit_content { $this->h5peditor = new h5peditor(); + $this->set_display_vertical(); + if ($id) { // The H5P editor needs the H5P content id (h5p table). $record = $DB->get_record('contentbank_content', ['id' => $id]); diff --git a/contentbank/edit.php b/contentbank/edit.php index 6d0c58d9643..353483fa745 100644 --- a/contentbank/edit.php +++ b/contentbank/edit.php @@ -89,6 +89,7 @@ $PAGE->set_url(new \moodle_url('/contentbank/edit.php', $values)); $PAGE->set_context($context); $PAGE->navbar->add(get_string('edit')); $PAGE->set_title($title); +$PAGE->set_pagelayout('incourse'); $PAGE->set_heading($heading); diff --git a/contentbank/templates/bankcontent.mustache b/contentbank/templates/bankcontent.mustache index 5002708d414..e3c11d0ce9a 100644 --- a/contentbank/templates/bankcontent.mustache +++ b/contentbank/templates/bankcontent.mustache @@ -102,19 +102,17 @@
-
-
-
- {{>core_contentbank/bankcontent/navigation}} -
-
- {{>core_contentbank/bankcontent/search}} -
+
+
+ {{>core_contentbank/bankcontent/search}}
{{>core_contentbank/bankcontent/toolbar}}
+
+ {{>core_contentbank/bankcontent/navigation}} +
diff --git a/contentbank/templates/viewcontent.mustache b/contentbank/templates/viewcontent.mustache index 7c7d5c0203b..46ebe49536e 100644 --- a/contentbank/templates/viewcontent.mustache +++ b/contentbank/templates/viewcontent.mustache @@ -40,13 +40,9 @@ } }}
-
- {{>core_contentbank/viewcontent/toolbarview}} -
-
+ {{>core_contentbank/viewcontent/toolbarview}} +
{{{ contenthtml }}}
-
- {{>core_contentbank/viewcontent/toolbarview}} -
+ {{>core_contentbank/viewcontent/toolbarview}}
diff --git a/contentbank/templates/viewcontent/toolbarview.mustache b/contentbank/templates/viewcontent/toolbarview.mustache index 25eaaa50b41..a879a225afe 100644 --- a/contentbank/templates/viewcontent/toolbarview.mustache +++ b/contentbank/templates/viewcontent/toolbarview.mustache @@ -39,7 +39,7 @@ along with Moodle. If not, see . } }} {{#usercanedit}} -
+
{{#str}}edit{{/str}} diff --git a/contentbank/view.php b/contentbank/view.php index 25e036883b4..b2a5816047d 100644 --- a/contentbank/view.php +++ b/contentbank/view.php @@ -73,6 +73,7 @@ $PAGE->set_heading($pageheading); $title .= ": ".$record->name; $PAGE->set_title($title); $PAGE->set_pagetype('contentbank'); +$PAGE->set_pagelayout('incourse'); // Create the cog menu with all the secondary actions, such as delete, rename... $actionmenu = new action_menu(); diff --git a/h5p/classes/form/editcontent_form.php b/h5p/classes/form/editcontent_form.php index f9a1dca1993..9ced09c66a9 100644 --- a/h5p/classes/form/editcontent_form.php +++ b/h5p/classes/form/editcontent_form.php @@ -63,6 +63,8 @@ class editcontent_form extends \moodleform { $mformid = 'h5peditor'; $mform->setAttributes(array('id' => $mformid) + $mform->getAttributes()); + $this->set_display_vertical(); + $this->add_action_buttons(); $editor->add_editor_to_form($mform); diff --git a/h5p/edit.php b/h5p/edit.php index a524967736e..abf3dc99d5b 100644 --- a/h5p/edit.php +++ b/h5p/edit.php @@ -86,6 +86,7 @@ $PAGE->set_context($context); $PAGE->set_url($url); $PAGE->set_title($pagetitle); $PAGE->set_heading($pagetitle); +$PAGE->set_pagelayout('course'); $values = [ 'id' => $contentid, diff --git a/theme/boost/scss/moodle/contentbank.scss b/theme/boost/scss/moodle/contentbank.scss index 56f5b9ae798..8d6454a5a45 100644 --- a/theme/boost/scss/moodle/contentbank.scss +++ b/theme/boost/scss/moodle/contentbank.scss @@ -165,6 +165,7 @@ max-height: 190px; overflow-y: auto; } +.cb-navigation-container .singleselect, .cb-navigation-container .singleselect .custom-select { width: 100%; } diff --git a/theme/boost/scss/moodle/core.scss b/theme/boost/scss/moodle/core.scss index 9169ad5260a..736103c6610 100644 --- a/theme/boost/scss/moodle/core.scss +++ b/theme/boost/scss/moodle/core.scss @@ -2511,6 +2511,15 @@ body.h5p-embed { vertical-align: middle; } +#page.drawers { + form#h5peditor, + form#coolh5peditor, + .core_contentbank_viewcontent { + max-width: $h5p-content-maxwidth; + margin: 0 auto; + } +} + .text-decoration-none { text-decoration: none !important; /* stylelint-disable-line declaration-no-important */ } diff --git a/theme/boost/scss/moodle/variables.scss b/theme/boost/scss/moodle/variables.scss index e21ff6c829c..4becf112152 100644 --- a/theme/boost/scss/moodle/variables.scss +++ b/theme/boost/scss/moodle/variables.scss @@ -24,6 +24,7 @@ $primary-nav-padding-x: ($spacer / 2) !default; $navbar-height: 60px !default; $course-content-maxwidth: 830px; +$h5p-content-maxwidth: 960px; $box-shadow-drawer-left: -0.25rem .25rem .8rem rgba($black, .025) !default; $box-shadow-drawer-right: 0 .25rem .8rem rgba($black, .025) !default; diff --git a/theme/boost/style/moodle.css b/theme/boost/style/moodle.css index b33cb59e535..96e47f6d77c 100644 --- a/theme/boost/style/moodle.css +++ b/theme/boost/style/moodle.css @@ -11897,6 +11897,12 @@ body.h5p-embed .h5pmessages { #h5pcontenttypes td { vertical-align: middle; } +#page.drawers form#h5peditor, +#page.drawers form#coolh5peditor, +#page.drawers .core_contentbank_viewcontent { + max-width: 960px; + margin: 0 auto; } + .text-decoration-none { text-decoration: none !important; /* stylelint-disable-line declaration-no-important */ } @@ -13707,6 +13713,7 @@ table.calendartable caption { max-height: 190px; overflow-y: auto; } +.cb-navigation-container .singleselect, .cb-navigation-container .singleselect .custom-select { width: 100%; } diff --git a/theme/classic/style/moodle.css b/theme/classic/style/moodle.css index 5f782bb5af8..ac78aae32e0 100644 --- a/theme/classic/style/moodle.css +++ b/theme/classic/style/moodle.css @@ -11897,6 +11897,12 @@ body.h5p-embed .h5pmessages { #h5pcontenttypes td { vertical-align: middle; } +#page.drawers form#h5peditor, +#page.drawers form#coolh5peditor, +#page.drawers .core_contentbank_viewcontent { + max-width: 960px; + margin: 0 auto; } + .text-decoration-none { text-decoration: none !important; /* stylelint-disable-line declaration-no-important */ } @@ -13707,6 +13713,7 @@ table.calendartable caption { max-height: 190px; overflow-y: auto; } +.cb-navigation-container .singleselect, .cb-navigation-container .singleselect .custom-select { width: 100%; }