课程列表改下
This commit is contained in:
parent
1df1368214
commit
189e641d23
|
@ -47,8 +47,7 @@ class SyllabusesService
|
|||
syllabus_ids = courses.empty? ? '(-1)' : "(" + courses.map{|course| !course.syllabus_id.nil? && course.syllabus_id}.join(",") + ")"
|
||||
syllabuses = Syllabus.where("id in #{syllabus_ids} or user_id = #{user.id}").order("updated_at desc")
|
||||
|
||||
user.syllabuses = syllabuses
|
||||
user.syllabuses.each do |syllabus|
|
||||
syllabuses.each do |syllabus|
|
||||
syllabus.courses = syllabus.courses.not_deleted
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue