作业
<% if @homework_commons.empty? %>
目前尚未发布作业
<% else %> <% @homework_commons.each_with_index do |homework_common,index |%>
<%= link_to "作业#{@homework_commons.count - index}:#{homework_common.name}",student_work_index_path(:homework => homework_common.id),:target=>"_blank"%>
<% end%> <% end %>
<%= render :partial => 'homework_search_form',:locals => {:course=>@course} %>
<% if @is_teacher%>
<%= labelled_form_for @new_homework,:url => user_new_homework_users_path,:method => "post" do |f| %>
<%= render :partial => 'users/user_homework_form', :locals => { :homework => @new_homework,:f => f,:edit_mode => false,:select_course => false } %>
<% end%>
<% end%>
<%= render :partial => 'homework_common/homework_index_list', :locals => {:homework_commons => @homeworks,:course_id => @course.id} %>