@extends('layouts.app') @section('title', 'Course Builder') @section('content') @include('partials.flash') @php $moduleTypes = \App\Models\CourseModule::TYPES; $qTypes = \App\Models\CourseQuestion::TYPES; @endphp
arrow_back Courses

{{ $course->title }}

{{ $course->modules->count() }} modules · Build the learning path and question banks

image Images insights Tracking settings Course settings
{{-- Bulk import modules --}}

upload_file Import modules

Bulk-create modules, content blocks and questions from a JSON file.

download Sample JSON
{{-- Add module --}}

add_circle Add module

@csrf
{{-- Modules (each card has its own edit/question forms, so the list must NOT be wrapped in a form) --}}

Modules

@forelse($course->modules as $module) @php $isAssessment = in_array($module->module_type, ['knowledge_check','final_assessment'], true); @endphp
{{ $loop->iteration }}

{{ $module->title }}

{{ $moduleTypes[$module->module_type] ?? $module->module_type }} @if($isAssessment) · {{ $module->questions->count() }} questions · pass {{ $module->pass_mark }}% @endif

@unless($isAssessment) edit_note Content ({{ $module->blocks->count() }}) @endunless
{{-- Edit module settings --}} {{-- Question bank (assessments only) --}} @if($isAssessment)

Question bank ({{ $module->questions->count() }})

@forelse($module->questions as $q)
help

{{ $q->text }}

{{ $qTypes[$q->type] ?? $q->type }} · {{ $q->points }} pt{{ $q->points>1?'s':'' }}

    @foreach($q->options as $opt)
  • {{ $opt->is_correct ? 'check_circle' : 'radio_button_unchecked' }}{{ $opt->text }}
  • @endforeach
@csrf @method('DELETE')
@empty

No questions yet — add some to build this assessment.

@endforelse {{-- Add question form --}}
@endif
@empty
library_books

No modules yet

Add your first module above to start building this course.

@endforelse
{{-- Standalone forms kept OUTSIDE the module list so nothing is nested --}} @foreach($course->modules as $module) @endforeach @endsection