2015-08-15 17:06:50 +08:00
|
|
|
<h3>
|
|
|
|
<%=l(:label_user_homework)%>
|
|
|
|
</h3>
|
|
|
|
|
|
|
|
<div class="autoscroll">
|
|
|
|
<table class="list" style="width: 100%;table-layout: fixed">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th style="width: 30px;">
|
|
|
|
序号
|
|
|
|
</th>
|
|
|
|
<th style="width: 120px;">
|
|
|
|
作业名称
|
|
|
|
</th>
|
|
|
|
<th style="width: 120px;">
|
|
|
|
课程名称
|
|
|
|
</th>
|
|
|
|
<th style="width: 50px;">
|
|
|
|
作者
|
|
|
|
</th>
|
|
|
|
<th style="width: 50px;">
|
|
|
|
提交作品数
|
|
|
|
</th>
|
|
|
|
<th style="width: 70px;">
|
2016-03-30 14:17:12 +08:00
|
|
|
作业发布日期
|
2015-08-15 17:06:50 +08:00
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2015-08-18 14:40:12 +08:00
|
|
|
<%@count=@page*30 %>
|
2015-08-15 17:06:50 +08:00
|
|
|
<% for homework in @homework do %>
|
2016-03-31 09:44:21 +08:00
|
|
|
<% unless homework.nil? %>
|
2015-08-15 17:06:50 +08:00
|
|
|
<% @count+=1 %>
|
|
|
|
<tr>
|
|
|
|
<td align="center">
|
|
|
|
<%=@count %>
|
|
|
|
</td>
|
|
|
|
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<%=homework.name%>'>
|
2016-04-01 09:37:31 +08:00
|
|
|
<%=link_to(homework.try(:name), student_work_index_path(:homework => homework.id))%>
|
2015-08-15 17:06:50 +08:00
|
|
|
</td>
|
2016-04-01 15:54:59 +08:00
|
|
|
<% if homework.course %>
|
2015-08-15 17:06:50 +08:00
|
|
|
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<%=homework.course.name%>'>
|
|
|
|
<%= link_to(homework.course.name, course_path(homework.course.id)) %>
|
|
|
|
</td>
|
2016-04-01 15:54:59 +08:00
|
|
|
<% end %>
|
2015-08-15 17:06:50 +08:00
|
|
|
<td align="center" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<% if homework.try(:user).try(:realname) == ' '%><%= 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 %>
|
|
|
|
</td>
|
|
|
|
<td align="center">
|
2015-08-18 14:40:12 +08:00
|
|
|
<%=link_to(StudentWork.where('homework_common_id=?',homework.id).count, student_work_index_path(:homework => homework.id))%>
|
2015-08-15 17:06:50 +08:00
|
|
|
</td>
|
|
|
|
<td align="center">
|
2016-03-30 14:17:12 +08:00
|
|
|
<%=format_date( homework.created_at ) %>
|
2015-08-15 17:06:50 +08:00
|
|
|
</td>
|
|
|
|
</tr>
|
2016-03-31 09:44:21 +08:00
|
|
|
<% end %>
|
2015-08-15 17:06:50 +08:00
|
|
|
<% end %>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
|
2015-08-18 14:40:12 +08:00
|
|
|
<div class="pagination">
|
|
|
|
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false %>
|
|
|
|
</div>
|
|
|
|
|
2015-08-15 17:06:50 +08:00
|
|
|
<% html_title(l(:label_user_homework)) -%>
|