Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion mod_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ public function definition(): void {
// Gets only sections with content.
foreach ($cm->get_sections() as $sectionnum => $section) {
$sectioninfo = $cm->get_section_info($sectionnum);
$s['name'] = $sectioninfo->name;
// Not escaped here, the template escapes it.
$s['name'] = format_string($sectioninfo->name, true, ['context' => $this->context, 'escape' => false]);
if (empty($s['name'])) {
$s['name'] = get_string('section') . ' ' . $sectionnum;
}
Expand Down
2 changes: 1 addition & 1 deletion templates/activityselector.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<div class="card-text">{{#str}} activity, core {{/str}}
<select id="learningmap-activity-selector">
{{#sections}}
<optgroup label="{{#shortentext}} 30, {{{name}}} {{/shortentext}}">
<optgroup label="{{#shortentext}} 30, {{name}} {{/shortentext}}">
{{#coursemodules}}
{{^completionenabled}}
<option value="{{id}}" disabled class="learningmap-disabled-activity" title="{{#str}} nocompletionenabled, learningmap {{/str}}">{{#shortentext}} 30, {{{name}}} {{/shortentext}}</option>
Expand Down
Loading