dev_ec
cxt 5 years ago
parent 4c13fb53a9
commit e3d99170ff

@ -513,7 +513,9 @@ class GraduationTasksController < ApplicationController
page = params[:page] ? params[:page].to_i : 1
limit = params[:limit] ? params[:limit].to_i : 10
@work_list = @task.graduation_works.joins("join course_members on graduation_works.user_id=course_members.user_id").
where(course_members: {course_group_id: group_ids}).page(page).per(limit).includes(user: [:user_extension])
where(course_members: {course_group_id: group_ids})
@user_count = @work_list.size
@work_list = @work_list.page(page).per(limit).includes(user: [:user_extension])
@students = @course.students.where(user_id: @work_list.pluck(:user_id))
end

@ -10,7 +10,7 @@ json.work_users @work_list do |work|
end
end
json.user_count @work_list.size
json.user_count @user_count
json.course_groups @course_groups do |group|
json.(group, :id, :name)

Loading…
Cancel
Save