|
|
|
@ -467,7 +467,8 @@ class CoursesController < ApplicationController
|
|
|
|
|
# user_ids_of_course_members = @course.course_members.where(role: [1,2,3]).pluck(:user_id)
|
|
|
|
|
# @users = User.where.not(id: user_ids_of_course_members)
|
|
|
|
|
|
|
|
|
|
@users = User.where(status: User::STATUS_ACTIVE, laboratory_id: @course.laboratory_id)
|
|
|
|
|
@users = User.where(status: User::STATUS_ACTIVE)
|
|
|
|
|
@users = @users.where(laboratory_id: current_laboratory.id) unless current_laboratory.main_site?
|
|
|
|
|
@users = @users.where("concat(users.lastname, users.firstname) like '%#{name}%'") if name.present?
|
|
|
|
|
# REDO:Extension
|
|
|
|
|
@users = @users.joins(user_extension: :school).where("schools.name like '%#{school_name}%'") if school_name.present?
|
|
|
|
@ -1083,7 +1084,8 @@ class CoursesController < ApplicationController
|
|
|
|
|
school_name = params[:school_name]
|
|
|
|
|
|
|
|
|
|
# REDO:Extension
|
|
|
|
|
@users = User.where(status: User::STATUS_ACTIVE, laboratory_id: @course.laboratory_id)
|
|
|
|
|
@users = User.where(status: User::STATUS_ACTIVE)
|
|
|
|
|
@users = @users.where(laboratory_id: current_laboratory.id) unless current_laboratory.main_site?
|
|
|
|
|
@users = @users.where("concat(users.lastname, users.firstname) like '%#{name}%'") if name.present?
|
|
|
|
|
# REDO:Extension
|
|
|
|
|
@users = @users.joins(user_extension: :school).where("schools.name like '%#{school_name}%'") if school_name.present?
|
|
|
|
|