编程作业报500
This commit is contained in:
parent
0ccb6b884a
commit
b0d089f85c
|
@ -3623,8 +3623,9 @@ def course_syllabus_option user = User.current
|
|||
end
|
||||
|
||||
def create_works_list homework
|
||||
students = homework.course.student
|
||||
if !homework.course.nil? && !students.empty?
|
||||
unless homework.course.nil?
|
||||
students = homework.course.student
|
||||
if !students.empty?
|
||||
name = homework.name
|
||||
name_str = name + "的作品提交"
|
||||
str = ""
|
||||
|
@ -3636,6 +3637,7 @@ def create_works_list homework
|
|||
end
|
||||
sql = "insert into student_works (name, homework_common_id,user_id, created_at, updated_at) values" + str
|
||||
ActiveRecord::Base.connection.execute sql
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue