@if (!empty($course->chapters) and count($course->chapters))
@foreach ($course->chapters as $chapter)

@if (!empty($chapter->chapterItems) and count($chapter->chapterItems)) @foreach ($chapter->chapterItems as $chapterItem) {{-- label these 1 2 3 4 5 to identify --}} @if ( $chapterItem->type == \App\Models\WebinarChapterItem::$chapterSession and !empty($chapterItem->session) and $chapterItem->session->status == 'active') @include( 'web.default.course.learningPage.components.content_tab.content', [ 'item' => $chapterItem->session, 'type' => 'session', ] ) @elseif( $chapterItem->type == \App\Models\WebinarChapterItem::$chapterFile and !empty($chapterItem->file) and $chapterItem->file->status == 'active') @include( 'web.default.course.learningPage.components.content_tab.content', [ 'item' => $chapterItem->file, 'type' => 'file', ] ) @elseif( $chapterItem->type == \App\Models\WebinarChapterItem::$chapterTextLesson and !empty($chapterItem->textLesson) and $chapterItem->textLesson->status == 'active') @include( 'web.default.course.learningPage.components.content_tab.content', [ 'item' => $chapterItem->textLesson, 'type' => 'text_lesson', ] ) {{-- @elseif( $chapterItem->type == \App\Models\WebinarChapterItem::$chapterAssignment and !empty($chapterItem->assignment) and $chapterItem->assignment->status == 'active') @include( 'web.default.course.learningPage.components.content_tab.assignment-content-tab', ['item' => $chapterItem->assignment] ) --}} @elseif( $chapterItem->type == \App\Models\WebinarChapterItem::$chapterQuiz and !empty($chapterItem->quiz) and $chapterItem->quiz->status == 'active') @include('web.default.course.learningPage.components.quiz_tab.quiz', [ 'item' => $chapterItem->quiz, 'type' => 'quiz', ]) @endif @endforeach @endif
@endforeach
@endif