Update app/views/exercise_collections/statistics.html.slim

Co-Authored-By: rteusner <ralf.teusner@hpi.de>
This commit is contained in:
MrSerth
2019-03-29 16:01:03 +01:00
committed by GitHub
parent 5958523fdb
commit fc2a599082

View File

@ -36,6 +36,6 @@ h4.mt-4 = t('activerecord.attributes.exercise_collections.exercises')
td = link_to_if(policy(exercise).show?, exercise.title, exercise) td = link_to_if(policy(exercise).show?, exercise.title, exercise)
td = exercise.users.distinct.count td = exercise.users.distinct.count
td = exercise.submissions.send(:final).distinct.count(:user_id) 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 = exercise.average_percentage
td = link_to(t('shared.statistics'), statistics_exercise_path(exercise), 'data-turbolinks' => "false") if policy(exercise).statistics? td = link_to(t('shared.statistics'), statistics_exercise_path(exercise), 'data-turbolinks' => "false") if policy(exercise).statistics?