@extends('layouts.main_dashboard.app') @php($routePrefix = auth()->user()?->usesStaffPortal() ? 'teacher' : 'admin') @section('styles') @endsection @section('title', __('dashboard.View Assignment') @section('page_heading', __('dashboard.View Assignment')) @section('breadcrumb') @endsection @section('content')

{{ $assignment->title }}

{{ __('dashboard.Description') }}

{!! nl2br(e($assignment->description)) !!}
@if($assignment->files->isNotEmpty())

{{ __('dashboard.Attached Files') }}

@foreach($assignment->files as $file)
{{ basename($file->file_path) }}
{{ __('dashboard.Download') }}
@if (Str::startsWith($file->type, 'video/')) @elseif (Str::startsWith($file->type, 'audio/')) @elseif ($file->type === 'application/pdf') @elseif (Str::startsWith($file->type, 'image/')) @else

{{ __('dashboard.Preview is not available for this file type.') }}

@endif
@endforeach
@endif

{{ __('dashboard.Summary') }}

{{ __('dashboard.Status') }}
@if($assignment->is_published) {{ __('dashboard.Published') }} @else {{ __('dashboard.Unpublished') }} @endif
{{ __('dashboard.Lesson') }}
{{ $assignment->lesson->title ?? 'N/A' }}
{{ __('dashboard.Due Date') }}
{{ $assignment->due_date->format('d M, Y H:i') }}
{{ __('dashboard.Score') }}
{{ $assignment->score }}
{{ __('dashboard.Weight') }}
{{ $assignment->weight }}
{{ __('dashboard.Submissions') }}
{{ $assignment->submissions->count() }}
@endsection