关卡比例计算的调整

dev_forum
cxt 5 years ago
parent 008518e47f
commit 2887de4c4e

@ -31,7 +31,7 @@ class Game < ApplicationRecord
# 根据得分比例来算实际得分(试卷、实训作业)
def real_score score
(final_score.to_f / challenge.all_score) * score
((final_score < 0 ? 0 : final_score).to_f / challenge.all_score) * score
end
# 判断实训是否全部通关

Loading…
Cancel
Save