<% has_commit = has_commit_poll?(poll.id ,User.current)%> <% poll_name = poll.polls_name.empty? ? l(:label_poll_new) : poll.polls_name%> <% if @is_teacher%>
<% if has_commit %> <%= link_to (index.to_i+1).to_s+". "+poll_name, poll_result_poll_path(poll.id), :class => "polls_title polls_title_w fl c_dblue mw550", :title => "#{poll_name}" %> <% else %> <%= link_to (index.to_i+1).to_s+". "+poll_name, poll_path(poll.id), :class => "polls_title polls_title_w fl c_dblue mw550", :title => "#{poll_name}" %> <% end %> <% if poll.polls_status == 1 %> <% elsif poll.polls_status == 2 %> <% else %> <% end%>
<% if poll.polls_status == 1 %> <%= link_to '', edit_poll_path(poll.id), :title => "编辑试卷", :class => "ex_icon_edit mt0"%> <% end%>
创建时间:<%= format_time(poll.created_at) %> <% if poll.polls_status > 1 %> 发布时间:<%= poll.published_at.nil? ? '未设置' : format_time(poll.published_at) %> <% end %> <% if poll.polls_status > 1 %> 答题:<%= poll.poll_users.count %> / <%=@course.student.count %> <% end %> <% if poll.polls_status == 1 %>
发布问卷
<% elsif poll.polls_status == 2%>
取消发布
<% else%>
发布问卷
<% end%> <% if poll.polls_status == 1%>
统计结果
<% elsif poll.polls_status == 2 || poll.polls_status == 3 %>
<%= link_to l(:label_statistical_results), statistics_result_poll_path(poll.id), :class => "pollsbtn fr ml10"%>
<% end%> <% if poll.polls_status == 2 %>
  • 关闭
  • <% else %>
  • 关闭
  • <% end%> <% if poll.polls_status == 1%>
  • 导出
  • <% elsif poll.polls_status == 2 || poll.polls_status == 3 %>
  • <%= link_to "导出", export_poll_poll_path(poll.id,:format => "xls"), :class => "pollsbtn fr ml10"%>
  • <% end%>
    <% else%> <% if poll.polls_status == 2%>
    <% if has_commit%> <%= link_to (index.to_i+1).to_s+". "+poll_name, poll_result_poll_path(poll.id), :title => "#{poll_name}", :class => "polls_title polls_title_st fl c_dblue mw550"%> <%else%> <%= link_to (index.to_i+1).to_s+". "+poll_name, poll_path(poll.id), :title => "#{poll_name}", :class => "polls_title polls_title_st fl c_dblue mw550"%> <%end%>
    发布时间:<%= format_time(poll.published_at) %> 答题:<%= poll.poll_users.count %> / <%=@course.student.count %> <% if poll.show_result == 1 %> <% if has_commit%>
  • <%= link_to l(:label_statistical_results), statistics_result_poll_path(poll.id), :class => "pollsbtn fr"%>
  • <%else%>
  • 统计结果
  • <%end%> <% end %>
    <% end%> <% end%>