2015-11-18 20:14:19 +08:00
|
|
|
<% mc_question_list = exercise.exercise_questions.where("question_type=1") %>
|
|
|
|
<% mcq_question_list = exercise.exercise_questions.where("question_type=2") %>
|
|
|
|
<% single_question_list = exercise.exercise_questions.where("question_type=3") %>
|
|
|
|
<div class="testStatus" id="mc_question_list" style="display: <%=mc_question_list.count > 0 ? "" : "none" %>">
|
|
|
|
<h3 class="fontGrey3">单选题</h3>
|
|
|
|
<% mc_question_list.each do |exercise_question| %>
|
|
|
|
<div id="poll_questions_<%= exercise_question.id%>">
|
|
|
|
<div id="show_poll_questions_<%= exercise_question.id %>">
|
|
|
|
<%= render :partial => 'show_MC', :locals => {:exercise_question => exercise_question} %>
|
|
|
|
</div>
|
|
|
|
<div id="edit_poll_questions_<%= exercise_question.id %>" style="display: none;">
|
|
|
|
<%= render :partial => 'edit_MC', :locals => {:exercise_question => exercise_question} %>
|
|
|
|
</div>
|
2015-11-18 10:49:57 +08:00
|
|
|
</div>
|
2015-11-18 20:14:19 +08:00
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<div class="testStatus" id="mcq_question_list" style="display: <%=mcq_question_list.count > 0 ? "" : "none" %>">
|
|
|
|
<h3 class="fontGrey3">多选题</h3>
|
|
|
|
<% mcq_question_list.each do |exercise_question| %>
|
|
|
|
<div id="poll_questions_<%= exercise_question.id%>">
|
|
|
|
<div id="show_poll_questions_<%= exercise_question.id %>">
|
|
|
|
<%= render :partial => 'show_MCQ', :locals => {:exercise_question => exercise_question} %>
|
|
|
|
</div>
|
|
|
|
<div id="edit_poll_questions_<%= exercise_question.id %>" style="display: none;">
|
|
|
|
<%= render :partial => 'edit_MCQ', :locals => {:exercise_question => exercise_question} %>
|
|
|
|
</div>
|
2015-11-17 15:18:07 +08:00
|
|
|
</div>
|
2015-11-18 20:14:19 +08:00
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<div class="testStatus" id="single_question_list" style="display: <%=single_question_list.count > 0 ? "" : "none" %>">
|
|
|
|
<h3 class="fontGrey3">填空题</h3>
|
|
|
|
<% single_question_list.each do |exercise_question| %>
|
|
|
|
<div id="poll_questions_<%= exercise_question.id%>">
|
|
|
|
<div id="show_poll_questions_<%= exercise_question.id %>">
|
|
|
|
<%= render :partial => 'show_single', :locals => {:exercise_question => exercise_question} %>
|
|
|
|
</div>
|
|
|
|
<div id="edit_poll_questions_<%= exercise_question.id %>" style="display: none;">
|
|
|
|
<%= render :partial => 'edit_single', :locals => {:exercise_question => exercise_question} %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
2015-11-19 17:18:58 +08:00
|
|
|
</div>
|