@php $tenant = \App\Support\Facades\Tenancy::get(); $brandStyle = $tenant->brand_primary_color ? ":root { --color-brand-600: {$tenant->brand_primary_color}; } .dark { --color-brand-600: {$tenant->brand_primary_color}; }" : null; $navGroups = \App\Support\Navigation\StudentNav::groups('homework'); $isOverdue = $item->due_date && $item->due_date->isPast(); $tenantTimezone = $tenant->timezone ?? config('app.timezone'); $local = fn ($carbon) => $carbon?->copy()->setTimezone($tenantTimezone); @endphp Back to My Homework

{{ $item->title }}

{{ $item->isOnline() ? 'Online' : 'Exercise Book' }} @if($submission) Submitted @elseif($item->isOnline()) Action needed @endif

{{ $item->teacher->name }} @if($item->subject)  ·  {{ $item->subject->name }} @endif  ·  Posted {{ $item->created_at->format('M j, Y') }}

@if($item->due_date) {{ $isOverdue ? 'Was due' : 'Due' }} {{ $item->due_date->format('M j, Y') }} @endif

Instructions

{{ $item->description }}

@if($item->attachment_path)

Attachment

@if($item->attachmentIsImage()) Homework attachment @else View attached PDF @endif
@endif @if($item->isOnline())

Your Submission & Result

@if($submission)
Submitted {{ $local($submission->submitted_at)->format('M j, Y g:ia') }}
@if($submission->seen_at) Seen by teacher @endif
@if($submission->text_response)

{{ $submission->text_response }}

@endif @if($submission->file_path)
@if($submission->fileIsImage()) My submitted file @else View my attached file @endif
@endif @if($submission->mark !== null || $submission->feedback)
@if($submission->mark !== null)

Mark: {{ $submission->mark }} / 100

@endif @if($submission->feedback)

{{ $submission->feedback }}

@endif
@endif @php $isGraded = $submission->mark !== null; @endphp

{{ $submission->attempts }} of {{ \App\Models\HomeworkSubmission::MAX_ATTEMPTS }} submissions used

@if($isGraded)

Seen by teacher and graded — resubmission is closed.

@elseif($submission->hasAttemptsLeft()) @else

You've used all {{ \App\Models\HomeworkSubmission::MAX_ATTEMPTS }} submissions for this homework.

@endif @else

You haven't submitted this homework yet.

@endif @if(! $submission || ($submission->mark === null && $submission->hasAttemptsLeft()))
@csrf
File preview
@endif
@endif