|
|
@ -51,11 +51,10 @@ class CreateWatchVideoService < ApplicationService
|
|
|
|
d.start_at = current_time
|
|
|
|
d.start_at = current_time
|
|
|
|
d.duration = params[:duration]
|
|
|
|
d.duration = params[:duration]
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
watch_video_history = build_video_log(current_time, course_video.video_id, watch_course_video.id)
|
|
|
|
|
|
|
|
watch_video_history.save!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
watch_course_video.save! unless watch_course_video.persisted?
|
|
|
|
watch_course_video.save! unless watch_course_video.persisted?
|
|
|
|
|
|
|
|
watch_video_history = build_video_log(current_time, course_video.video_id, watch_course_video.id)
|
|
|
|
|
|
|
|
watch_video_history.save!
|
|
|
|
else
|
|
|
|
else
|
|
|
|
# 非课堂视频
|
|
|
|
# 非课堂视频
|
|
|
|
video = Video.find(params[:video_id])
|
|
|
|
video = Video.find(params[:video_id])
|
|
|
|