Merge branch 'dev_course' of http://bdgit.educoder.net/Hjqreturn/educoder into dev_course

dev_course
cxt 6 years ago
commit 21d61a1c50

@ -45,16 +45,6 @@ class GraduationTopicsController < ApplicationController
end end
## 分页参数 ## 分页参数
@current_user = current_user @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 page = params[:page] || 1
limit = params[:limit] || 50 limit = params[:limit] || 50
@users_count = @student_graduation_topics.try(:count).to_i @users_count = @student_graduation_topics.try(:count).to_i

@ -7,13 +7,7 @@ json.edit_url edit_course_graduation_topic_path(@course, graduation_topic_id: @g
json.users_count @users_count json.users_count @users_count
json.course_identity @current_user.course_identity(@course) json.course_identity @current_user.course_identity(@course)
json.user_selected_topic @graduation_topic.user_status(current_user.id) json.user_selected_topic @graduation_topic.user_status(current_user.id)
json.group_list @course.teacher_group(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.users_list do json.users_list do

Loading…
Cancel
Save