<%= 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%>
<% 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| %>
<%= 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_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| %>
<%= @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 %>
">
问答题
<% multi_question_list.each_with_index do |exercise_question, list_index| %>
第<%= list_index+1%>题:<%= exercise_question.question_title %> (<%= exercise_question.question_score %>分)
><%= get_anwser_vote_text(exercise_question.id,User.current.id).html_safe %>
<% 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 %>
马上提交