From 946fd915e27b751b39152e49de52c7fe010d77c7 Mon Sep 17 00:00:00 2001 From: Bas Brands Date: Mon, 4 Oct 2021 16:57:04 +0200 Subject: [PATCH] MDL-72095 theme_boost: max width for activity pages --- admin/settings.php | 1 + ...k_myoverview_pagelimit_persistence.feature | 4 +- .../behat/block_myoverview_pagination.feature | 2 +- contentbank/index.php | 1 + course/edit.php | 1 + course/index.php | 1 + course/modedit.php | 2 + course/view.php | 1 + .../form/guide/tests/behat/edit_guide.feature | 2 +- index.php | 1 + lib/templates/full_header.mustache | 55 +++++------ mod/assign/locallib.php | 5 + mod/assign/tests/behat/quickgrading.feature | 2 +- mod/assign/tests/behat/rescale_grades.feature | 2 +- mod/book/edit.php | 1 + mod/book/view.php | 1 + mod/chat/view.php | 1 + mod/choice/view.php | 2 + mod/feedback/analysis.php | 2 +- mod/feedback/complete.php | 1 + mod/feedback/edit.php | 1 + mod/feedback/index.php | 2 +- mod/feedback/show_entries.php | 2 +- mod/feedback/view.php | 2 +- mod/folder/edit.php | 1 + mod/folder/view.php | 1 + mod/forum/export.php | 1 + mod/lesson/edit.php | 1 + mod/lesson/editpage.php | 1 + mod/lesson/import.php | 1 + mod/lesson/overridedelete.php | 1 + mod/lesson/overrideedit.php | 1 + mod/lesson/overrides.php | 1 + mod/lesson/view.php | 1 + mod/page/view.php | 1 + mod/quiz/attempt.php | 1 + mod/quiz/edit.php | 1 + mod/quiz/editrandom.php | 1 + mod/quiz/view.php | 1 + mod/resource/view.php | 1 - mod/survey/view.php | 3 +- mod/wiki/files.php | 1 + mod/wiki/filesedit.php | 1 + mod/wiki/pagelib.php | 1 + mod/wiki/view.php | 1 + my/index.php | 1 + theme/boost/config.php | 20 ++-- theme/boost/scss/moodle/blocks.scss | 70 ------------- theme/boost/scss/moodle/core.scss | 3 + theme/boost/scss/moodle/dashboard.scss | 2 +- theme/boost/scss/moodle/forms.scss | 3 + theme/boost/scss/moodle/layout.scss | 31 +++++- .../scss/moodle/secondarynavigation.scss | 2 + theme/boost/scss/moodle/user.scss | 1 + theme/boost/style/moodle.css | 84 +++++++--------- theme/boost/templates/drawers.mustache | 2 +- theme/boost/templates/footer.mustache | 2 +- theme/classic/scss/classic/post.scss | 20 +++- theme/classic/style/moodle.css | 99 +++++++++---------- user/edit.php | 2 +- user/editadvanced.php | 2 +- user/editlib.php | 1 + user/editor.php | 2 +- user/files.php | 1 + user/forum.php | 2 +- user/preferences.php | 1 + user/profile.php | 2 + user/view.php | 1 + 68 files changed, 229 insertions(+), 243 deletions(-) diff --git a/admin/settings.php b/admin/settings.php index a3d48fc48c9..06f289bdc0e 100644 --- a/admin/settings.php +++ b/admin/settings.php @@ -13,6 +13,7 @@ $PAGE->set_context(context_system::instance()); $PAGE->set_url('/admin/settings.php', array('section' => $section)); $PAGE->set_pagetype('admin-setting-' . $section); $PAGE->set_pagelayout('admin'); +$PAGE->has_secondary_navigation_setter(false); $PAGE->navigation->clear_cache(); navigation_node::require_admin_tree(); diff --git a/blocks/myoverview/tests/behat/block_myoverview_pagelimit_persistence.feature b/blocks/myoverview/tests/behat/block_myoverview_pagelimit_persistence.feature index 8766c50eef5..8df501404a8 100644 --- a/blocks/myoverview/tests/behat/block_myoverview_pagelimit_persistence.feature +++ b/blocks/myoverview/tests/behat/block_myoverview_pagelimit_persistence.feature @@ -43,7 +43,7 @@ Feature: The my overview block allows users to persistence of their page limits Then I should see "Course 13" And I reload the page Then I should see "Course 13" - And I should see "All" in the "[data-action='limit-toggle']" "css_element" + And I should see "All" in the ".block-myoverview [data-action='limit-toggle']" "css_element" Scenario: Toggle the page limit between grouping changes Given I am on the "My courses" page logged in as "student1" @@ -52,4 +52,4 @@ Feature: The my overview block allows users to persistence of their page limits And I click on "All" "button" in the "Course overview" "block" And I click on "In progress" "link" in the "Course overview" "block" Then I should see "Course 13" - And I should see "All" in the "[data-action='limit-toggle']" "css_element" + And I should see "All" in the ".block-myoverview [data-action='limit-toggle']" "css_element" diff --git a/blocks/myoverview/tests/behat/block_myoverview_pagination.feature b/blocks/myoverview/tests/behat/block_myoverview_pagination.feature index 05f5ea63fe4..d939fbe021a 100644 --- a/blocks/myoverview/tests/behat/block_myoverview_pagination.feature +++ b/blocks/myoverview/tests/behat/block_myoverview_pagination.feature @@ -81,7 +81,7 @@ Feature: My overview block pagination | student1 | C12 | student | | student1 | C13 | student | When I am on the "My courses" page logged in as "student1" - Then I should see "12" in the "[data-action='limit-toggle']" "css_element" + Then I should see "12" in the ".block_myoverview [data-action='limit-toggle']" "css_element" And I log out Scenario: I should only see pagination limit options less than total number of enrolled courses diff --git a/contentbank/index.php b/contentbank/index.php index 121117a3a22..5fb9654a5e0 100644 --- a/contentbank/index.php +++ b/contentbank/index.php @@ -49,6 +49,7 @@ $PAGE->set_url('/contentbank/index.php'); $PAGE->set_context($context); $PAGE->set_title($title); $PAGE->set_heading($title); +$PAGE->add_body_class('limitedwidth'); $PAGE->set_pagetype('contentbank'); // Get all contents managed by active plugins where the user has permission to render them. diff --git a/course/edit.php b/course/edit.php index 70537bbced2..34710fc9003 100644 --- a/course/edit.php +++ b/course/edit.php @@ -234,6 +234,7 @@ if (!empty($course->id)) { } $PAGE->set_title($title); +$PAGE->add_body_class('limitedwidth'); $PAGE->set_heading($fullname); echo $OUTPUT->header(); diff --git a/course/index.php b/course/index.php index 910530f4351..b29e2097cde 100644 --- a/course/index.php +++ b/course/index.php @@ -60,6 +60,7 @@ if ($categoryid) { } $PAGE->set_pagelayout('coursecategory'); +$PAGE->add_body_class('limitedwidth'); $courserenderer = $PAGE->get_renderer('core', 'course'); $PAGE->set_heading($heading); diff --git a/course/modedit.php b/course/modedit.php index 71cc3102df1..590f7ab0032 100644 --- a/course/modedit.php +++ b/course/modedit.php @@ -138,6 +138,8 @@ if (!empty($type)) { //TODO: hopefully will be removed in 2.0 } $PAGE->set_pagetype($pagepath); $PAGE->set_pagelayout('admin'); +$PAGE->add_body_class('limitedwidth'); + $modmoodleform = "$CFG->dirroot/mod/$module->name/mod_form.php"; if (file_exists($modmoodleform)) { diff --git a/course/view.php b/course/view.php index 87be2b6aad0..063af27e7af 100644 --- a/course/view.php +++ b/course/view.php @@ -94,6 +94,7 @@ // Must set layout before gettting section info. See MDL-47555. $PAGE->set_pagelayout('course'); + $PAGE->add_body_class('limitedwidth'); if ($section and $section > 0) { diff --git a/grade/grading/form/guide/tests/behat/edit_guide.feature b/grade/grading/form/guide/tests/behat/edit_guide.feature index 1ae960f7cbb..ccfa2eba793 100644 --- a/grade/grading/form/guide/tests/behat/edit_guide.feature +++ b/grade/grading/form/guide/tests/behat/edit_guide.feature @@ -99,7 +99,7 @@ Feature: Marking guides can be created and edited And I wait "1" seconds Then the field "Guide criterion B criterion remark" matches value "Comment \"4\"" When I press "Save changes" - And I follow "Assignment: Test assignment 1 name" + And I am on the "Test assignment 1 name" "assign activity" page And I follow "View all submissions" # Checking that the user grade is correct. Then I should see "80" in the "Student 1" "table_row" diff --git a/index.php b/index.php index d8c88df1258..acd49011c3b 100644 --- a/index.php +++ b/index.php @@ -39,6 +39,7 @@ if (!empty($CFG->defaulthomepage) && ($CFG->defaulthomepage == HOMEPAGE_MY) && o } $PAGE->set_url('/', $urlparams); $PAGE->set_pagelayout('frontpage'); +$PAGE->add_body_class('limitedwidth'); $PAGE->set_other_editing_capability('moodle/course:update'); $PAGE->set_other_editing_capability('moodle/course:manageactivities'); $PAGE->set_other_editing_capability('moodle/course:activityvisibility'); diff --git a/lib/templates/full_header.mustache b/lib/templates/full_header.mustache index 00f44ae4a86..05eec0964ab 100644 --- a/lib/templates/full_header.mustache +++ b/lib/templates/full_header.mustache @@ -29,37 +29,34 @@ "welcomemessage": "welcomemessage" } }} -