Skip to content

Commit

Permalink
An additional column is added
Browse files Browse the repository at this point in the history
  • Loading branch information
valentineus committed Dec 27, 2017
1 parent 0041667 commit 2126708
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions classes/webhooks_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,14 @@ public function define_table_columns() {
$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")
);

Expand Down Expand Up @@ -118,6 +120,17 @@ public function col_actions($row) {
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.
*
Expand Down

0 comments on commit 2126708

Please sign in to comment.