mirror of
https://github.com/moodle/moodle.git
synced 2025-08-10 03:16:42 +02:00
MDL-82385 course: Wrap section name in span in core_course_get_contents
This commit is contained in:
parent
e12954e55c
commit
2b2dcab6a5
1 changed files with 4 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue