|
|
|
@ -803,13 +803,11 @@ module ExercisesHelper
|
|
|
|
|
elsif ques_type == 5
|
|
|
|
|
user_score = user_score_pre.present? ? user_score_pre.pluck(:score).sum : 0.0
|
|
|
|
|
elsif ques_type == 3 #填空题时,需小心出现9.9分
|
|
|
|
|
user_score_pluck = user_score_pre.present? ? user_score_pre.pluck(:score).sum : 0.0
|
|
|
|
|
if user_score_pluck > 0.0
|
|
|
|
|
if user_score_pluck.to_s.split(".").last == "9"
|
|
|
|
|
user_score = user_score_pluck.to_f + 0.1
|
|
|
|
|
user_score = user_score_pre.present? ? user_score_pre.pluck(:score).sum : 0.0
|
|
|
|
|
if user_score > 0.0
|
|
|
|
|
if user_score.to_s.split(".").last == "9"
|
|
|
|
|
user_score = user_score.to_f + 0.1
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
user_score = user_score_pluck
|
|
|
|
|
end
|
|
|
|
|
# user_score = user_score_pre.present? ? user_score_pre.pluck(:score).sum : 0.0
|
|
|
|
|
else #选择题,判断题根据第一个记录查分
|
|
|
|
|