{{-- Sidebar Navigation --}} {{-- Main Content --}}
{{-- Course Selection Card --}}

اختيار الدورة

@if($selectedCourseId) {{-- VIEW: LIST --}} @if($currentView === 'list')

البحث والتصفية

إجمالي الدروس: {{ $contents->total() }}

قائمة الدروس - {{ $selectedCourse->title ?? '' }}

@if($contents->count() > 0)
@foreach($contents as $content) @php $attachments = json_decode($content->attachments ?? '[]', true) ?: []; @endphp
{{ $content->title }} {{ $this->getContentTypeLabel($content->content_type) }} @if($content->require_pass) يتطلب نجاح @endif
الترتيب: {{ $content->sort_order }} @if($content->video_url) فيديو متاح @endif @if(count($attachments) > 0) {{ count($attachments) }} مرفق @endif @if($content->content_type === 'quiz') {{ $this->getQuestionsCount($content->id) }} سؤال @endif
@if(count($attachments) > 0)
@foreach(array_slice($attachments, 0, 5) as $attachment) {{ $attachment['title'] ?? basename($attachment['path']) }} @endforeach @if(count($attachments) > 5) +{{ count($attachments) - 5 }} أخرى @endif
@endif
@if($content->content_type === 'quiz') @endif
@if($content->content_type === 'quiz') @php $questions = $this->getQuestionsForContent($content->id); @endphp @if($questions->count() > 0)
أسئلة الاختبار ({{ $questions->count() }})
@foreach($questions->take(3) as $q)
{{ $q->sort_order }} {{ Str::limit($q->question_text, 60) }}
@endforeach @if($questions->count() > 3) @endif
@endif @endif
@endforeach
{{ $contents->links() }}
@else

لا توجد دروس في هذه الدورة

@endif
@endif {{-- VIEW: ADD/EDIT LESSON --}} @if(in_array($currentView, ['add_lesson', 'edit_lesson']))

{{ $editingLessonId ? 'تعديل الدرس' : 'إضافة درس جديد' }}

{{-- Basic Info --}}
@error('lessonTitle'){{ $message }}@enderror
{{-- Content Type & Require Pass --}}
{{-- Video Section --}} @if($lessonContentType === 'video')

إعدادات الفيديو

MP4, MOV, AVI - بدون حد للحجم @if($videoFile)
تم اختيار: {{ $videoFile->getClientOriginalName() }}
@endif
جاري الرفع...
@if($lessonVideoUrl)
@endif
@endif {{-- Text/HTML Content --}} @if(in_array($lessonContentType, ['text', 'quiz']))

المحتوى النصي (HTML) - اختياري

@if($lessonInfo)
{!! $lessonInfo !!}
@endif
@endif {{-- QUIZ QUESTIONS SECTION --}} @if($lessonContentType === 'quiz')

أسئلة الاختبار ({{ count($quizQuestions) }})

{{-- Added Questions List --}} @if(count($quizQuestions) > 0)
@foreach($quizQuestions as $index => $q)
{{ $q['sort_order'] }}

{{ $q['question_text'] }}

{{ $this->getQuestionTypeLabel($q['question_type']) }} @if(!empty($q['options'])) {{ count($q['options']) }} خيارات @endif @if(!empty($q['correct_answer'])) الإجابة محددة @endif
@endforeach
@endif {{-- Add/Edit Question Form --}}
{{ $editingQuestionIndex !== null ? 'تعديل السؤال' : 'إضافة سؤال جديد' }}
{{-- Question Text --}}
@error('questionText'){{ $message }}@enderror
{{-- Question Type --}}
{{-- Options for Choice Questions --}} @if(in_array($questionType, ['single_choice', 'multiple_choice']))
@foreach($questionOptions as $optIndex => $option)
@if(count($questionOptions) > 2) @endif
@endforeach
@endif {{-- True/False --}} @if($questionType === 'true_false')
@endif {{-- Add Question Button --}}
@if($editingQuestionIndex !== null) @endif
@endif {{-- Attachments Section --}}

المرفقات

@if(count($lessonAttachments) > 0)
@foreach($lessonAttachments as $attIndex => $attachment)
{{ $attachment['path'] }}
@endforeach
@endif
يمكنك اختيار ملفات متعددة
جاري الرفع...
@if($newAttachments && count($newAttachments) > 0)
@foreach($newAttachments as $newAttIndex => $file)
{{ $file->getClientOriginalName() }}
@endforeach
@endif
{{-- Save Buttons --}}
@endif {{-- VIEW: QUIZ MANAGE (Standalone) --}} @if($currentView === 'quiz_manage')

إدارة أسئلة: {{ $quizContentTitle }}

@php $questions = $this->getQuestionsForContent($quizContentId); @endphp @if($questions->count() > 0)
@foreach($questions as $question)
{{ $question->sort_order }}

{{ $question->question_text }}

{{ $this->getQuestionTypeLabel($question->question_type) }} @php $options = json_decode($question->options ?? '[]', true); @endphp @if($options) {{ count($options) }} خيارات @endif
@if($question->explanation)
{{ Str::limit($question->explanation, 100) }}
@endif
@endforeach
@else

لا توجد أسئلة في هذا الاختبار

@endif
@endif {{-- VIEW: ADD/EDIT QUESTION (Standalone) --}} @if(in_array($currentView, ['add_question', 'edit_question']))

{{ $editingQuestionId ? 'تعديل السؤال' : 'إضافة سؤال جديد' }}

{{-- Question Text --}}
@error('questionText'){{ $message }}@enderror
{{-- Question Type & Sort --}}
{{-- Options for Choice Questions --}} @if(in_array($questionType, ['single_choice', 'multiple_choice']))
@foreach($questionOptions as $optIdx => $option)
@if(count($questionOptions) > 2) @endif
@endforeach
حدد الإجابة الصحيحة بالضغط على الدائرة/المربع
@endif {{-- True/False --}} @if($questionType === 'true_false')
@endif {{-- Save --}}
@endif @else {{-- No Course Selected --}}

اختر دورة لعرض محتواها

قم باختيار دورة من القائمة أعلاه لإدارة دروسها ومحتواها

@endif
@push('scripts') @endpush