实训重置不删除关卡

This commit is contained in:
huang 2017-10-17 09:37:28 +08:00
parent 0ade0db00e
commit 715e50397d
1 changed files with 1 additions and 12 deletions

View File

@ -71,18 +71,7 @@ class MyshixunsController < ApplicationController
shixun = @myshixun.shixun
@challenges = shixun.challenges
# 删除选择题用户记录
unless @challenges.blank?
@challenges.each do |challenge|
if challenge.st != 0
challenge.challenge_chooses.each do |choose|
user_output = choose.choose_outputs
unless user_output.blank?
user_output.delete
end
end
end
end
end
#end
myshixun_job = Base64.urlsafe_encode64("myshixun_#{@myshixun.id}")
StudentWork.where(:myshixun_id => @myshixun.id).update_all(:myshixun_id => nil, :work_status => 0)