From 816c6fcbf65539b91a58d7e162994ff3f9cb85d9 Mon Sep 17 00:00:00 2001 From: Maximilian Grundke Date: Fri, 31 Aug 2018 14:11:10 +0200 Subject: [PATCH] Fix highlighting for submissions occurring in the same second --- app/views/exercises/external_users/statistics.html.slim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/exercises/external_users/statistics.html.slim b/app/views/exercises/external_users/statistics.html.slim index 579d3bd8..5d91716a 100644 --- a/app/views/exercises/external_users/statistics.html.slim +++ b/app/views/exercises/external_users/statistics.html.slim @@ -39,8 +39,8 @@ h1 = "#{@exercise} (external user #{@external_user})" - ['.time', '.cause', '.score', '.tests', '.time_difference'].each do |title| th.header = t(title) tbody - - @submissions_and_interventions.each_with_index do |this, index| - - highlight = (index > 0 and @working_times_until[index] == @working_times_until[index - 1] and this.created_at > @submissions_and_interventions[index - 1].created_at) + - @all_events.each_with_index do |this, index| + - highlight = (index > 0 and @deltas[index] == 0 and this.created_at.to_s != @all_events[index - 1].created_at.to_s) tr data-id=this.id class=('highlight' if highlight) td.clickable = this.created_at.strftime("%F %T") - if this.is_a?(Submission)