diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index 54223a155..3b6273465 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -244,6 +244,7 @@ class CoursesController < ApplicationController @rank = user_ids.index(current_user.id).to_i + 1 @course_members = @course_members.select{|member| member.user_id == current_user.id} else + @all_count = @course_members.size @course_members = paginate @course_members end end diff --git a/app/views/courses/work_score.json.jbuilder b/app/views/courses/work_score.json.jbuilder index e845b647a..2d7e30bb3 100644 --- a/app/views/courses/work_score.json.jbuilder +++ b/app/views/courses/work_score.json.jbuilder @@ -10,4 +10,5 @@ json.course_members @course_members.each do |member| json.graduation_score member.graduation_score json.total_score member.score json.rank @rank if @user_course_identity == Course::STUDENT -end \ No newline at end of file +end +json.all_count @all_count \ No newline at end of file