An additional column is added

This commit is contained in:
Valentin Popov 2017-12-27 21:03:09 +04:00
parent 0041667754
commit 2126708201

View File

@ -76,12 +76,14 @@ class local_webhooks_table extends table_sql {
$columns = array( $columns = array(
"title", "title",
"url", "url",
"events",
"actions" "actions"
); );
$headers = array( $headers = array(
new lang_string("name", "moodle"), new lang_string("name", "moodle"),
new lang_string("url", "moodle"), new lang_string("url", "moodle"),
new lang_string("edulevel", "moodle"),
new lang_string("actions", "moodle") new lang_string("actions", "moodle")
); );
@ -118,6 +120,17 @@ class local_webhooks_table extends table_sql {
return $html; 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. * Specifies the display of the column with the service name.
* *