评测记录添加当前评测时最大执行时间

dev_admin
jingquan huang 6 years ago
parent 2de37f71d2
commit 912689704e

@ -265,7 +265,7 @@ class MyshixunsController < ApplicationController
# params[:evaluate] 实训评测时更新必须给的参数,需要依据该参数做性能统计,其它类型的更新可以跳过
# 自动保存的时候evaluate为0点评测的时候为1
if params[:evaluate] == 1
exec_time = @game.challenge.pluck(:exec_time)
exec_time = @game.challenge.try(:exec_time)
@sec_key = generate_identifier(EvaluateRecord, 12)
record = EvaluateRecord.create!(:user_id => current_user.id, :shixun_id => @myshixun.shixun_id, :game_id => game_id,
:identifier => @sec_key, :exec_time => exec_time)

@ -1,5 +0,0 @@
class AddExecTimeToEvaluation < ActiveRecord::Migration[5.2]
def change
add_column :evaluate_records, :exec_time, :integer
end
end
Loading…
Cancel
Save