60 lines
3.4 KiB
Plaintext
60 lines
3.4 KiB
Plaintext
<%= form_for(ExerciseQuestion.new,
|
||
:html => { :multipart => true },
|
||
:url=>create_exercise_question_exercise_path(exercise.id),
|
||
:remote=>true ) do |f| %>
|
||
<div class="questionContainer">
|
||
<div class="mb10 ur_item">
|
||
<% score = exercise.exercise_questions.where("question_type=3").last.nil? ? "": exercise.exercise_questions.where("question_type=3").last.question_score %>
|
||
<label class="ml36">分值<span class="ur_index"></span>: </label>
|
||
<input id="question_score" value="<%=score %>" type="text" name="question_score" style="width:60px; text-align:center; padding-left:0px;">分
|
||
<div class="cl"></div>
|
||
</div>
|
||
<div class="ur_editor_title">
|
||
<label class="questionLabel mt8 ml36">问题: </label>
|
||
<input name="question_type" value="3" type="hidden">
|
||
<textarea maxlength="250" style="width: 608px;" class="questionTitle" name="question_title" id="poll_questions_title" placeholder="请输入填空题的题干(注意:目前仅支持一个空)" type="text" oninput="autoHeight('#poll_questions_title',30)"></textarea>
|
||
</div>
|
||
<div class="ur_editor_content" id="new_single">
|
||
<ul>
|
||
<div>
|
||
<li class="ur_item new_answer">
|
||
<label name='candiate_items'>参考答案一<span class="ur_index"></span>: </label>
|
||
<input class="candiate_answer w560" name="exercise_choice[0]" placeholder="请输入参考答案" type="text">
|
||
<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>
|
||
</li>
|
||
<div class="cl"></div>
|
||
<li class="ur_item new_answer">
|
||
<label name='candiate_items'>参考答案二<span class="ur_index"></span>: </label>
|
||
<input class="candiate_answer w560" name="exercise_choice[1]" placeholder="请输入参考答案(选填)" type="text">
|
||
<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>
|
||
</li>
|
||
<div class="cl"></div>
|
||
<li class="ur_item new_answer">
|
||
<label name='candiate_items'>参考答案三<span class="ur_index"></span>: </label>
|
||
<input class="candiate_answer w560" name="exercise_choice[2]" placeholder="请输入参考答案(选填)" type="text">
|
||
<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>
|
||
</li>
|
||
<div class="cl"></div>
|
||
<li class="ur_item">
|
||
<div class="dash-block new-question w560" style="margin-left: 82px;" onclick="add_candidate_answer($(this));">新建参考答案</div>
|
||
</li>
|
||
<div class='cl'></div>
|
||
</div>
|
||
<div class="cl"></div>
|
||
</ul>
|
||
</div>
|
||
<div class="ur_editor_footer">
|
||
<span class="fl c_red mt10">温馨提示:[填空题]属于客观题将由系统自动评分,请输入参考答案</span>
|
||
<a class="big_blue_btn borderRadius fr" data-button="ok" id="add_new_question">保存</a>
|
||
<a class="big_grey_btn borderRadius fr mr10" data-button="cancel" onclick="$(this).parent().parent().parent().remove();">取消</a>
|
||
</div>
|
||
<div class="cl"></div>
|
||
</div>
|
||
<% end %>
|
||
<script type="text/javascript">
|
||
$(function(){
|
||
$("#add_new_question").one('click', function(){
|
||
add_poll_question($(this),3);
|
||
});
|
||
});
|
||
</script> |