dev_unstable^2
daiao 6 years ago
parent 8d7762d5e7
commit a0e3edaa62

@ -176,9 +176,6 @@ class ChallengesController < ApplicationController
ActiveRecord::Base.transaction do
tab = params[:tab].to_i
@challenge.update_attributes(challenge_params)
if params[:challenge][:show_type].to_i == -1
@challenge.update_attributes(picture_path: nil, web_route: nil)
end
if tab == 0 && @challenge.st == 0
@challenge.challenge_tags.delete_all
if params[:challenge_tag].present?
@ -212,6 +209,11 @@ class ChallengesController < ApplicationController
@challenge.update_column(:modify_time, Time.now)
# 测试集的
@shixun.myshixuns.update_all(:system_tip => 0)
logger.info("########---#{params[:challenge]}")
logger.info("########---#{params[:challenge]['show_type']}")
if params[:challenge][:show_type].to_i == -1
@challenge.update_attributes(picture_path: nil, web_route: nil, expect_picture_path: nil, original_picture_path: nil)
end
end
# 关卡评测执行文件如果被修改,需要修改脚本内容
script = modify_shixun_script @shixun, @shixun.evaluate_script

Loading…
Cancel
Save