mirror of
https://github.com/moodle/moodle.git
synced 2025-04-20 16:04:25 +02:00
MDL-82385 course: Wrap section name in span in core_course_get_contents
This commit is contained in:
parent
e12954e55c
commit
2b2dcab6a5
@ -200,6 +200,10 @@ class core_course_external extends external_api {
|
||||
$sectionvalues = array();
|
||||
$sectionvalues['id'] = $section->id;
|
||||
$sectionvalues['name'] = get_section_name($course, $section);
|
||||
// Temporary hack to be able to hide the subsections in certain app versions.
|
||||
if (!empty($section->component) && \core_useragent::is_moodle_app()) {
|
||||
$sectionvalues['name'] = html_writer::span($sectionvalues['name'], 'course-' . $section->component);
|
||||
}
|
||||
$sectionvalues['visible'] = $section->visible;
|
||||
|
||||
$options = (object) array('noclean' => true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user