|
|
|
@ -105,7 +105,7 @@ class CoursesController < ApplicationController
|
|
|
|
|
def course_videos
|
|
|
|
|
course_videos = @course.course_videos
|
|
|
|
|
course_videos = course_videos.joins("
|
|
|
|
|
JOIN videos ON course_videos.video_id = videos.id
|
|
|
|
|
LEFT JOIN videos ON course_videos.video_id = videos.id
|
|
|
|
|
LEFT JOIN (
|
|
|
|
|
SELECT watch_course_videos.course_video_id,
|
|
|
|
|
SUM(watch_course_videos.total_duration) AS total_duration,
|
|
|
|
|