优化打开作业列表界面效率
This commit is contained in:
parent
81a97f6a5e
commit
999b856d84
|
@ -878,7 +878,7 @@ class BidsController < ApplicationController
|
|||
|
||||
def find_bid
|
||||
if params[:id]
|
||||
@bid = Bid.find(params[:id])
|
||||
@bid = Bid.find(params[:id], :include => [{:homeworks => :user}])
|
||||
@user = @bid.author
|
||||
end
|
||||
rescue
|
||||
|
|
|
@ -99,7 +99,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<% if is_cur_course_user? @bid %>
|
||||
<% if User.current.member_of?(@bid.courses.first) %>
|
||||
<strong><%= l(:label_bidding_user_studentcode) %> : <%= homework.user.user_extensions.student_id%></strong>
|
||||
<% end %>
|
||||
</td>
|
||||
|
@ -112,20 +112,6 @@
|
|||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!--
|
||||
<tr>
|
||||
<td colspan="2" width="580px" >
|
||||
<% if (User.current == homework.user) || (!Member.where('user_id = ? and project_id = ?', User.current.id, @bid.courses.first.id).first.nil? && (Member.where('user_id = ? and project_id = ?', User.current.id, @bid.courses.first.id).first.roles&Role.where('id = ? or id = ? or id =?',3,7, 9)).size >0) %>
|
||||
<p class="font_description">
|
||||
<% options = {:author => true, :deletable => attach_delete(homework)} %>
|
||||
<%= render :partial => 'attachments/links',
|
||||
:locals => {:attachments => homework.attachments, :options => options} %>
|
||||
</p>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
-->
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
Loading…
Reference in New Issue