mirror of
https://github.com/moodle/moodle.git
synced 2025-08-02 07:39:54 +02:00
MDL-82349 core_courseformat: fix home section zero name
This commit is contained in:
parent
2b337b49f9
commit
c6a9177252
1 changed files with 5 additions and 2 deletions
|
@ -58,9 +58,12 @@ class format_site extends course_format {
|
||||||
if ((string)$section->name !== '') {
|
if ((string)$section->name !== '') {
|
||||||
// Return the name the user set.
|
// Return the name the user set.
|
||||||
return format_string($section->name, true, array('context' => context_course::instance($this->courseid)));
|
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');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue