diff --git a/app/controllers/games_controller.rb b/app/controllers/games_controller.rb index 83678ca7f..977ddefa0 100644 --- a/app/controllers/games_controller.rb +++ b/app/controllers/games_controller.rb @@ -707,10 +707,10 @@ class GamesController < ApplicationController resubmit_identifier = @game.resubmit_identifier # 如果没有超时并且正在评测中 # 判断评测中的状态有两种:1、如果之前没有通关的,只需判断status为1即可;如果通过关,则判断game的resubmit_identifier是否更新 - # uid_logger("################game_status: #{@game.status}") - # uid_logger("################params[:resubmit]: #{params[:resubmit]}") - # uid_logger("################resubmit_identifier: #{resubmit_identifier}") - # uid_logger("################time_out: #{params[:time_out]}") + uid_logger("################game_status: #{@game.status}") + uid_logger("################params[:resubmit]: #{params[:resubmit]}") + uid_logger("################resubmit_identifier: #{resubmit_identifier}") + uid_logger("################time_out: #{params[:time_out]}") if (params[:time_out] == "false") && ((params[:resubmit].blank? && @game.status == 1) || (params[:resubmit].present? && (params[:resubmit] != resubmit_identifier))) # 代码评测的信息 diff --git a/app/controllers/myshixuns_controller.rb b/app/controllers/myshixuns_controller.rb index 811b9146a..79429a30d 100644 --- a/app/controllers/myshixuns_controller.rb +++ b/app/controllers/myshixuns_controller.rb @@ -139,7 +139,6 @@ class MyshixunsController < ApplicationController end end uid_logger("#############status: #{status}") - uid_logger("#############resubmit: #{resubmit}") record = EvaluateRecord.where(:game_id => game_id).first logger.info("training_task_status start#3**#{game_id}**** #{Time.now.strftime("%Y-%m-%d %H:%M:%S.%L")}") answer_deduction_percentage = (100 - game.answer_deduction) / 100.to_f # 查看答案后剩余分数的百分比. @@ -147,6 +146,7 @@ class MyshixunsController < ApplicationController # status:0表示评测成功 if status == "0" if resubmit.present? + uid_logger("#############resubmit: #{resubmit}") game.update_attributes!(:retry_status => 2, :resubmit_identifier => resubmit) challenge.path.split(";").each do |path| game_passed_code(path.try(:strip), myshixun, game_id)