{{ __('Question Details') }}

{{ $question->category->name ?? 'No Category' }} {{ $question->getTypeLabel() }}
{{ $question->is_active ? 'Active' : 'Inactive' }}

Question Text

{{ $question->question_text }}

Weight
{{ $question->weight }}
Order
{{ $question->order }}
Difficulty
{{ ucfirst($question->difficulty_level) }}
Required
{{ $question->is_required ? 'Yes' : 'No' }}
@if($question->options)

Question Configuration

@if($question->question_type === 'multiple_choice')

Options:

@foreach($question->options as $index => $option)
{{ chr(65 + $index) }} {{ $option }} @if($question->correct_answer === $option) Correct @endif
@endforeach
@elseif($question->question_type === 'scale')
Range: {{ $question->options['min'] ?? 1 }} - {{ $question->options['max'] ?? 5 }}
@if(isset($question->options['labels']) && !empty(array_filter($question->options['labels'])))
Scale Labels:
@foreach($question->options['labels'] as $value => $label) @if($label)
{{ $value }}: {{ $label }}
@endif @endforeach
@endif
@elseif($question->question_type === 'boolean')
True Label: {{ $question->options['true_label'] ?? 'Ya' }} @if($question->correct_answer === '1') Correct @endif
False Label: {{ $question->options['false_label'] ?? 'Tidak' }} @if($question->correct_answer === '0') Correct @endif
@endif
@endif @if($question->explanation)

Explanation

{{ $question->explanation }}

@endif

Interactive Preview

{{ $question->question_text }}

@if($question->is_required) * @endif
@if($question->question_type === 'multiple_choice' && $question->options)
@foreach($question->options as $index => $option) @endforeach
@elseif($question->question_type === 'scale' && $question->options) @php $min = $question->options['min'] ?? 1; $max = $question->options['max'] ?? 5; $labels = $question->options['labels'] ?? []; @endphp
{{ $min }}
@for($i = $min; $i <= $max; $i++) @endfor
{{ $max }}
@elseif($question->question_type === 'boolean' && $question->options)
@elseif($question->question_type === 'text') @endif
Preview mode - interactions disabled
@if($question->explanation) @endif
@if($question->explanation) @endif

Technical Details

Question ID
{{ $question->id }}
Category
{{ $question->category->name ?? 'No Category' }}
Target Role
{{ $question->category->target_role ?? 'N/A' }}
Has Correct Answer
{{ $question->correct_answer ? 'Yes' : 'No' }}
Created
{{ $question->created_at->format('M d, Y H:i') }}
Last Updated
{{ $question->updated_at->format('M d, Y H:i') }}
Times Used
{{ $question->assessmentAnswers->count() ?? 0 }} times
@if($question->metadata)
Metadata
View JSON
{{ json_encode($question->metadata, JSON_PRETTY_PRINT) }}
@endif
Edit Question
@csrf
@if($question->assessmentAnswers->count() === 0)
@csrf @method('DELETE')
@else
Cannot delete: Question has been used in {{ $question->assessmentAnswers->count() }} assessments
@endif