删除分组作品时相关记录未删完全

This commit is contained in:
cxt 2017-04-07 15:33:24 +08:00
parent bc352897ef
commit a5a99e7bcf
1 changed files with 2 additions and 2 deletions

View File

@ -779,8 +779,8 @@ class StudentWorkController < ApplicationController
course_statistics.update_attribute('committed_work_num', (course_statistics.committed_work_num - 1) < 0 ? 0 : (course_statistics.committed_work_num - 1)) if course_statistics
course_statistics.update_attribute('un_commit_work_num', course_statistics.un_commit_work_num + 1) if course_statistics
end
student_works.delete_all
pros.delete_all
student_works.destroy_all
pros.destroy_all
project = @work.student_work_projects.where("is_leader = 1").first
if @homework.homework_detail_group.base_on_project == 1