From e7fb988db55e226ee0c0aac65d88d98f628e75d2 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Tue, 24 Mar 2020 15:41:03 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=95=E5=8D=B7=E7=AD=94=E9=A2=98=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E5=A2=9E=E5=8A=A0=E5=BE=85=E6=89=B9=E9=98=85=E7=8A=B6?= =?UTF-8?q?=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/exercises_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/exercises_helper.rb b/app/helpers/exercises_helper.rb index 1887aee5a..26a9aa9ec 100644 --- a/app/helpers/exercises_helper.rb +++ b/app/helpers/exercises_helper.rb @@ -714,9 +714,9 @@ module ExercisesHelper end teacher_review = ex_user.subjective_score < 0.0 ? false : true if (user_status == 0 && commit_status == 1) || (user_status == 1 && ex_user_exercise_status == 3 && commit_status == 1) #老师都可以看,学生,需在试卷已提交,且已截止的情况下看 - ex_object_score = ex_user.objective_score < 0.0 ? 0.0 : ex_user.objective_score.round(1).to_s + ex_object_score = ex_user.objective_score <= 0.0 ? 0 : ex_user.objective_score.round(1).to_s ex_subject_score = ex_user.subjective_score < 0.0 ? nil : ex_user.subjective_score.round(1).to_s - score = ex_user.score.present? ? ex_user.score.round(1).to_s : 0.0.to_s + score = ex_user.score.present? && ex_user.score > 0.0 ? ex_user.score.round(1).to_s : 0.to_s else ex_object_score = nil ex_subject_score = nil