diff --git a/app/models/game.rb b/app/models/game.rb index 152ede0c..1ec1f8ea 100644 --- a/app/models/game.rb +++ b/app/models/game.rb @@ -22,7 +22,7 @@ class Game < ActiveRecord::Base # 根据得分比例来算实际得分(试卷、实训作业) def real_score score - self.final_score == challenge.score ? self.final_score : (self.final_score.to_f / challenge.score) * score + self.final_score == challenge.score ? score : (self.final_score.to_f / challenge.score) * score end def had_done