Fix for multi-language issues (#433).

- Filename of PDF when viewing/previewing PDF.
- Page title tag when viewing/previewing PDF.
- List of available templates.
- Template Load dropdown list.
This commit is contained in:
Michael Milette 2021-06-29 21:10:52 +00:00 committed by Mark Nelson
parent cf11f765b0
commit 25d398ce22
3 changed files with 10 additions and 4 deletions

View file

@ -60,6 +60,10 @@ class load_template_form extends \moodleform {
$templates = $DB->get_records_menu('customcert_templates',
array('contextid' => \context_system::instance()->id), 'name ASC', 'id, name');
if ($templates) {
$context = \context_system::instance()->id;
foreach ($templates as $key => $template) {
$templates[$key] = format_string($template, true, ['context' => $context]);
}
$group = array();
$group[] = $mform->createElement('select', 'ltid', '', $templates);
$group[] = $mform->createElement('submit', 'loadtemplatesubmit', get_string('load', 'customcert'));