From fc2a5990822c262593ff520ad0525fa04da5d59d Mon Sep 17 00:00:00 2001 From: MrSerth Date: Fri, 29 Mar 2019 16:01:03 +0100 Subject: [PATCH] Update app/views/exercise_collections/statistics.html.slim Co-Authored-By: rteusner --- app/views/exercise_collections/statistics.html.slim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/exercise_collections/statistics.html.slim b/app/views/exercise_collections/statistics.html.slim index 5e9462df..8951f326 100644 --- a/app/views/exercise_collections/statistics.html.slim +++ b/app/views/exercise_collections/statistics.html.slim @@ -36,6 +36,6 @@ h4.mt-4 = t('activerecord.attributes.exercise_collections.exercises') td = link_to_if(policy(exercise).show?, exercise.title, exercise) td = exercise.users.distinct.count td = exercise.submissions.send(:final).distinct.count(:user_id) - td = finishers_percentage = exercise.users.distinct.count == 0 ? 0 : (100.0 / exercise.users.distinct.count * exercise.finishers.count).round(2) + td = exercise.finishers_percentage td = exercise.average_percentage td = link_to(t('shared.statistics'), statistics_exercise_path(exercise), 'data-turbolinks' => "false") if policy(exercise).statistics?