Show testrun results in statistics

This commit is contained in:
Maximilian Grundke
2016-03-09 15:20:38 +01:00
parent 087b2bdf93
commit 16346fa732
5 changed files with 7 additions and 1 deletions

View File

@ -38,7 +38,7 @@ h1 = "#{@exercise} (external user #{@external_user})"
table.table
thead
tr
- ['.time', '.cause', '.score', '.time_difference'].each do |title|
- ['.time', '.cause', '.score', '.tests', '.time_difference'].each do |title|
th.header = t(title)
tbody
- deltas = submissions.map.with_index {|item, index| delta = item.created_at - submissions[index - 1].created_at if index > 0; if delta == nil or delta > 30*60 then 0 else delta end}
@ -47,6 +47,7 @@ h1 = "#{@exercise} (external user #{@external_user})"
td.clickable = submission.created_at.strftime("%F %T")
td = submission.cause
td = submission.score
td = submission.testruns.map{|run| run.passed ? 'p' : 'f'}.join(' ')
td = Time.at(deltas[1..index].inject(:+)).utc.strftime("%H:%M:%S") if index > 0
p = t('.addendum')