Skip to content

Commit

Permalink
newsectionname
Browse files Browse the repository at this point in the history
  • Loading branch information
rdebleu committed Feb 18, 2024
1 parent 940c89c commit da27a00
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions lang/en/format_masonry.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
$string['defaultbordercolor'] = 'Default border color';
$string['defaultbordercolordesc'] = 'The default border color for the section.';
$string['hidefromothers'] = 'Hide Topic';
$string['newsectionname'] = 'New Topic';
$string['package'] = 'Masonry Topics';
$string['pluginname'] = 'Masonry Topics format';
$string['privacy:metadata'] = 'The format_masonry plugin does not store any personal data.';
Expand Down
4 changes: 2 additions & 2 deletions lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function get_renderer(moodle_page $page) {
}

/**
* Returns the default section name for the topics course format.
* Returns the default section name for the masonry course format.
*
* @param stdClass $section Section object from database or just field course_sections section
* @return string The default value for the section name.
Expand Down Expand Up @@ -223,7 +223,7 @@ public function inplace_editable_render_section_name($section, $linkifneeded = f
}
if (empty($editlabel)) {
$title = get_section_name($section->course, $section);
$editlabel = new lang_string('newsectionname', 'format_topics', $title);
$editlabel = new lang_string('newsectionname', 'format_masonry', $title);
}
return parent::inplace_editable_render_section_name($section, $linkifneeded, $editable, $edithint, $editlabel);
}
Expand Down

0 comments on commit da27a00

Please sign in to comment.