MDL-82349 core_courseformat: fix home section zero name

This commit is contained in:
ferranrecio 2024-10-08 12:45:58 +02:00 committed by ferran
parent 2b337b49f9
commit c6a9177252

View File

@ -58,9 +58,12 @@ class format_site extends course_format {
if ((string)$section->name !== '') {
// Return the name the user set.
return format_string($section->name, true, array('context' => context_course::instance($this->courseid)));
} else {
return get_string('site');
}
// The section zero is located in a block.
if ($section->sectionnum == 0) {
return get_string('block');
}
return get_string('site');
}
/**