From da2c9c97c263743af8c3a6238ff63f9cede3a36b Mon Sep 17 00:00:00 2001 From: SylorHuang Date: Sat, 29 Jun 2019 12:29:14 +0800 Subject: [PATCH] fix bug --- 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 68f6574ee..72fbc9486 100644 --- a/app/helpers/exercises_helper.rb +++ b/app/helpers/exercises_helper.rb @@ -642,7 +642,7 @@ module ExercisesHelper end if student_status == 2 #当前为老师,或为学生且已提交 user_score_pre = exercise_answers.score_reviewed - user_score = user_score_pre.present? ? user_score_pre.pluck(:score).sum : nil + user_score = user_score_pre.present? ? user_score_pre.pluck(:score).sum : "0.0" end if user_score.present? && (user_score > q.question_score)