作品列表搜索问题

This commit is contained in:
huang 2016-09-14 17:36:20 +08:00
parent aeaf99f79e
commit 9f5e257890
3 changed files with 3 additions and 3 deletions

View File

@ -456,7 +456,7 @@ class StudentWorkController < ApplicationController
elsif @order == 'student_id'
@stundet_works = search_homework_member @homework.student_works.no_copy.select("student_works.*,student_works.work_score as score").joins("join user_extensions on student_works.user_id = user_extensions.user_id").order("#{@order} #{@b_sort}"),@name
else
@stundet_works = search_homework_member @homework.student_works.no_copy.select("student_works.*,student_works.work_score as score").order("#{@order} #{@b_sort}"),@name
@stundet_works = search_homework_member @homework.student_works.no_copy.select("student_works.*,student_works.work_score as score").includes(:user => {:user_extensions => []}, :project => {}, :student_works_scores => {}).order("#{@order} #{@b_sort}"),@name
end
@show_all = true
elsif User.current.member_of_course?(@course)

View File

@ -29,7 +29,7 @@
我的评分
</th>
</tr>
<% @stundet_works.includes(:user => {:user_extensions => []}, :project => {}).each_with_index do |student_work, i|%>
<% @stundet_works.each_with_index do |student_work, i|%>
<%= render :partial => "evaluation_work", :locals => {:student_work => student_work, :index => i}%>
<tr>
<td colspan="12">

View File

@ -74,7 +74,7 @@
</th>
</tr>
<%# end %>
<% @stundet_works.includes(:user => {:user_extensions => []}, :project => {}, :student_works_scores => {}).each_with_index do |student_work, i| %>
<% @stundet_works.each_with_index do |student_work, i| %>
<%= render :partial => "evaluation_un_work", :locals => {:student_work => student_work, :index => i} %>
<tr>
<td colspan="12">