Minor changes and CHANGES.md note (#433)
This commit is contained in:
parent
747dcc4c66
commit
ae6e80c3be
2 changed files with 11 additions and 6 deletions
|
@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
|
|||
|
||||
Note - All hash comments refer to the issue number. Eg. #169 refers to https://github.com/mdjnelson/moodle-mod_customcert/issues/169.
|
||||
|
||||
## [3.10.2] - 2021-??-??
|
||||
|
||||
### Fixed
|
||||
- Fix places not using the multi-language filter (#433).
|
||||
|
||||
## [3.10.1] - 2021-06-13
|
||||
|
||||
### Added
|
||||
|
|
|
@ -47,21 +47,21 @@ class load_template_form extends \moodleform {
|
|||
|
||||
// Get the context.
|
||||
$context = $this->_customdata['context'];
|
||||
$syscontext = \context_system::instance();
|
||||
|
||||
$mform->addElement('header', 'loadtemplateheader', get_string('loadtemplate', 'customcert'));
|
||||
|
||||
// Display a link to the manage templates page.
|
||||
if ($context->contextlevel != CONTEXT_SYSTEM && has_capability('mod/customcert:manage', \context_system::instance())) {
|
||||
if ($context->contextlevel != CONTEXT_SYSTEM && has_capability('mod/customcert:manage', $syscontext)) {
|
||||
$link = \html_writer::link(new \moodle_url('/mod/customcert/manage_templates.php'),
|
||||
get_string('managetemplates', 'customcert'));
|
||||
$mform->addElement('static', 'managetemplates', '', $link);
|
||||
}
|
||||
|
||||
$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) {
|
||||
$arrtemplates = $DB->get_records_menu('customcert_templates', ['contextid' => $syscontext->id], 'name ASC', 'id, name');
|
||||
if ($arrtemplates) {
|
||||
$templates = [];
|
||||
foreach ($arrtemplates as $key => $template) {
|
||||
$templates[$key] = format_string($template, true, ['context' => $context]);
|
||||
}
|
||||
$group = array();
|
||||
|
|
Loading…
Reference in a new issue