From 6c2852ff08764b74f5a5fe21398ffb52e1dbbf37 Mon Sep 17 00:00:00 2001 From: Laurent David Date: Tue, 6 May 2025 17:33:30 +0200 Subject: [PATCH 1/2] MDL-85253 mod_data: Replace hardcoded separator for page titles --- mod/data/edit.php | 2 +- mod/data/rsslib.php | 9 ++++++--- mod/data/view.php | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/mod/data/edit.php b/mod/data/edit.php index 454c1121498..2208bf4c75c 100644 --- a/mod/data/edit.php +++ b/mod/data/edit.php @@ -99,7 +99,7 @@ if (!has_capability('mod/data:manageentries', $context)) { // RSS and CSS and JS meta. if (!empty($CFG->enablerssfeeds) && !empty($CFG->data_enablerssfeeds) && $data->rssarticles > 0) { $courseshortname = format_string($course->shortname, true, array('context' => context_course::instance($course->id))); - $rsstitle = $courseshortname . ': ' . format_string($data->name); + $rsstitle = $courseshortname . \moodle_page::TITLE_SEPARATOR . format_string($data->name); rss_add_http_header($context, 'mod_data', $data, $rsstitle); } if ($data->csstemplate) { diff --git a/mod/data/rsslib.php b/mod/data/rsslib.php index 0d3f50e6145..143f7850ca7 100644 --- a/mod/data/rsslib.php +++ b/mod/data/rsslib.php @@ -119,9 +119,12 @@ defined('MOODLE_INTERNAL') || die(); $courseshortname = format_string($course->shortname, true, array('context' => $coursecontext)); // First all rss feeds common headers. - $header = rss_standard_header($courseshortname . ': ' . format_string($data->name, true, array('context' => $context)), - $CFG->wwwroot."/mod/data/view.php?d=".$data->id, - format_text($data->intro, $data->introformat, array('context' => $context))); + $header = rss_standard_header($courseshortname + . \moodle_page::TITLE_SEPARATOR + . format_string($data->name, true, ['context' => $context]), + $CFG->wwwroot . "/mod/data/view.php?d=" . $data->id, + format_text($data->intro, $data->introformat, ['context' => $context]) + ); if (!empty($header)) { $articles = rss_add_items($items); diff --git a/mod/data/view.php b/mod/data/view.php index b5624b888d9..08b836fa91e 100644 --- a/mod/data/view.php +++ b/mod/data/view.php @@ -194,7 +194,7 @@ $courseshortname = format_string($course->shortname, true, array('context' => co /// RSS and CSS and JS meta $meta = ''; if (!empty($CFG->enablerssfeeds) && !empty($CFG->data_enablerssfeeds) && $data->rssarticles > 0) { - $rsstitle = $courseshortname . ': ' . format_string($data->name); + $rsstitle = $courseshortname . \moodle_page::TITLE_SEPARATOR . format_string($data->name); rss_add_http_header($context, 'mod_data', $data, $rsstitle); } if ($data->csstemplate) { From 05cd7ca9362cb3e2c64e5f8246c4419bf49f7422 Mon Sep 17 00:00:00 2001 From: Laurent David Date: Wed, 7 May 2025 07:40:44 +0200 Subject: [PATCH 2/2] MDL-85253 core_course: Fix edit module page title * Following up MDL-80418, we should have New Database | Course name as a title for the module edit page --- course/modedit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/course/modedit.php b/course/modedit.php index 087a1379a37..f81fa565d3f 100644 --- a/course/modedit.php +++ b/course/modedit.php @@ -127,7 +127,7 @@ if (!empty($add)) { $sectionname = get_section_name($course, $cw); $fullmodulename = get_string('modulename', $module->name); $pageheading = get_string('editsettings', 'moodle'); - $pagetitle = get_string('edita', 'moodle', $fullmodulename) . ': ' . $cm->name; + $pagetitle = get_string('edita', 'moodle', $fullmodulename) . moodle_page::TITLE_SEPARATOR . $cm->name; $navbaraddition = null; } else {