<%= exercise.exercise_name%>
<% unless exercise.publish_time.nil? %>
发布时间:<%=Time.parse(h(exercise.publish_time)).strftime("%Y-%m-%d %H:%M:%S") %>
<% end %> <% unless exercise.end_time.nil? %>
截止时间:<%=Time.parse(h(exercise.end_time)).strftime("%Y-%m-%d %H:%M:%S") %>
<% end %> <% if exercise.time != -1 %>
测验时长:<%=exercise.time %>分钟
<% end %>
<%= exercise.exercise_description.nil? ? "" : exercise.exercise_description.html_safe%>
<% 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") %>
">
单选题
<% mc_question_list.each_with_index do |exercise_question, list_index| %>
第<%= list_index+1%>题:<%= exercise_question.question_title %> (<%= exercise_question.question_score %>分)
标准答案:<%= convert_to_char(exercise_question.exercise_standard_answers.first.exercise_choice_id.to_s) if exercise_question.exercise_standard_answers.first %>
<% exercise_question.exercise_choices.reorder("choice_position").each_with_index do |exercise_choice,index| %>
<%= convert_to_char((index+1).to_s)%> <%= exercise_choice.choice_text%>
<% end %>
<% end %>
">
多选题
<% mcq_question_list.each_with_index do |exercise_question, list_index| %>
第<%= list_index+1%>题:<%= exercise_question.question_title %> (<%= exercise_question.question_score %>分)
标准答案:<%= convert_to_char(exercise_question.exercise_standard_answers.first.exercise_choice_id.to_s) if exercise_question.exercise_standard_answers.first%>
<% exercise_question.exercise_choices.reorder("choice_position").each_with_index do |exercise_choice,index| %>
<%= convert_to_char((index+1).to_s)%> <%= exercise_choice.choice_text%>
<% end %>
<% end %>
">
填空题
<% single_question_list.each_with_index do |exercise_question, list_index| %>
第<%= list_index+1%>题:<%= exercise_question.question_title %> (<%= exercise_question.question_score %>分)
<% exercise_question.exercise_standard_answers.reorder("created_at").each_with_index do |exercise_choice,index| %> 候选答案:<%= exercise_choice.answer_text%>
<% end %>
<% end %>
<%= link_to "确定",exercise_index_path(:course_id => @course.id),:class => "ur_button_submit" %> <% if exercise.exercise_status == 1 %> <%= link_to l(:button_edit), edit_exercise_path(exercise.id), :class => "ur_button_submit", :style => "float:right"%> <% else %>
编辑
<%#= link_to l(:button_edit), '', :class => "ur_button_submit", :style => "float:right; background:#a3a3a3"%> <% end %>