From f2f4419bb8df20f4ab19c3b06da4162511dcc8ad Mon Sep 17 00:00:00 2001 From: Maximilian Grundke Date: Tue, 10 Apr 2018 14:23:23 +0200 Subject: [PATCH] Don't highlight submissions within the same second --- app/views/exercises/external_users/statistics.html.slim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/exercises/external_users/statistics.html.slim b/app/views/exercises/external_users/statistics.html.slim index 4a1e7b77..7d00f3b1 100644 --- a/app/views/exercises/external_users/statistics.html.slim +++ b/app/views/exercises/external_users/statistics.html.slim @@ -40,7 +40,8 @@ h1 = "#{@exercise} (external user #{@external_user})" th.header = t(title) tbody - @submissions_and_interventions.each_with_index do |this, index| - tr data-id=this.id class=('highlight' if index > 0 and @working_times_until[index] == @working_times_until[index - 1]) + - highlight = (index > 0 and @working_times_until[index] == @working_times_until[index - 1] and this.created_at > @submissions_and_interventions[index - 1].created_at) + tr data-id=this.id class=('highlight' if highlight) td.clickable = this.created_at.strftime("%F %T") - if this.is_a?(Submission) td = this.cause