From 72fc6161a17b722c18237d580738b01a79595b69 Mon Sep 17 00:00:00 2001 From: Andreas Kempka <53858701+a-kempka@users.noreply.github.com> Date: Mon, 18 Nov 2024 14:28:08 +0100 Subject: [PATCH] Update templateadmintools.php add template key in admin list as in https://github.com/justinhunt/moodle-filter_generico/issues/51 --- classes/templateadmintools.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/classes/templateadmintools.php b/classes/templateadmintools.php index 4bb2ea7..38f0084 100644 --- a/classes/templateadmintools.php +++ b/classes/templateadmintools.php @@ -42,7 +42,7 @@ public static function fetch_template_table() { $table->id = 'filter_generico_template_list'; $table->head = array( get_string('name'), - get_string('templatekey'), + get_string('key', 'filter_generico'), get_string('version'), get_string('description') ); @@ -135,6 +135,12 @@ public static function fetch_template_details($conf) { $template_details->index = $tindex; $template_details->title = $template_title; + if ($conf && property_exists($conf, 'templatekey_' . $tindex)) { + $template_details->templatekey = $conf->{'templatekey_' . $tindex};; + } else { + $template_details->templatekey = ''; + } + $template_details->version = ""; if (property_exists($conf, 'templateversion_' . $tindex)) { $template_details->version = $conf->{'templateversion_' . $tindex};