/**
|
* Generate the display of the time taken column.
|
* @param object $attempt the table row being output.
|
* @return string HTML content to go inside the td.
|
*/
|
public function col_duration($attempt) { |
if ($attempt->timefinish) { |
return format_time($attempt->timefinish - $attempt->timestart); |
} else { |
return '-'; |
}
|
}
|
When $attempt->timefinish == $attempt->timestart it shows "now"
Suggested fix:
if ($attempt->timefinish && $attempt->timestart != $attempt->timefinish) {