@ -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
# 判断实训是否全部通关