<%= exercise.exercise_name%>

开始时间:<%=Time.parse(h(exercise_user.start_at)).strftime("%Y-%m-%d %H:%M:%S")%> 截止时间:<%=Time.parse(h(exercise.end_time)).strftime("%Y-%m-%d %H:%M:%S")%> <% unless exercise.time == -1 %> 测验时长:<%=exercise.time %>分钟 <% end %>
<%= exercise.exercise_description.nil? ? "" :exercise.exercise_description.html_safe%>
<% current_score = get_current_score exercise %>
<%= render :partial => 'exercise/total_questions_score', :locals => {:exercise => exercise, :current_score => current_score} %>
<% 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") %> <% if exercise.question_random == 1 %> <% mc_question_list = mc_question_list.shuffle %> <% mcq_question_list = mcq_question_list.shuffle %> <% single_question_list = single_question_list.shuffle %> <% multi_question_list =multi_question_list.shuffle %> <% end %>
">

单选题

<% mc_question_list.each_with_index do |exercise_question, list_index| %>
第<%= list_index+1%>题:<%= exercise_question.question_title %>  (<%= exercise_question.question_score %>分)
<% exercise_choices = exercise.choice_random == 1 ? exercise_question.exercise_choices.shuffle : exercise_question.exercise_choices.reorder("choice_position") %> <% exercise_choices.each_with_index do |exercise_choice,index| %> <% end %>
<% end %>
">

多选题

<% mcq_question_list.each_with_index do |exercise_question,list_index| %>
第<%= list_index+1%>题:<%= exercise_question.question_title %>  (<%= exercise_question.question_score %>分)
<% exercise_choices = exercise.choice_random == 1 ? exercise_question.exercise_choices.shuffle : exercise_question.exercise_choices.reorder("choice_position") %> <% exercise_choices.each_with_index do |exercise_choice,index| %> <% end %>
<% end %>
">

填空题

<% single_question_list.each_with_index do |exercise_question, list_index| %>
第<%= list_index+1%>题:<%= exercise_question.question_title %>  (<%= exercise_question.question_score %>分)
>
<% end %>
">

问答题

<% multi_question_list.each_with_index do |exercise_question, list_index| %>
第<%= list_index+1%>题:<%= exercise_question.question_title %>  (<%= exercise_question.question_score %>分)
<% end %>

答题情况

单选题: <% mc_question_list.each_with_index do |exercise_question, list_index| %> <%= list_index + 1 %> <% end %>
多选题: <% mcq_question_list.each_with_index do |exercise_question, list_index| %> <%= list_index + 1 %> <% end %>
填空题: <% single_question_list.each_with_index do |exercise_question, list_index| %> <%= list_index + 1 %> <% end %>
问答题: <% multi_question_list.each_with_index do |exercise_question, list_index| %> <%= list_index + 1 %> <% end %>