mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 12:32:08 +02:00
MDL-78550 grade: Avoid rendering an empty <h2> heading
This commit is contained in:
parent
e953e71c54
commit
b98fb9032c
@ -970,15 +970,13 @@ function print_grade_page_head(int $courseid, string $active_type, ?string $acti
|
||||
|
||||
$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