Skip to content
Merged
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 lang/en/format_ucl.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
$string['pluginname'] = 'UCL Format';
$string['privacy:metadata'] = 'The UCL format plugin does not store any personal data.';
$string['section0name'] = 'Introduction';
$string['sectionname'] = 'New section';
$string['sectiondefaultname'] = 'New section';
$string['sectionname'] = 'Section';
$string['showfromothers'] = 'Show';
$string['toc'] = 'Table of contents';
$string['toofewmods'] = 'sections have one or less activities/resources';
Expand Down
4 changes: 2 additions & 2 deletions lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ public function get_section_name($section) {
return get_string('section0name', 'format_ucl');
}

if (get_string_manager()->string_exists('sectionname', 'format_ucl')) {
return get_string('sectionname', 'format_ucl');
if (get_string_manager()->string_exists('sectiondefaultname', 'format_ucl')) {
return get_string('sectiondefaultname', 'format_ucl');
}

// Return an empty string if there's no available section name string for the given format.
Expand Down
2 changes: 1 addition & 1 deletion tests/format_ucl_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public function test_get_default_section_name(): void {
$sectionname = get_string('section0name', 'format_ucl');
$this->assertEquals($sectionname, $courseformat->get_default_section_name($section));
} else {
$sectionname = get_string('sectionname', 'format_ucl', $section->section);
$sectionname = get_string('sectiondefaultname', 'format_ucl', $section->section);
$this->assertEquals($sectionname, $courseformat->get_default_section_name($section));
}
}
Expand Down
Loading