diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index 722845ef7..9ce0f76f7 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -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|