<%= exercise.exercise_name%>
<%=exercise_user.start_at %>
开始时间:<%=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%>
<% mc_question_list = exercise.exercise_questions.where("question_type=1").shuffle %> <% mcq_question_list = exercise.exercise_questions.where("question_type=2").shuffle %> <% single_question_list = exercise.exercise_questions.where("question_type=3").shuffle %>
">
单选题
<% mc_question_list.each_with_index do |exercise_question, list_index| %>
第<%= list_index+1%>题:<%= exercise_question.question_title %> (<%= exercise_question.question_score %>分)
<% exercise_question.exercise_choices.reorder("choice_position").each_with_index do |exercise_choice,index| %>
<%= radio_button "exercise",exercise_question.id.to_s+"exercise_choice_id",exercise_choice.id,:class=>"ur_radio",:onclick =>"click_#{exercise_choice.id}(this);return false;",:checked => answer_be_selected?(exercise_choice,User.current),:disabled => !@can_edit_excercise %> <%= 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 %>分)
<% exercise_question.exercise_choices.reorder("choice_position").each_with_index do |exercise_choice,index| %>
<%= @can_edit_excercise?"":"disabled=disabled" %> > <%= 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 %>分)
>
<% end %>
<%= link_to "保存",commit_exercise_exercise_path(exercise,:save => 1),:id=>"exercise_submit_btn", :method => :post,:class => "ur_button_submit",:format => 'js',:remote=>true %> <%= link_to "提交",commit_exercise_exercise_path(exercise), :data => {:confirm => "您确定要提交吗?"},:id=>"exercise_submit_btn", :method => :post,:class => "ur_button_submit",:style => "margin-left:20px;",:format => 'js',:remote=>true %>