Skip to content

Commit

Permalink
adjust demo table to properly display date time field for the demot_t…
Browse files Browse the repository at this point in the history
…able_3 (#69)
  • Loading branch information
semteacher committed Feb 18, 2025
1 parent b3e34de commit 4a04d3e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
10 changes: 10 additions & 0 deletions classes/demo_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@
*/
class demo_table extends wunderbyte_table {

/**
* Decodes the Unix Timestamp
*
* @param stdClass $values
* @return void
*/
public function col_added($values) {
return userdate($values->added, get_string('strftimedatetimeshort'));
}

/**
* Decodes the Unix Timestamp
*
Expand Down
3 changes: 2 additions & 1 deletion classes/output/demo.php
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,8 @@ private function render_table_3() {
'id' => get_string('id', 'local_wunderbyte_table'),
'course' => get_string('course'),
'module' => get_string('module', 'local_wunderbyte_table'),
'idnumber' => get_string('module', 'local_wunderbyte_table'),
'idnumber' => get_string('idnumber'),
'added' => get_string('timecreated'),
'action' => get_string('action'),
];

Expand Down

0 comments on commit 4a04d3e

Please sign in to comment.