courseware
daiao 5 years ago
parent 75c5075cc9
commit 7ee64b2004

@ -161,7 +161,7 @@ class Course < ApplicationRecord
end
def videos_count
course_videos.where(video_id: videos.where("transcoded = 1 or videos.user_id = #{User.current.id}").pluck(:id))
course_videos.where(video_id: videos.where("transcoded = 1"))
.or(course_videos.where(course_videos: {is_link: true})).size
end

Loading…
Cancel
Save