diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index 0dffd7b66..7361055b4 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -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) diff --git a/app/views/student_work/_evaluation_title.html.erb b/app/views/student_work/_evaluation_title.html.erb index 397e4ba46..55e1b57c1 100644 --- a/app/views/student_work/_evaluation_title.html.erb +++ b/app/views/student_work/_evaluation_title.html.erb @@ -29,7 +29,7 @@ 我的评分 - <% @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}%> diff --git a/app/views/student_work/_evaluation_un_title.html.erb b/app/views/student_work/_evaluation_un_title.html.erb index 4091911fe..4fdd6384f 100644 --- a/app/views/student_work/_evaluation_un_title.html.erb +++ b/app/views/student_work/_evaluation_un_title.html.erb @@ -74,7 +74,7 @@ <%# 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} %>