@forelse ($exam->questions as $index => $question)
@php $needsTarget = $question->question_type->requiresTarget(); $hasTarget = $needsTarget && $question->hasTargetAnnotation(); @endphp
{{ $index + 1 }}.
{{ $question->displayText() }}
View{{ $question->xrayView?->label() ?? '—' }}
Item{{ $question->itemOfInterest?->name ?? ($question->targetsAllItems() ? 'All items on view' : '—') }}
Type{{ $question->question_type->label() }}
@if ($question->question_type === \App\Enums\QuestionType::OkNotOk)
{{ $question->correct_answer?->label() ?? 'No expected answer' }}
@endif
Points{{ $question->points }}
@if ($needsTarget)
{{ $hasTarget ? 'Target set' : 'No target' }}
@endif
@unless ($question->is_required)
Optional
@endunless
@empty
@can('manageQuestions', $exam)
Open Question Builder
@endcan
@endforelse