Add ability to start lecture and redirect to recorded content.

This commit is contained in:
2023-10-04 15:00:23 +01:00
parent 0e0d26d06d
commit 7c96b2c2bc
11 changed files with 69 additions and 5 deletions
+14
View File
@@ -0,0 +1,14 @@
class LectureController < ApplicationController
def start
lecture = Lecture.find(params[:id])
Toggl::start_time_entry(
description: lecture.title,
project_id: lecture.course.toggl_project,
)
if lecture.recording.present?
redirect_to lecture.recording.recording_url, allow_other_host: true
end
end
end