云上实验室课堂

dev_home
cxt 5 years ago
parent b59b914aa0
commit 85727e261d

@ -977,7 +977,7 @@ class ShixunsController < ApplicationController
@courses = Course.where(:id => course_ids)
## 云上实验室过滤
@courses = @courses.where(id: current_laboratory.all_courses.pluck(:id))
@courses = @courses.where(id: current_laboratory.all_courses)
@course_count = @courses.count
@courses = @courses.page(page).per(limit)

@ -218,7 +218,7 @@ class SubjectsController < ApplicationController
AND m.user_id=#{current_user.id} AND c.is_delete = 0 AND c.is_end = 0").map(&:id)
@courses = Course.where(id: course_ids)
## 云上实验室过滤
@courses = @courses.where(id: current_laboratory.all_courses.pluck(:id))
@courses = @courses.where(id: current_laboratory.all_courses)
@none_shixun_ids = ShixunSchool.where("school_id != #{current_user.user_extension.try(:school_id).to_i}").pluck(:shixun_id)
end

Loading…
Cancel
Save