Merge branch 'master' of http://repository.trustie.net/xianbo/trustie2
This commit is contained in:
commit
d2e4601556
|
@ -145,6 +145,17 @@ module BidsHelper
|
|||
people.include?(User.current)
|
||||
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
|
||||
# tmp = Hash.new
|
||||
# option.each do |project|
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
<% end %>
|
||||
</td>
|
||||
<td style="vertical-align: top">
|
||||
<% if display_id %>
|
||||
<% if is_cur_course_user? @bid %>
|
||||
<%= link_to "互评>>" , homework_attach_path(homework)%>
|
||||
<% end %>
|
||||
</td>
|
||||
|
|
|
@ -71,3 +71,11 @@
|
|||
<% end %>
|
||||
</ul>
|
||||
<% 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} %>
|
||||
</div>
|
||||
|
||||
<!--分页-->
|
||||
<div class="pagination" style="float:left;">
|
||||
<ul>
|
||||
<%= pagination_links_full @feedback_pages %>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue