From e3f125a63cda4406228b5dc6f81af3cf10c4b015 Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Thu, 18 Jul 2019 15:15:29 +0800 Subject: [PATCH] =?UTF-8?q?500=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/games_controller.rb | 4 ++-- app/controllers/myshixuns_controller.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/games_controller.rb b/app/controllers/games_controller.rb index b51dab344..3a49f4d80 100644 --- a/app/controllers/games_controller.rb +++ b/app/controllers/games_controller.rb @@ -47,7 +47,7 @@ class GamesController < ApplicationController max_query_index = @game.query_index.to_i # 统计评测时间 - record_onsume_time = EvaluateRecord.where(game_id: @game.id).first.try(:consume_time) + record_onsume_time = EvaluateRecord.where(game_id: @game.id).first.try(:pod_execute) # myshixun_manager判断用户是否有权限查看隐藏测试集(TPM管理员;平台认证的老师;花费金币查看者) myshixun_manager = @identity < User::EDU_GAME_MANAGER @@ -758,7 +758,7 @@ class GamesController < ApplicationController web_route = game_challenge.try(:web_route) mirror_name = @shixun.mirror_name - e_record = EvaluateRecord.where(:sec_key => sec_key).first + e_record = EvaluateRecord.where(:identifier => sec_key).first # 轮询结束,更新评测统计耗时 if game_status == 0 || game_status == 2 diff --git a/app/controllers/myshixuns_controller.rb b/app/controllers/myshixuns_controller.rb index fc59f6b7c..0a86f88da 100644 --- a/app/controllers/myshixuns_controller.rb +++ b/app/controllers/myshixuns_controller.rb @@ -140,7 +140,7 @@ class MyshixunsController < ApplicationController end end uid_logger("#############status: #{status}") - record = EvaluateRecord.where(:sec_key => sec_key).first + record = EvaluateRecord.where(:identifier => sec_key).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 # 查看答案后剩余分数的百分比. # answer_deduction是查看答案的扣分比例