通过测试集的个数

dev_tpm_ui
daiao 5 years ago
parent 512e90aa02
commit 512d4bfd9e

@ -96,7 +96,8 @@ class HackUserLastestCodesController < ApplicationController
if ojEvaResult['execMode'] == "debug"
save_debug_data ds_params
elsif ojEvaResult['execMode'] == "submit"
save_submit_data ds_params.merge(expected_output: testCase['expectedOutput'])
save_submit_data ds_params.merge(expected_output: testCase['expectedOutput'],
error_test_set_id: ojEvaResult['failCaseNum'])
end
# 评测完成后,还原评测中的状态
@my_hack.update_attribute(:submit_status, 0)

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