<%=l(:label_apply_homework)%>

<%@count=@page*30 %> <% for homework in @homework do %> <% unless homework.nil? %> <% @count+=1 %> <% c_h = HomeworkCommon.find homework.homework_common_id %> <% if c_h %> <% if c_h.course %> <% end %> <% end %> <% end %> <% end %>
序号 作业名称 课程名称 作者 申请者 申请状态 申请日期
<%=@count %> <%=link_to(c_h.try(:name), student_work_index_path(:homework => c_h.id))%> <%= link_to(c_h.course.name, course_path(c_h.course.id)) %> <%= c_h.try(:user)%><% else %><%=c_h.try(:user).try(:realname) %><% end %>'> <% if c_h.try(:user).try(:realname) == ' '%> <%= link_to(c_h.try(:user), user_path(c_h.user_id)) %> <% else %> <%= link_to(c_h.try(:user).try(:realname), user_path(c_h.user_id)) %> <% end %> <%= homework.try(:user)%><% else %><%=homework.try(:user).try(:realname) %><% end %>'> <% if homework.try(:user).try(:realname) == ' '%> <%= link_to(homework.try(:user), user_path(homework.user_id)) %> <% else %> <%= link_to(homework.try(:user).try(:realname), user_path(homework.user_id)) %> <% end %> <% if homework.status == 1 %> 等待回复 <% elsif homework.status == 2 %> 已通过 <% else %> 已拒绝 <% end %> <%=format_date( homework.created_at ) %>
<% html_title(l(:label_apply_homework)) -%>