Skip to content

Commit

Permalink
VID-690: Add time completed field
Browse files Browse the repository at this point in the history
  • Loading branch information
dthies committed Aug 30, 2023
1 parent 01a390f commit dc1f409
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,14 @@ public function get_fields(): array {
]),
new field('status', new lang_string('activitystatus', 'videotime'), $this, 'MAX(cmc.completionstate)', [
new completion_status_attribute()
])
]),
new field('timecompleted', new lang_string('timecompleted', 'videotime'), $this, 'CASE
WHEN MAX(cmc.completionstate) > 0
THEN MAX(cmc.timemodified)
ELSE NULL
END', [
new date_attribute()
]),
];
$fields = array_merge($fields, $addfields);
}
Expand Down
1 change: 1 addition & 0 deletions lang/en/videotime.php
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@
$string['tabs'] = 'Tabs';
$string['generalsettings'] = 'General settings';
$string['taskscheduled'] = 'Task scheduled for next cron run';
$string['timecompleted'] = 'Time completed';
$string['timestarted'] = 'Date started';
$string['todo'] = 'TODO';
$string['totaluniquevisitors'] = 'Total unique visitors';
Expand Down

0 comments on commit dc1f409

Please sign in to comment.