<div class="ub-panel pb-question-view">
    <div class="head">
        第{{$questionItemNumber}}题 单选
    </div>
    <div class="body">

        <div class="question" data-question-type="singleChoice">
            <div class="question">
                {!! $questionItem['question']['question'] !!}
            </div>
            <div class="option">
                <?php $answers = []; ?>
                @foreach($questionItem['options'] as $index=>$option)
                    <div class="item" data-choice>
                        <div class="choice">{{chr(ord('A')+$index)}}.</div>
                        {!! $option['option'] !!}
                    </div>
                    <?php
                    if($option['isAnswer']){
                        $answers[]=chr(ord('A')+$index);
                    }
                    ?>
                @endforeach
            </div>
            <div class="answer-result">
                <div class="answer" data-answer>
                    <div class="answer-head"><i class="ub-icon-gavel"></i> 答案</div>
                    <div class="answer-body ub-html">
                        @if(empty($answers))
                            <div class="empty">无</div>
                        @else
                            {{join('，',$answers)}}
                        @endif
                    </div>
                </div>
                <div class="my-answer">
                    @if(\Module\Paper\Util\PaperExamUtil::isCorrect($questionItem['options'],$paperExamQuestions[$paperQuestionIndex]['answer'][$questionItemIndex]))
                        <div class="ub-alert ub-alert-success">
                            <div class="label">我的答案</div>
                            {{\Module\Paper\Util\PaperExamUtil::optionToAnswerLabel($paperExamQuestions[$paperQuestionIndex]['answer'][$questionItemIndex])}}
                        </div>
                    @else
                        <div class="ub-alert ub-alert-danger">
                            <div class="label">我的答案</div>
                            {{\Module\Paper\Util\PaperExamUtil::optionToAnswerLabel($paperExamQuestions[$paperQuestionIndex]['answer'][$questionItemIndex])}}
                        </div>
                    @endif
                </div>
            </div>
        </div>

    </div>
</div>
