From a75483d8f29e8b8b9c559ce9f33615000b4e16d8 Mon Sep 17 00:00:00 2001 From: SylorHuang Date: Mon, 15 Jul 2019 17:27:18 +0800 Subject: [PATCH] fixbug --- app/helpers/exercises_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/exercises_helper.rb b/app/helpers/exercises_helper.rb index 280f571a4..be71aedab 100644 --- a/app/helpers/exercises_helper.rb +++ b/app/helpers/exercises_helper.rb @@ -234,7 +234,7 @@ module ExercisesHelper shixun_score_array.each_with_index do |s,index| right_answer = (index == 0) if effictive_users_count == 0 - score_percent = "0.0" + score_percent = 0.0 else score_percent = (s.to_i / effictive_users_count.to_f ).round(3) end