Merge branch 'develop' into dev_newproject
This commit is contained in:
commit
a9e62618f1
|
@ -90,6 +90,10 @@ class HomeworkCommonController < ApplicationController
|
||||||
@homework.homework_tests.destroy_all
|
@homework.homework_tests.destroy_all
|
||||||
elsif @homework.homework_type == 3
|
elsif @homework.homework_type == 3
|
||||||
@homework.homework_detail_group.destroy if @homework.homework_detail_group
|
@homework.homework_detail_group.destroy if @homework.homework_detail_group
|
||||||
|
create_works_list @homework
|
||||||
|
end
|
||||||
|
if params[:homework_type].to_i == 3
|
||||||
|
@homework.student_works.destroy_all
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@homework.homework_type = params[:homework_type].to_i || @homework.homework_type
|
@homework.homework_type = params[:homework_type].to_i || @homework.homework_type
|
||||||
|
|
|
@ -3681,7 +3681,7 @@ end
|
||||||
def create_works_list homework
|
def create_works_list homework
|
||||||
unless homework.course.nil?
|
unless homework.course.nil?
|
||||||
students = homework.course.student
|
students = homework.course.student
|
||||||
if !students.empty?
|
if !students.empty? && homework.student_works.empty?
|
||||||
name = homework.name
|
name = homework.name
|
||||||
name_str = name + "的作品提交"
|
name_str = name + "的作品提交"
|
||||||
str = ""
|
str = ""
|
||||||
|
|
Loading…
Reference in New Issue