Skip to content

Commit

Permalink
Adding date to entry table
Browse files Browse the repository at this point in the history
  • Loading branch information
MerliX committed Nov 15, 2016
1 parent d3bca91 commit 07fb533
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
8 changes: 7 additions & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@
if (!empty($entries)) {
$table = new flexible_table('availability_examus_table');

$table->define_columns(array('user', 'course', 'module', 'status', 'review_link', 'create_entry'));
$table->define_columns(array('date', 'user', 'course', 'module', 'status', 'review_link', 'create_entry'));
$table->define_headers(array(
get_string('date_modified', 'availability_examus'),
get_string('user'),
get_string('course'),
get_string('module', 'availability_examus'),
Expand All @@ -70,6 +71,11 @@

foreach ($entries as $entry) {
$row = array();

$date = usergetdate($entry->timemodified);
$row[] = '<b>' . $date['year'] . '.' . $date['mon'] . '.' . $date['mday'] . '</b> ' .
$date['hours'] . ':' . $date['minutes'];

$user = $DB->get_record('user', array('id' => $entry->userid));
$row[] = $user->firstname . " " . $user->lastname . "<br>" . $user->email;

Expand Down
3 changes: 2 additions & 1 deletion lang/en/availability_examus.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@
$string['link'] = 'Logs and video';

$string['new_entry_created'] = 'New entry created';
$string['entry_exist'] = 'New entry already exist';
$string['entry_exist'] = 'New entry already exist';
$string['date_modified'] = 'Date of last change';
3 changes: 2 additions & 1 deletion lang/ru/availability_examus.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@
$string['link'] = 'Архив';

$string['new_entry_created'] = 'Новая запись успешно создана';
$string['entry_exist'] = 'Новая запись уже существует';
$string['entry_exist'] = 'Новая запись уже существует';
$string['date_modified'] = 'Дата последнего изменения';
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
defined('MOODLE_INTERNAL') || die();

$plugin->component = 'availability_examus';
$plugin->version = 2016111502;
$plugin->version = 2016111503;
$plugin->release = 'v3.1-r1';
$plugin->requires = 2016052300;
$plugin->maturity = MATURITY_STABLE;

0 comments on commit 07fb533

Please sign in to comment.