socialforge/app/views/exercise/_show_MCQ.html.erb

39 lines
2.3 KiB
Plaintext

<div>
<div class="testEditTitle"> 第<%= exercise_question.question_number%>题.(<%= exercise_question.question_score %>分)<br />
<%= exercise_question.question_title %>
<span class="ml10">(<%= convert_to_char(exercise_question.exercise_standard_answers.first.exercise_choice_id.to_s) %>)</span>
</div>
<%= link_to("", delete_exercise_question_exercise_index_path(:exercise_question => exercise_question.id),
method: :delete, :confirm => l(:text_are_you_sure), :remote => true, :class => "ur_icon_de") %>
<a class="ur_icon_edit" title="编辑" onclick="pollQuestionEdit(<%= exercise_question.id%>);"></a>
<a class='ur_icon_add' title='向下插入' id="add_mcq_<%=exercise_question.id%>" onclick="dismiss('mcq',<%=exercise_question.id%>);insert_MCQ('mcq',<%=exercise_question.question_number%>,<%=exercise_question.id%>);"></a>
<div class="cl"></div>
<div class="ur_inputs">
<table class="ur_table" style="width:675px;">
<tbody>
<% exercise_question.exercise_choices.reorder("choice_position").each_with_index do |exercise_choice,index| %>
<tr>
<td>
<label>
<input class="ur_radio" type="checkbox" name="<%= exercise_question %>" value="<%= exercise_choice.choice_text%>" >
<%= convert_to_char((index+1).to_s)%>&nbsp;&nbsp;<%= exercise_choice.choice_text%>
</label>
</td>
</tr>
<% end %>
</tbody>
</table>
</div>
</div><!--多选题显示 end-->
<!-- 新增问题 -->
<div id="insert_new_poll_question_mcq_<%=exercise_question.id%>">
</div>
<div id="div_mcq_<%=exercise_question.id%>" style="width: 50px;border: 1px solid #cbcbcb; display:none;position: absolute;padding: 5px;background: white">
<ul>
<!--
<li><a href="javascript:void(0);" onclick=" dismiss('mcq',<%#=poll_question.id%>);insert_MC('mcq',<%#=poll_question.question_number%>,<%#=poll_question.id%>);">单选</a></li>
<li><a href="javascript:void(0);" onclick=" dismiss('mcq',<%#=exercise_question.id%>);insert_MCQ('mcq',<%#=exercise_question.question_number%>,<%#=exercise_question.id%>);">多选</a></li>
<li><a href="javascript:void(0);" onclick=" dismiss('mcq',<%#=poll_question.id%>);insert_SINGLE('mcq',<%#=poll_question.question_number%>,<%#=poll_question.id%>);">单行主观</a></li>
-->
</ul>
</div>