Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

chromesetting
SylorHuang 5 years ago
commit f6a57b5c92

@ -173,6 +173,7 @@ class ChallengesController < ApplicationController
# tab 0:过关任务的更新; 1:评测设置的更新; 2:表示参考答案的更新; # tab 0:过关任务的更新; 1:评测设置的更新; 2:表示参考答案的更新;
def update def update
begin
ActiveRecord::Base.transaction do ActiveRecord::Base.transaction do
tab = params[:tab].to_i tab = params[:tab].to_i
@challenge.update_attributes(challenge_params) @challenge.update_attributes(challenge_params)
@ -231,6 +232,11 @@ class ChallengesController < ApplicationController
end end
end end
rescue => e
logger_error("##update_challenges: ##{e.message}")
tip_exception("更新失败!")
end
end end
# 参考答案的'增,删,改' # 参考答案的'增,删,改'

@ -0,0 +1,7 @@
class ModifyTypeForTestSets < ActiveRecord::Migration[5.2]
def change
change_column :test_sets, :input, :longtext
change_column :test_sets, :output, :longtext
end
end
Loading…
Cancel
Save