This commit is contained in:
parent
8edfec258b
commit
7b2943c37a
|
@ -773,7 +773,7 @@ class StudentWorkController < ApplicationController
|
|||
pros = @work.student_work_projects.where("is_leader = 0")
|
||||
user_ids = pros.empty? ? "(-1)" : "(" + pros.map{|stu|stu.user_id}.join(",") + ")"
|
||||
student_works = @homework.student_works.where("user_id in #{user_ids}")
|
||||
student_works.update_all(:work_status => 0, :name => "#{@homework.name}的作品提交", :description => nil, :late_penalty => 0, :commit_time => nil, :project_id => 0)
|
||||
student_works.delete_all
|
||||
pros.delete_all
|
||||
|
||||
project = @work.student_work_projects.where("is_leader = 1").first
|
||||
|
|
Loading…
Reference in New Issue