@extends('layouts.app') @section('admin_title', 'Topics — ' . $course->coursename) @section('content') @php $backType = ($course->course_type ?? 'curriculum') === 'skill' ? 'skill' : 'curriculum'; $bulkReport = session('bulk_report'); @endphp
@if($errors->any())
@endif @if(session('error'))
{{ session('error') }}
@endif

{{ $course->coursename }}

{{ $course->coursecode }}

@if($course->university) {{ $course->university->uname }} · @endif {{ $modules->count() }} Module(s) · {{ $topics->total() }} Topic(s)

Modules Courses
@if($bulkReport)
Bulk Upload Summary
Total: {{ $bulkReport['total'] }} Uploaded: {{ $bulkReport['uploaded'] }} Duplicates: {{ $bulkReport['duplicates'] }} Invalid: {{ $bulkReport['invalid'] }}
@if(!empty($bulkReport['skipped']))
View Skipped Rows ({{ count($bulkReport['skipped']) }})
@foreach($bulkReport['skipped'] as $s) @endforeach
Row Module Topic Reason
#{{ $s['row'] }} {{ $s['module'] }} {{ $s['topic'] }} {{ $s['reason'] }}
@endif
@endif @if($modules->isNotEmpty())
All Modules @foreach($modules as $m) {{ $m->module }} @endforeach
@endif
Showing {{ $topics->total() }} topic(s)
@if($moduleFilter) @endif @if($search !== '' || $moduleFilter) Clear @endif
@forelse($topics as $idx => $t) @empty @endforelse
S.No Module Topic Name Actions
{{ ($topics->currentPage() - 1) * $topics->perPage() + $idx + 1 }} {{ $t->module_name ?? 'N/A' }} {{ $t->topic }}
@csrf @method('DELETE')
No topics found yet. Click Add Topic or Bulk Upload Excel above to get started.
{{ $topics->links() }}

Add Topic

@if($modules->isEmpty())
Please add at least one module to this course first.
Go to Modules
@else
@csrf
@endif

Bulk Upload Topics

Upload Excel (.xlsx) or CSV (.csv) with automatic duplicate checking.

Need the exact format? Download Sample Template
@csrf
Your Excel/CSV only needs a single topic column — University ID, Course ID, and Module ID are stored automatically.

Edit Topic

@csrf @method('PUT')
@endsection