diff --git a/app/controllers/graduation_topics_controller.rb b/app/controllers/graduation_topics_controller.rb index bcc947642..36f51ce6e 100644 --- a/app/controllers/graduation_topics_controller.rb +++ b/app/controllers/graduation_topics_controller.rb @@ -45,16 +45,6 @@ class GraduationTopicsController < ApplicationController end ## 分页参数 @current_user = current_user - course_group_ids = @course.course_members.where(user_id: current_user.id, role: [1,2,3]).pluck(:course_group_id).uniq - #6.11 -hs - if course_group_ids.present? - if course_group_ids.include?(0) - course_group_ids = @course.course_groups.pluck(:id) - end - end - - @group_list = CourseGroup.where(id: course_group_ids) - page = params[:page] || 1 limit = params[:limit] || 50 @users_count = @student_graduation_topics.try(:count).to_i diff --git a/app/views/graduation_topics/show.json.jbuilder b/app/views/graduation_topics/show.json.jbuilder index 440dc776e..a75ac5240 100644 --- a/app/views/graduation_topics/show.json.jbuilder +++ b/app/views/graduation_topics/show.json.jbuilder @@ -7,13 +7,7 @@ json.edit_url edit_course_graduation_topic_path(@course, graduation_topic_id: @g json.users_count @users_count json.course_identity @current_user.course_identity(@course) json.user_selected_topic @graduation_topic.user_status(current_user.id) - -json.group_list do - json.array! @group_list do |group| - json.course_group_id group.id - json.group_name group.name - end -end +json.group_list @course.teacher_group(current_user.id) # 列表数据 json.users_list do