mirror of
https://github.com/moodle/moodle.git
synced 2025-01-31 12:45:04 +01:00
MDL-78550 grade: Avoid rendering an empty <h2> heading
This commit is contained in:
parent
a7a9182262
commit
00e69c97ee
@ -954,19 +954,15 @@ function print_grade_page_head(int $courseid, string $active_type, ?string $acti
|
||||
}
|
||||
}
|
||||
|
||||
$heading = !empty($heading) ? $heading : '';
|
||||
|
||||
$output = '';
|
||||
// Add a help dialogue box if provided.
|
||||
if (isset($headerhelpidentifier)) {
|
||||
if (isset($headerhelpidentifier) && !empty($heading)) {
|
||||
$output = $OUTPUT->heading_with_help($heading, $headerhelpidentifier, $headerhelpcomponent);
|
||||
} else {
|
||||
if (isset($user)) {
|
||||
$renderer = $PAGE->get_renderer('core_grades');
|
||||
$output = $OUTPUT->heading($renderer->user_heading($user, $courseid));
|
||||
} else {
|
||||
$output = $OUTPUT->heading($heading);
|
||||
}
|
||||
} else if (isset($user)) {
|
||||
$renderer = $PAGE->get_renderer('core_grades');
|
||||
$output = $OUTPUT->heading($renderer->user_heading($user, $courseid));
|
||||
} else if (!empty($heading)) {
|
||||
$output = $OUTPUT->heading($heading);
|
||||
}
|
||||
|
||||
if ($return) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user