@extends('teacher.teacher_dashboard') @section('admin')
{{-- Breadcrumb --}}
{{-- Top Actions --}} {{-- Details Box --}}
Homework Info

{{ $homework->title }}

@if($homework->description)

{!! nl2br(e($homework->description)) !!}

@else

No description provided.

@endif
{{ $homework->subject->name ?? '-' }}
{{ $homework->class->name ?? '-' }}
{{ $homework->section->name ?? '-' }}
{{ \Carbon\Carbon::parse($homework->due_date)->format('d M Y') }}
@if($homework->attachment) @else

Attachment: None

@endif
{{-- Submission List Box --}}
Student Submissions
@forelse($submissions as $key => $sub) @empty @endforelse
SL Student Status Submitted At File Marks Action
{{ $key + 1 }} {{ $sub->student->student_name_english ?? '-' }} {{ ucfirst($sub->status) }} {{ $sub->submitted_at ? \Carbon\Carbon::parse($sub->submitted_at)->format('d M Y h:i A') : '-' }} @if($sub->submission_file) @else No file @endif
@csrf
@if(!is_null($sub->marks)) Marked @else Pending @endif
No submissions yet
{{-- Optional: if submissions is paginated --}} @if(method_exists($submissions, 'links'))

@if($submissions->total() > 0) Page {{ $submissions->currentPage() }} of {{ $submissions->lastPage() }}, showing {{ $submissions->count() }} records out of {{ $submissions->total() }} total @else Showing 0 records @endif

{{ $submissions->appends(request()->query())->links() }}
@endif
@endsection @section('customjs') {{-- Optional custom JS here --}} @endsection