@foreach ($questions as $n => $q) @php $optOrder = array_keys($q->options ?? []); if ($shuffleOptions ?? false) shuffle($optOrder); @endphp
{{ __('第 :n 題(:t)', ['n' => $n + 1, 't' => __(['single'=>'單選','multiple'=>'複選','boolean'=>'是非','fill'=>'填充','order'=>'排序'][$q->type])]) }}

{{ $q->body }}

@switch($q->type) @case('single') @foreach ($optOrder as $i)@php $o = $q->options[$i]; @endphp @endforeach @break @case('multiple') @foreach ($optOrder as $i)@php $o = $q->options[$i]; @endphp @endforeach @break @case('boolean') @break @case('fill') @break @case('order') @foreach ($q->options as $pos => $_)
{{ __('第 :n 步', ['n' => $pos + 1]) }}
@endforeach @break @endswitch
@endforeach