From 21267082016c5f2573400dbb036eb747e2a7e55e Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Wed, 27 Dec 2017 21:03:09 +0400 Subject: An additional column is added --- classes/webhooks_table.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/classes/webhooks_table.php b/classes/webhooks_table.php index cf00790..fdf015e 100644 --- a/classes/webhooks_table.php +++ b/classes/webhooks_table.php @@ -76,12 +76,14 @@ class local_webhooks_table extends table_sql { $columns = array( "title", "url", + "events", "actions" ); $headers = array( new lang_string("name", "moodle"), new lang_string("url", "moodle"), + new lang_string("edulevel", "moodle"), new lang_string("actions", "moodle") ); @@ -118,6 +120,17 @@ class local_webhooks_table extends table_sql { return $html; } + /** + * Specifies the display of a column with events. + * + * @param object $row Data from the database. + * @return string Displayed data. + */ + public function col_events($row) { + $eventlist = local_webhooks_deserialization_data($row->events); + return count($eventlist); + } + /** * Specifies the display of the column with the service name. * -- cgit v1.2.3