@if (isset($lesson_details->lesson_type)) @if ($lesson_details->lesson_type == 'text')
{!! removeScripts($lesson_details->attachment) !!}
@elseif ($lesson_details->lesson_type == 'video-url')
@include('course_player.player_config')
@elseif($lesson_details->lesson_type == 'google_drive') @php $video_url = trim($lesson_details->lesson_src); preg_match('/\/d\/([a-zA-Z0-9_-]+)/', $video_url, $matches); $video_id = $matches[1] ?? null; @endphp @if($video_id)
@include('course_player.player_config') @else
{{ get_phrase('Invalid Google Drive Link') }}

{{ get_phrase('Could not extract video ID from the provided URL.') }}

@endif @elseif($lesson_details->lesson_type == 'image') @php // $img = asset('uploads/lesson_file/attachment/' . $lesson_details->attachment); $img = route('course.get_file', ['course_id' => $lesson_details->course_id, 'lesson_id' => $lesson_details->id]) @endphp @elseif($lesson_details->lesson_type == 'document_type') @php $src = route('course.get_file', ['course_id' => $lesson_details->course_id, 'lesson_id' => $lesson_details->id]); $pdf_src = route('pdf_canvas', ['course_id' => $lesson_details->course_id, 'lesson_id' => $lesson_details->id]); $direct_pdf = $src; // URL langsung ke file PDF $fullscreen_id = 'lesson-content-' . $lesson_details->id; @endphp
@if ($lesson_details->attachment_type == 'pdf') {{ get_phrase('Open Full PDF') }} @elseif($lesson_details->attachment_type == 'txt') @else

{{ get_phrase('The document cannot be displayed directly.') }}

{{ get_phrase('Please download the file to view the contents of the document.') }}

{{ get_phrase('Download Document') }}
@endif
@elseif($lesson_details->lesson_type == 'quiz')
@include('course_player.quiz.index')
@elseif($lesson_details->lesson_type == 'project')
@include('course_player.project.index')
@else @endif @endif