修改课程列表显示不对的BUG
This commit is contained in:
parent
189e641d23
commit
5ccde8e433
|
@ -48,7 +48,7 @@ class SyllabusesService
|
|||
syllabuses = Syllabus.where("id in #{syllabus_ids} or user_id = #{user.id}").order("updated_at desc")
|
||||
|
||||
syllabuses.each do |syllabus|
|
||||
syllabus.courses = syllabus.courses.not_deleted
|
||||
syllabus.courses = courses.where("syllabus_id = #{syllabus.id}").select("courses.*,(SELECT MAX(updated_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS updatetime").order("time desc")
|
||||
end
|
||||
|
||||
syllabuses.to_a << other
|
||||
|
|
Loading…
Reference in New Issue