diff --git a/app/Http/Controllers/Backend/Api/V1/CourseController.php b/app/Http/Controllers/Backend/Api/V1/CourseController.php index 88aaf92b1..ab315f91f 100644 --- a/app/Http/Controllers/Backend/Api/V1/CourseController.php +++ b/app/Http/Controllers/Backend/Api/V1/CourseController.php @@ -384,6 +384,7 @@ public function videoWatchRecords($courseId, $userId) if ($chapters->isEmpty()) { foreach ($videos as $videoItem) { $tmp = [ + 'video_id' => $videoItem['id'], 'video_title' => $videoItem['title'], 'duration' => $videoItem['duration'], 'watch_seconds' => $videoWatchRecords[$videoItem['id']]['watch_seconds'] ?? 0, @@ -401,6 +402,7 @@ public function videoWatchRecords($courseId, $userId) foreach ($list as $videoItem) { $tmp = [ + 'video_id' => $videoItem['id'], 'video_title' => sprintf('%s-%s', $chapter['title'], $videoItem['title']), 'duration' => $videoItem['duration'], 'watch_seconds' => $videoWatchRecords[$videoItem['id']]['watch_seconds'] ?? 0,