From d21a5035f2bdcfdd4e71efc683ffe041289eb4e0 Mon Sep 17 00:00:00 2001 From: Laurent David Date: Wed, 7 May 2025 09:35:52 +0200 Subject: [PATCH] MDL-85250 mod_book: Replace hardcoded separator in page titles * Replace hard-coded ': ' by the usual separator constant in Book --- mod/book/index.php | 2 +- mod/book/view.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/book/index.php b/mod/book/index.php index 315269be639..90e0d46d179 100644 --- a/mod/book/index.php +++ b/mod/book/index.php @@ -42,7 +42,7 @@ $strintro = get_string('moduleintro'); $strlastmodified = get_string('lastmodified'); $PAGE->set_url('/mod/book/index.php', array('id' => $course->id)); -$PAGE->set_title($course->shortname.': '.$strbooks); +$PAGE->set_title($course->shortname . \moodle_page::TITLE_SEPARATOR . $strbooks); $PAGE->set_heading($course->fullname); $PAGE->navbar->add($strbooks); echo $OUTPUT->header(); diff --git a/mod/book/view.php b/mod/book/view.php index b91e7fc08e1..7449295e732 100644 --- a/mod/book/view.php +++ b/mod/book/view.php @@ -94,7 +94,7 @@ if ($chapterid == '0') { // Go to first chapter if no given. // Prepare header. $pagetitle = $book->name; if ($chapter = $DB->get_record('book_chapters', ['id' => $chapterid, 'bookid' => $book->id])) { - $pagetitle .= ": {$chapter->title}"; + $pagetitle .= \moodle_page::TITLE_SEPARATOR . $chapter->title; } $PAGE->set_other_editing_capability('mod/book:edit');