41 lines
2.5 KiB
Plaintext
41 lines
2.5 KiB
Plaintext
<% if exercise.id %>
|
|
<div nhname="new_exercise_mc_q">
|
|
<%= form_for(ExerciseQuestion.new,
|
|
:html => { :multipart => true },
|
|
:url=>create_exercise_question_exercise_path(exercise.id),
|
|
:remote=>true ) do |f| %>
|
|
<div class="user_bg_shadow bor-grey-e pl15 pr30 mb20 answer_Temp" id="answer_Temp">
|
|
<p class="fl mt15 font-16 mb10">简答题</p>
|
|
<input name="question_type" value="4" type="hidden">
|
|
<input name="quest_id" id="quest_id" value="0" type="hidden">
|
|
<li class="clearfix pr mb20">
|
|
<label class="panel-form-label fl"><span class="mr10">题目</span></label>
|
|
<textarea id="poll_questions_title" name="question_title" class="panel-form-width2-690 fl panel-box-sizing undis"></textarea>
|
|
</li>
|
|
<li class="clearfix pr mb20">
|
|
<label class="panel-form-label fl"><span class="fr mr10 color-grey" name="option_spans">参考答案</span></label>
|
|
<textarea class="fl panel-box-sizing with90 task-height-150 pl5 pt5" name="exercise_choice" placeholder="如有参考答案,请输入参考答案"></textarea>
|
|
</li>
|
|
<li class="clearfix mb20">
|
|
<% score = exercise.exercise_questions.where("question_type=4").last.nil? ? "": exercise.exercise_questions.where("question_type=4").last.question_score %>
|
|
<label class="panel-form-label fl"><span class="mr10">分值</span></label>
|
|
<input id="question_score" value="<%=score %>" type="text" name="question_score" class="with10 mr5 pl10 fl panel-box-sizing task-height-40" />
|
|
<label class="fl" style="line-height: 40px;">分</label>
|
|
<p class="fr">
|
|
<span class="font-12 color-grey" style="display: block;">温馨提示:[简答题]属于主观题需要人工评分,未作答的情况下系统将自动评分</span>
|
|
<span class="font-12 color-grey mb10 ml50" style="display: block;"> 参考答案仅作为人工评分的参考</span>
|
|
<a href="javascript:void(0)" class="fr task-btn task-btn-orange" id="add_new_question">保存</a>
|
|
<a href="javascript:void(0)" class="fr task-btn mr10" onclick="$(this).parent().parent().parent().parent().parent().remove();">取消</a>
|
|
</p>
|
|
</li>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
<% end %>
|
|
<script type="text/javascript">
|
|
$(function(){
|
|
$("#add_new_question").one('click', function(){
|
|
add_ex_question($(this),4);
|
|
});
|
|
});
|
|
</script> |