|
|
|
@ -69,16 +69,21 @@
|
|
|
|
|
<ul class="menu_r">
|
|
|
|
|
<li>
|
|
|
|
|
<a href="javascript:void(0);" class="parent">
|
|
|
|
|
<% @all_homework_commons.each_with_index do |homework_common,index |%>
|
|
|
|
|
<% if @is_teacher %>
|
|
|
|
|
<% hcommons = @all_homework_commons %>
|
|
|
|
|
<% else %>
|
|
|
|
|
<% hcommons = @homework_commons %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% hcommons.each_with_index do |homework_common,index |%>
|
|
|
|
|
<% if homework_common.id == @homework.id %>
|
|
|
|
|
<%="作业 #{@all_homework_commons.count - index}" %>
|
|
|
|
|
<%="作业 #{hcommons.count - index}" %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end%>
|
|
|
|
|
</a>
|
|
|
|
|
<ul>
|
|
|
|
|
<% @all_homework_commons.each_with_index do |homework_common,index |%>
|
|
|
|
|
<% hcommons.each_with_index do |homework_common,index |%>
|
|
|
|
|
<li class="pr10">
|
|
|
|
|
<%= link_to "作业#{@all_homework_commons.count - index}:#{homework_common.name}",student_work_index_path(:homework => homework_common.id)%>
|
|
|
|
|
<%= link_to "作业#{hcommons.count - index}:#{homework_common.name}",student_work_index_path(:homework => homework_common.id)%>
|
|
|
|
|
<%#= link_to "第#{@homework_commons.count - index}次作业",student_work_index_path(:homework => homework_common.id)%>
|
|
|
|
|
</li>
|
|
|
|
|
<% end%>
|
|
|
|
|