diff --git a/grade/lib.php b/grade/lib.php index b0077dff365..4a514cffc0e 100644 --- a/grade/lib.php +++ b/grade/lib.php @@ -891,6 +891,12 @@ function print_grade_page_head(int $courseid, string $active_type, ?string $acti ?string $headerhelpcomponent = null, ?stdClass $user = null, ?action_bar $actionbar = null, $unused = null) { global $CFG, $OUTPUT, $PAGE, $USER; + if ($heading !== false) { + // Make sure to trim heading, including the non-breaking space character. + $heading = str_replace(" ", " ", $heading); + $heading = trim($heading); + } + if ($unused !== null) { debugging('Deprecated argument passed to ' . __FUNCTION__, DEBUG_DEVELOPER); } diff --git a/grade/report/singleview/templates/zero_state_grade.mustache b/grade/report/singleview/templates/zero_state_grade.mustache index 8041c60b2a0..07eb9c15959 100644 --- a/grade/report/singleview/templates/zero_state_grade.mustache +++ b/grade/report/singleview/templates/zero_state_grade.mustache @@ -26,6 +26,6 @@ }}
{{#str}}singleviewdescription, gradereport_singleview{{/str}}
{{#str}}singleviewdescription, gradereport_singleview{{/str}}