From 48963bb7a75338caa130bea06cf514cdf313f9c3 Mon Sep 17 00:00:00 2001 From: Paul Holden Date: Tue, 9 May 2023 11:51:38 +0100 Subject: [PATCH] MDL-78152 mod_book: set permissions required for page editing. --- mod/book/view.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mod/book/view.php b/mod/book/view.php index 872031e578b..ea891a28ecc 100644 --- a/mod/book/view.php +++ b/mod/book/view.php @@ -96,6 +96,8 @@ $pagetitle = $book->name; if ($chapter = $DB->get_record('book_chapters', ['id' => $chapterid, 'bookid' => $book->id])) { $pagetitle .= ": {$chapter->title}"; } + +$PAGE->set_other_editing_capability('mod/book:edit'); $PAGE->set_title($pagetitle); $PAGE->set_heading($course->fullname); $PAGE->add_body_class('limitedwidth');