装 订 线 内 不 要 答 题
一、选择题
@if(count($questions['choice']) > 0)
(本大题共 {{ count($questions['choice']) }} 小题,每小题 {{ $questions['choice'][0]->score ?? 5 }} 分,共 {{ count($questions['choice']) * ($questions['choice'][0]->score ?? 5) }} 分)
@else
(本大题共 0 小题,共 0 分)
@endif
@if(count($questions['choice']) > 0)
@foreach($questions['choice'] as $index => $q)
{{ $index + 1 }}.
@math($q->content)
@if(isset($q->options) && !empty($q->options))
@foreach($q->options as $optIndex => $option)
{{ chr(65 + $optIndex) }}. {{ $option }}
@endforeach
@endif
@endforeach
@else
@endif
二、填空题
@if(count($questions['fill']) > 0)
(本大题共 {{ count($questions['fill']) }} 小题,每小题 {{ $questions['fill'][0]->score ?? 5 }} 分,共 {{ count($questions['fill']) * ($questions['fill'][0]->score ?? 5) }} 分)
@else
(本大题共 0 小题,共 0 分)
@endif
@if(count($questions['fill']) > 0)
@foreach($questions['fill'] as $index => $q)
{{ $index + 1 }}.
@math(str_replace('__________', '', $q->content))
@endforeach
@else
@endif
三、解答题
@if(count($questions['answer']) > 0)
(本大题共 {{ count($questions['answer']) }} 小题,共 {{ array_sum(array_column($questions['answer'], 'score')) }} 分。解答应写出文字说明、证明过程或演算步骤)
@else
(本大题共 0 小题,共 0 分)
@endif
@if(count($questions['answer']) > 0)
@foreach($questions['answer'] as $index => $q)
{{ $index + 1 }}.
({{$q->score}}分) @math($q->content)
@endforeach
@else
@endif