实训重置不删除关卡
This commit is contained in:
parent
0ade0db00e
commit
715e50397d
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue