%# has_commit = has_commit_poll?(poll.id ,User.current)%>
<% exercise_name = exercise.exercise_name.empty? ? l(:label_poll_new) : exercise.exercise_name%>
<% if @is_teacher%>
<%# if has_commit %>
<%#= link_to poll_name, poll_result_poll_path(poll.id), :class => "polls_title polls_title_w fl c_dblue"%>
<%# else %>
<%#= link_to poll_name, exercise_path(poll.id), :class => "polls_title polls_title_w fl c_dblue" %>
<%# end %>
<%= link_to exercise_name, exercise_path(exercise.id), :class => "polls_title polls_title_w fl c_dblue" %>
<% if exercise.exercise_status == 1%>
统计结果
<% else %>
<%= link_to l(:label_statistical_results), student_exercise_list_exercise_path(exercise.id,:course_id => @course.id), :class => "pollsbtn fl ml10"%>
<% end%>
<% if exercise.exercise_status == 1 %>
发布试卷
<% elsif exercise.exercise_status == 2%>
取消发布
<% else%>
发布试卷
<% end%>
<%= link_to(l(:button_delete), exercise,:method => :delete, :confirm => l(:text_are_you_sure), :remote => true, :class => "polls_de fr ml5 mr10") %>
<% if exercise.exercise_status == 1 %>
<%= link_to l(:button_edit), edit_exercise_path(exercise.id), :class => "polls_de fr ml5"%>
<% else%>
编辑
<% end%>
<% if exercise.exercise_status == 2 %>
关闭
<% else %>
关闭
<% end%>
<% if exercise.exercise_status == 1%>
导出
<% elsif exercise.exercise_status == 2 || exercise.exercise_status == 3 %>
<%= link_to "导出", export_exercise_exercise_path(exercise.id,:format => "xls"), :class => "polls_de fr ml5"%>
<% end%>
<%= format_date exercise.created_at.to_date%>
<% else%>
<% if exercise.exercise_status == 2%>
<%# if has_commit%>
<%#else%>
<%= link_to exercise_name, exercise_path(exercise.id), :class => "polls_title polls_title_st fl c_dblue"%>
<%#end%>
<% end%>
<%= format_date exercise.created_at.to_date%>
<% end%>