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

dev_forum
cxt 6 years ago
commit c866e3fb4e

@ -522,8 +522,10 @@ class ShixunsController < ApplicationController
min_challenges = @shixun.challenges.pluck(:id , :st)
Rails.logger.info("11111111112#{current_myshixun.try(:id)}")
Rails.logger.info("111111111102#{params[:reset]}")
if current_myshixun
# 因为读写分离有延迟所以如果是重置来的请求可以先跳过重置过来的params[:reset]为1
if current_myshixun && params[:reset] != 1
games = current_myshixun.games
# 如果TPM和TPI的管卡数不相等或者关卡顺序错了说明实训被极大的改动需要重置,实训发布前打过的实训都需要重置
if is_shixun_reset?(games, min_challenges, current_myshixun)
@ -829,9 +831,5 @@ private
games.size != min_challenges.size ||
games.map(&:challenge_id) != min_challenges.map{|challenge| challenge.first} ||
modify_shixun
Rails.logger.info("11111111113#{modify_shixun.try(:id)}")
Rails.logger.info("11111111114#{games.map(&:challenge_id) != min_challenges.map{|challenge| challenge.first}}")
Rails.logger.info("11111111115#{games.size != min_challenges.size}")
end
end

@ -1,4 +1,4 @@
json.content @content
json.resubmit "#{@resubmit}"
json.sec_key "#{@sec_key}"
json.content_modified @hide_code ? false : @content_modified
json.content_modified @hide_code ? 0 : @content_modified

Loading…
Cancel
Save