@if (session('success'))
{{ session('success') }}
@endif
๐Ÿ“

Assignment: {{ $assignment->title }}

Due Date: {{ $assignment->due_date ? $assignment->due_date->format('d M Y') : 'No due date' }}
Submission Status: @if ($submission) โœ“ Submitted @else ร— Not Submitted @endif
Time Remaining: @php $isExpired = $assignment->due_date && $assignment->due_date->isPast(); @endphp @if ($isExpired) Expired @elseif($assignment->due_date) {{ now()->diffForHumans($assignment->due_date, true) }} remaining @else No deadline @endif
Grading Status: @if ($submission && $submission->status === 'marked') โœ“ Graded @else โœ— Not Graded @endif
@if ($assignment->assignmentFiles && $assignment->assignmentFiles->count() > 0)
Assignment Files:
@foreach($assignment->assignmentFiles as $file)
๐Ÿ“Ž {{ $file->original_filename }} View/Download
@endforeach
@endif @if ($assignment->description)

Description

{{ $assignment->description }}

@endif @if ($submission && $submission->submissionFiles->count() > 0) @endif @if (Auth::user()->role === 'lecturer' && $submission)

๐Ÿ“ Grade Submission

@csrf
Maximum file size: 2MB per file (PDF, DOC, DOCX, TXT, RTF, ODT, JPG, JPEG, PNG, GIF)
@if($submission->feedbackFiles && $submission->feedbackFiles->count() > 0)
Previously Uploaded Feedback Files:
@foreach($submission->feedbackFiles as $file)
๐Ÿ“Ž {{ $file->original_filename }}
{{ number_format($file->file_size / 1024, 2) }} KB
@endforeach
@endif
Current Grade: {{ $submission->score ?? '' }} / 100 @if ($submission->grade) Letter Grade: {{ $submission->grade }} @else Letter Grade: @endif
@if ($submission->marked_at) Marked on: {{ $submission->marked_at->format('M d, Y g:ia') }} @endif
@endif @if (Auth::user()->role === 'student' && $submission && $submission->status === 'marked')

Your Grade

Score
{{ $submission->score ?? 'N/A' }} / 100
@if ($submission->grade)
Letter Grade
{{ $submission->grade }}
@endif
@if ($submission->marked_at)
Marked on: {{ $submission->marked_at->format('M d, Y g:ia') }}
@endif
๐Ÿ’ฌ Lecturer Feedback:
@if($submission->lecturer_feedback)
{{ $submission->lecturer_feedback }}
@else
No text feedback provided.
@endif @if($submission->feedbackFiles && $submission->feedbackFiles->count() > 0)
๐Ÿ“ Feedback Files:
@foreach($submission->feedbackFiles as $file)
๐Ÿ“Ž
{{ $file->original_filename }} {{ number_format($file->file_size / 1024, 2) }} KB
View/Download
@endforeach
@endif
@endif @if (Auth::user()->role === 'student' && (!$submission || $submission->status !== 'marked'))
@csrf
Maximum file size: 20MB per file (PDF, DOC, DOCX, TXT, RTF, ODT)
@endif @if (Auth::user()->role === 'lecturer' && !$submission)

No submissions yet for this assignment.

@endif

Questions & Feedback

@if (Auth::user()->role === 'student') Ask your lecturer questions or share notes about this assignment. Only you and your lecturer can see this conversation. @else Answer the student's questions and guide them on this assignment. Only you and this student can see this conversation. @endif
@if ($submission && $submission->submissionComments->count() >= 2) @endif
@if ($submission && $submission->submissionComments->count() > 0) @php $latestComments = $submission->submissionComments->take(2); @endphp @foreach ($latestComments as $comment)
{{ $comment->user->role === 'lecturer' ? 'Lecturer' : (Auth::id() === $comment->user->id ? 'You' : 'Student') }}: {{ $comment->user->name }} {{ ucfirst($comment->user->role) }}
{{ $comment->comment }}
{{ $comment->created_at->format('M d, Y g:ia') }}
@endforeach @else
No comments yet. @if (Auth::user()->role === 'student') Use the box below to ask your first question about this assignment. @else Once the student comments here, you can reply to support them. @endif
@endif
@if ($submission || Auth::user()->role === 'student')
@csrf @if (Auth::user()->role === 'lecturer' && isset($submission)) @endif
@else
No submission available. Comments can be added once a student submits their assignment.
@endif