|
|
|
@ -584,16 +584,16 @@ class StudentWorkController < ApplicationController
|
|
|
|
|
@stundet_works = @stundet_works.where(:work_status => @status)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
@stundet_works = search_work_member @stundet_works, @name
|
|
|
|
|
|
|
|
|
|
if @stundet_works.size != 0
|
|
|
|
|
if @order == "student_id"
|
|
|
|
|
@stundet_works = @stundet_works.includes(:user => {:user_extensions => []}).order("user_extensions.student_id #{@b_sort}")
|
|
|
|
|
@stundet_works = @stundet_works.joins(:user => {:user_extensions => []}).order("user_extensions.student_id #{@b_sort}")
|
|
|
|
|
else
|
|
|
|
|
@stundet_works = @stundet_works.order("#{@order} #{@b_sort}")
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
@stundet_works = search_work_member @stundet_works, @name
|
|
|
|
|
|
|
|
|
|
@score = @b_sort == "desc" ? "asc" : "desc"
|
|
|
|
|
# @is_focus = params[:is_focus] ? params[:is_focus].to_i : 0
|
|
|
|
|
# 消息传过来的ID
|
|
|
|
@ -615,6 +615,7 @@ class StudentWorkController < ApplicationController
|
|
|
|
|
_index
|
|
|
|
|
|
|
|
|
|
@stundet_works = paginateHelper @stundet_works, @limit
|
|
|
|
|
@members = @course.members.select([:user_id, :course_group_id])
|
|
|
|
|
if @stundet_works.size != 0
|
|
|
|
|
@stundet_works = if @homework.homework_type == 1
|
|
|
|
|
@stundet_works.includes(:student_works_scores, [user: :user_extensions])
|
|
|
|
@ -623,7 +624,6 @@ class StudentWorkController < ApplicationController
|
|
|
|
|
elsif @homework.homework_type == 4
|
|
|
|
|
@stundet_works.includes(:student_works_scores, [myshixun: :games], [user: :user_extensions])
|
|
|
|
|
end
|
|
|
|
|
@members = @course.members.where(user_id: @stundet_works.pluck(:user_id)).select([:user_id, :course_group_id])
|
|
|
|
|
end
|
|
|
|
|
respond_to do |format|
|
|
|
|
|
format.js
|
|
|
|
|