You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
73 lines
4.0 KiB
73 lines
4.0 KiB
<view class="container">
|
|
<view class="question-list">
|
|
<block wx:for="{{exercise_questions}}" wx:for-item="question" wx:key="question_id">
|
|
<view class="question">
|
|
<text class="hint">第{{question.q_position}}题</text>
|
|
<rich-text class="question-title" nodes="{{question.question_title}}" space="nbsp"></rich-text>
|
|
<view wx:if="{{question.question_type==0 || question.question_type==2}}">
|
|
<radio-group class="choices" bindchange="answer_choice_question" data-question_id="{{question.question_id}}">
|
|
<block wx:for="{{question.question_choices}}" wx:for-item="choice" wx:key="choice_id" >
|
|
<radio disabled="{{exercise.user_exercise_status==1 || exercise.user_exercise_status==4}}" class="choice" checked="{{choice.user_answer_boolean}}" value="{{choice.choice_id}}">
|
|
<view class="choice">
|
|
<text class="choice-text">{{choice.choice_text}}</text>
|
|
<text wx:if="{{choice.standard_boolean}}" class="error standard-choice">正确答案</text>
|
|
</view>
|
|
</radio>
|
|
</block>
|
|
</radio-group>
|
|
</view>
|
|
<view wx:elif="{{question.question_type==1}}">
|
|
<checkbox-group class="choices" bindchange="answer_choice_question" data-question_id="{{question.question_id}}">
|
|
<block wx:for="{{question.question_choices}}" wx:for-item="choice" wx:key="choice_id">
|
|
<checkbox class="choice" disabled="{{exercise.user_exercise_status==1 || exercise.user_exercise_status==4}}" checked="{{choice.user_answer_boolean}}" value="{{choice.choice_id}}">
|
|
<view class="choice">
|
|
<text class="choice-text">{{choice.choice_text}}</text>
|
|
<text wx:if="{{choice.standard_boolean}}" class="error standard-choice">正确答案</text>
|
|
</view>
|
|
</checkbox>
|
|
</block>
|
|
</checkbox-group>
|
|
</view>
|
|
<view wx:elif="{{question.question_type==3}}">
|
|
<block wx:for="{{question.null_inputs}}" wx:for-item="null_input">
|
|
<view class="null-input flex-wrap">
|
|
<text class="hint">填空{{null_input.choice_id}}</text>
|
|
<input disabled="{{exercise.user_exercise_status==1 || exercise.user_exercise_status==4}}" class="null-input"
|
|
placeholder="输入填空{{null_input.choice_id}}答案"
|
|
data-question_id="{{question.question_id}}"
|
|
data-exercise_choice_id="{{null_input.choice_id}}"
|
|
value="{{null_input.answer_text}}"
|
|
bindblur="answer_null_question">
|
|
</input>
|
|
</view>
|
|
</block>
|
|
<view wx:if="{{question.standard_answer}}" class="standard-null-inputs">
|
|
<view class="standard-null-input flex-wrap" wx:for="{{question.standard_answer}}" wx:for-item="answer">
|
|
<text class="hint">第{{answer.choice_id}}空答案:</text>
|
|
<text class="error" style="padding-top: 12rpx;">{{answer.answer_text}}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view wx:elif="{{question.question_type==4}}">
|
|
<textarea disabled="{{exercise.user_exercise_status==1 || exercise.user_exercise_status==4}}" class="main-input"
|
|
placeholder="输入答案"
|
|
bindblur="answer_main_question"
|
|
value="{{question.user_answer[0]||''}}"
|
|
data-question_id="{{question.question_id}}">
|
|
</textarea>
|
|
<view wx:if="{{question.standard_answer}}" class="standard-main-input">
|
|
<text class="hint">参考答案:</text>
|
|
<text class="error">{{question.standard_answer[0]||'暂无'}}</text>
|
|
</view>
|
|
</view>
|
|
<view wx:elif="{{question.question_type==5}}">
|
|
<text class="hint">暂不支持实训题...</text>
|
|
</view>
|
|
</view>
|
|
</block>
|
|
</view>
|
|
</view>
|
|
<cover-view wx:if="{{exercise.user_exercise_status!=1 && exercise.user_exercise_status!=4}}" hidden="{{loading}}" class="foot flex-wrap" >
|
|
<button class="save operation" catchtap="save_exercise">保存</button>
|
|
<button class="commit operation" catchtap="commit_exercise">交卷</button>
|
|
</cover-view> |