{{ $opt->answer }}
{{ __('Submission Details') }}
{{-- Header meta --}}
{{-- Questions table --}}
{{-- /card-body --}}
{{ __('Exam') }}:
{{ $submission->exam->title ?? ('#'.$submission->exam_id) }}
{{ __('Student') }}:
{{ $submission->student->name ?? '-' }}
{{ __('Submitted At') }}:
{{ $submission->updated_at }}
{{-- Questions table --}}
| # | {{ __('Question') }} |
|---|---|
| {{ $idx + 1 }} |
{{ $q->question_text ?? '-' }}
@if($questionImg)
{{ __('Choices') }}:
@foreach ($q->options as $opt)
@php
$isCorrect = (bool) $opt->is_correct;
$isChosen = (string)$opt->id === $studentOptionId;
$optImg = $opt->getFirstMediaUrl('answers_image') ?? null;
$class = '';
if($isCorrect){
$class = 'highlight-correct';
} elseif($isChosen && !$isCorrect){
$class = 'highlight-wrong';
}
@endphp
@elseif(!$isMcq && !empty($q->answer))
{{-- Non-MCQ answer --}}
@if($optImg)
@endforeach
{{ __('Correct Answer') }}:
{{ $q->answer }}
@if($row->answer)
{{ __('Student Answer') }}:
{{ $row->answer }}
@endif
@endif
|