<% 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") %> <% multi_question_list = exercise.exercise_questions.where("question_type=4") %>
">

单选题

<% mc_question_list.each_with_index do |exercise_question, index| %>
<%= render :partial => 'show_MC', :locals => {:exercise_question => exercise_question} %>
<% end %>
">

多选题

<% mcq_question_list.each_with_index do |exercise_question, index| %>
<%= render :partial => 'show_MCQ', :locals => {:exercise_question => exercise_question} %>
<% end %>
">

填空题

<% single_question_list.each_with_index do |exercise_question, index| %>
<%= render :partial => 'show_single', :locals => {:exercise_question => exercise_question} %>
<% end %>
">

问答题

<% multi_question_list.each_with_index do |exercise_question, index| %>
<%= render :partial => 'show_multi', :locals => {:exercise_question => exercise_question} %>
<% end %>