diff --git a/app/controllers/games_controller.rb b/app/controllers/games_controller.rb index 32175ec2f..4e7afa516 100644 --- a/app/controllers/games_controller.rb +++ b/app/controllers/games_controller.rb @@ -270,6 +270,7 @@ class GamesController < ApplicationController if @game.status == 2 @game.update_attributes!(:answer_open => @answer.level) else + # 扣除总分计算 answer_deduction = challenge.challenge_answers.where("level <= #{@answer.level}").sum(:score) @game.update_attributes!(:answer_open => @answer.level, :answer_deduction => answer_deduction) end diff --git a/config/routes.rb b/config/routes.rb index ecd54c8c0..f81d90267 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -117,6 +117,7 @@ Rails.application.routes.draw do get :close_webssh get :get_answer_info get :unlock_answer + get :check_test_sets end collection do