班级作业,上传附件提交作品,重试后直接提交,提交页面附件不显示但验证弹框中被删除的附件又显示了

This commit is contained in:
cxt 2016-08-23 10:50:51 +08:00
parent b8dc444cc7
commit 461912bec2
1 changed files with 1 additions and 0 deletions

View File

@ -793,6 +793,7 @@ class StudentWorkController < ApplicationController
end
elsif @homework.homework_type == 1
@work.update_attributes(:work_status => 0, :name => "#{@homework.name}的作品提交", :description => nil, :late_penalty => 0, :commit_time => nil)
@work.attachments.destroy_all
end
@student_work = StudentWork.new
respond_to do |format|