1.修复作业留言超过一页条数限制时不会出现换页标签的BUG

2.修改点击作业名称为下载作业,增加互评按钮进入作业互评页面
3.增加判断当前用户是不是指定课程的成员的方法
exceptionHandle
sw 11 years ago
parent 8452987ff9
commit a56c200967

@ -145,6 +145,17 @@ module BidsHelper
people.include?(User.current) people.include?(User.current)
end end
# 当前用户是否加入了此课程(包括教师)
def is_cur_course_user? bid
people = []
#people << bid.author
course = bid.courses.first
course.members.each do |member|
people << member.user
end
people.include?(User.current)
end
# def select_option_helper option # def select_option_helper option
# tmp = Hash.new # tmp = Hash.new
# option.each do |project| # option.each do |project|

@ -44,7 +44,7 @@
<% end %> <% end %>
</td> </td>
<td style="vertical-align: top"> <td style="vertical-align: top">
<% if display_id %> <% if is_cur_course_user? @bid %>
<%= link_to "互评>>" , homework_attach_path(homework)%> <%= link_to "互评>>" , homework_attach_path(homework)%>
<% end %> <% end %>
</td> </td>

@ -70,4 +70,12 @@
</li> </li>
<% end %> <% end %>
</ul> </ul>
<% end %> <% end %>
<!--分页-->
<div class="pagination" style="float:left;">
<ul>
<%= pagination_links_full @feedback_pages %>
</ul>
</div>

@ -145,12 +145,5 @@
<%= render :partial => 'showjour', :locals => {:jour => @jour} %> <%= render :partial => 'showjour', :locals => {:jour => @jour} %>
</div> </div>
<!--分页-->
<div class="pagination" style="float:left;">
<ul>
<%= pagination_links_full @feedback_pages %>
</ul>
</div>
<div> <div>
</div> </div>

Loading…
Cancel
Save