From 38d0498c0ff65822a21ef4a415706a5b341d84b9 Mon Sep 17 00:00:00 2001 From: Bas Brands Date: Tue, 11 Jan 2022 11:36:45 +0100 Subject: [PATCH] MDL-73416 core_badges: limit page width on most badge pages --- badges/edit.php | 1 + badges/index.php | 1 + badges/newbadge.php | 1 + badges/view.php | 2 ++ 4 files changed, 5 insertions(+) diff --git a/badges/edit.php b/badges/edit.php index 2a12b09a030..1bbc9e8a76f 100644 --- a/badges/edit.php +++ b/badges/edit.php @@ -69,6 +69,7 @@ $PAGE->set_context($context); $PAGE->set_url($currenturl); $PAGE->set_heading($heading); $PAGE->set_title($badge->name); +$PAGE->add_body_class('limitedwidth'); $PAGE->navbar->add($badge->name); $output = $PAGE->get_renderer('core', 'badges'); diff --git a/badges/index.php b/badges/index.php index a389ea53baa..3a1baaf8734 100644 --- a/badges/index.php +++ b/badges/index.php @@ -73,6 +73,7 @@ if ($course = $DB->get_record('course', array('id' => $courseid))) { $hdr = get_string('managebadges', 'badges'); $returnurl = new moodle_url('/badges/index.php', $urlparams); $PAGE->set_url($returnurl); +$PAGE->add_body_class('limitedwidth'); if ($type == BADGE_TYPE_SITE) { $title = get_string('sitebadges', 'badges'); diff --git a/badges/newbadge.php b/badges/newbadge.php index 16f1fadbdca..b49aff5d113 100644 --- a/badges/newbadge.php +++ b/badges/newbadge.php @@ -41,6 +41,7 @@ if (empty($CFG->badges_allowcoursebadges) && ($type == BADGE_TYPE_COURSE)) { } $title = get_string('create', 'badges'); +$PAGE->add_body_class('limitedwidth'); if (($type == BADGE_TYPE_COURSE) && ($course = $DB->get_record('course', array('id' => $courseid)))) { require_login($course); diff --git a/badges/view.php b/badges/view.php index 2c42e3dc8ac..f6aaa064060 100644 --- a/badges/view.php +++ b/badges/view.php @@ -61,6 +61,8 @@ if ($course = $DB->get_record('course', array('id' => $courseid))) { $PAGE->set_url('/badges/view.php', array('type' => $type, 'sort' => $sortby, 'dir' => $sorthow)); } +$PAGE->add_body_class('limitedwidth'); + if ($type == BADGE_TYPE_SITE) { $PAGE->set_context(context_system::instance()); $PAGE->set_pagelayout('admin');