Course Content
@foreach ($course->chapters as $chapter) @if ( !empty($chapter->chapterItems) and count($chapter->chapterItems) or !empty($chapter->quizzes) and count($chapter->quizzes))

@if (!empty($chapter->chapterItems) and count($chapter->chapterItems)) @foreach ($chapter->chapterItems as $chapterItem) @if ( $chapterItem->type == \App\Models\WebinarChapterItem::$chapterSession and !empty($chapterItem->session) and $chapterItem->session->status == 'active') @include('web.default.course.tabs.contents.sessions', [ 'session' => $chapterItem->session, 'accordionParent' => 'chaptersAccordion', ]) @elseif( $chapterItem->type == \App\Models\WebinarChapterItem::$chapterFile and !empty($chapterItem->file) and $chapterItem->file->status == 'active') @include('web.default.course.tabs.contents.files', [ 'file' => $chapterItem->file, 'accordionParent' => 'chaptersAccordion', ]) @elseif( $chapterItem->type == \App\Models\WebinarChapterItem::$chapterTextLesson and !empty($chapterItem->textLesson) and $chapterItem->textLesson->status == 'active') @include('web.default.course.tabs.contents.text_lessons', [ 'textLesson' => $chapterItem->textLesson, 'accordionParent' => 'chaptersAccordion', ]) @elseif( $chapterItem->type == \App\Models\WebinarChapterItem::$chapterAssignment and !empty($chapterItem->assignment) and $chapterItem->assignment->status == 'active') @include('web.default.course.tabs.contents.assignment', [ 'assignment' => $chapterItem->assignment, 'accordionParent' => 'chaptersAccordion', ]) @elseif( $chapterItem->type == \App\Models\WebinarChapterItem::$chapterQuiz and !empty($chapterItem->quiz) and $chapterItem->quiz->status == 'active') @include('web.default.course.tabs.contents.quiz', [ 'quiz' => $chapterItem->quiz, 'accordionParent' => 'chaptersAccordion', ]) @endif @endforeach @endif
@endif @endforeach