dev_partners
cxt 6 years ago
parent efa4020aa3
commit 4c2d678253

@ -448,7 +448,7 @@ class ExerciseController < ApplicationController
def update_exercise_question def update_exercise_question
@exercise_question = ExerciseQuestion.find params[:exercise_question] @exercise_question = ExerciseQuestion.find params[:exercise_question]
@exercise_question.question_title = params[:question_title].nil? || params[:question_title].empty? ? l(:label_enter_single_title) : params[:question_title] @exercise_question.question_title = params[:question_title].nil? || params[:question_title].empty? ? l(:label_enter_single_title) : params[:question_title]
@exercise_question.question_score = params[:question_score] @exercise_question.question_score = params[:question_score] if @exercise_question.question_type != 5
# 处理选项:如果选了某个选项,那么则要删除之前的选项 # 处理选项:如果选了某个选项,那么则要删除之前的选项
if params[:question_answer] if params[:question_answer]
@exercise_question.exercise_choices.each do |answer| @exercise_question.exercise_choices.each do |answer|

@ -51,7 +51,7 @@
</li> </li>
<li class="clearfix mb20"> <li class="clearfix mb20">
<label class="panel-form-label fl"><span class="mr10">分值</span></label> <label class="panel-form-label fl"><span class="mr10">分值</span></label>
<input id="poll_question_score_<%=exercise_question.id %>" value="<%=exercise_question.question_score %>" type="text" class="with10 mr5 pl10 fl panel-box-sizing task-height-40" name="question_score"> <input id="poll_question_score_<%=exercise_question.id %>" value="<%=exercise_question.question_score.round %>" type="text" class="with10 mr5 pl10 fl panel-box-sizing task-height-40" name="question_score">
<label class="fl" style="line-height: 40px;">分</label> <label class="fl" style="line-height: 40px;">分</label>
<p class="fr"> <p class="fr">
<span class="font-12 color-grey mb10" style="display: block;">温馨提示:[单选题]属于客观题将由系统自动评分,请设置标准答案</span> <span class="font-12 color-grey mb10" style="display: block;">温馨提示:[单选题]属于客观题将由系统自动评分,请设置标准答案</span>

@ -56,7 +56,7 @@
<li class="clearfix mb20"> <li class="clearfix mb20">
<label class="panel-form-label fl"><span class="mr10">分值</span></label> <label class="panel-form-label fl"><span class="mr10">分值</span></label>
<input id="poll_question_score_<%=exercise_question.id %>" value="<%=exercise_question.question_score %>" type="text" name="question_score" class="with10 mr5 fl pl10 panel-box-sizing task-height-40" /> <input id="poll_question_score_<%=exercise_question.id %>" value="<%=exercise_question.question_score.round %>" type="text" name="question_score" class="with10 mr5 fl pl10 panel-box-sizing task-height-40" />
<label class="fl" style="line-height: 40px;">分</label> <label class="fl" style="line-height: 40px;">分</label>
<p class="fr"> <p class="fr">
<span class="font-12 color-grey mb10" style="display: block;">温馨提示:[多选题]属于客观题将由系统自动评分,请设置标准答案</span> <span class="font-12 color-grey mb10" style="display: block;">温馨提示:[多选题]属于客观题将由系统自动评分,请设置标准答案</span>

@ -23,7 +23,7 @@
</li> </li>
<li class="clearfix mb20"> <li class="clearfix mb20">
<label class="panel-form-label fl"><span class="mr10">分值</span></label> <label class="panel-form-label fl"><span class="mr10">分值</span></label>
<input id="poll_question_score_<%=exercise_question.id %>" value="<%=exercise_question.question_score %>" type="text" name="question_score" class="with10 mr5 pl10 fl panel-box-sizing task-height-40" /> <input id="poll_question_score_<%=exercise_question.id %>" value="<%=exercise_question.question_score.round %>" type="text" name="question_score" class="with10 mr5 pl10 fl panel-box-sizing task-height-40" />
<label class="fl" style="line-height: 40px;">分</label> <label class="fl" style="line-height: 40px;">分</label>
<p class="fr"> <p class="fr">
<span class="font-12 color-grey" style="display: block;">温馨提示:[简答题]属于主观题需要人工评分,未作答的情况下系统将自动评分</span> <span class="font-12 color-grey" style="display: block;">温馨提示:[简答题]属于主观题需要人工评分,未作答的情况下系统将自动评分</span>

@ -18,7 +18,7 @@
<span class="option-item fr ml6 color-grey select-choice" data-tip-left="第<%= index + 1 %>关"><%= index + 1 %></span> <span class="option-item fr ml6 color-grey select-choice" data-tip-left="第<%= index + 1 %>关"><%= index + 1 %></span>
</label> </label>
<span class="fl ml20 mt6 with75 task-hide" style="display: block;"><%= exercise_challenge.challenge.subject %></span> <span class="fl ml20 mt6 with75 task-hide" style="display: block;"><%= exercise_challenge.challenge.subject %></span>
<input value="<%= exercise_challenge.question_score %>" type="text" class="with10 ml15 mr5 pl10 fl panel-box-sizing task-height-40" name="question_score[]" /> <input value="<%= exercise_challenge.question_score.round %>" type="text" class="with10 ml15 mr5 pl10 fl panel-box-sizing task-height-40" name="question_score[]" />
<label class="fl" style="line-height: 40px;">分</label> <label class="fl" style="line-height: 40px;">分</label>
</li> </li>
<div class="cl"></div> <div class="cl"></div>

@ -46,7 +46,7 @@
<li class="clearfix mb20"> <li class="clearfix mb20">
<label class="panel-form-label fl"><span class="mr10">分值</span></label> <label class="panel-form-label fl"><span class="mr10">分值</span></label>
<input id="poll_question_score_<%=exercise_question.id %>" value="<%=exercise_question.question_score %>" type="text" name="question_score" class="with10 mr5 fl pl10 panel-box-sizing task-height-40"> <input id="poll_question_score_<%=exercise_question.id %>" value="<%=exercise_question.question_score.round %>" type="text" name="question_score" class="with10 mr5 fl pl10 panel-box-sizing task-height-40">
<label class="fl" style="line-height: 40px;">分</label> <label class="fl" style="line-height: 40px;">分</label>
<p class="fr"> <p class="fr">
<span class="font-12 color-grey mb10" style="display: block;">温馨提示:[填空题]属于客观题将由系统自动评分,请设置标准答案</span> <span class="font-12 color-grey mb10" style="display: block;">温馨提示:[填空题]属于客观题将由系统自动评分,请设置标准答案</span>

Loading…
Cancel
Save