Use element name in the preview mode (#185)

This commit is contained in:
Dmitrii Metelkin 2018-07-26 13:37:22 +10:00 committed by Mark Nelson
parent e0cdcb07b9
commit 59fe72c7ca
2 changed files with 2 additions and 2 deletions

View file

@ -414,7 +414,7 @@ class element extends \mod_customcert\element {
return;
}
return element_helper::render_html_content($this, get_string('preview', 'customcertelement_daterange'));
return element_helper::render_html_content($this, get_string('preview', 'customcertelement_daterange', $this->get_name()));
}
/**

View file

@ -46,4 +46,4 @@ $string['daterange'] = 'Daterange {$a}';
$string['error:enabled'] = 'You must have at least one datarange enabled';
$string['error:datestring'] = 'You must provide string representation for the enabled datarange';
$string['error:enddate'] = 'End date must be after Start date';
$string['preview'] = 'Preview daterange string';
$string['preview'] = 'Preview {$a}';