题库发送课程的弹框搜索不能用
This commit is contained in:
parent
55d14ecc65
commit
fa3fd56686
|
@ -423,7 +423,7 @@ class UsersController < ApplicationController
|
|||
end
|
||||
|
||||
def choose_user_course
|
||||
homework = HomeworkCommon.find params[:homework].to_i
|
||||
homework = HomeworkCommon.find params[:send_id].to_i
|
||||
if !params[:search].nil?
|
||||
search = "%#{params[:search].to_s.strip.downcase}%"
|
||||
@course = @user.courses.where("is_delete = 0 and #{Course.table_name}.id != #{homework.course_id} and #{Course.table_name}.id = #{params[:search].to_i } or #{Course.table_name}.name like :p",:p=>search).select { |course| @user.allowed_to?(:as_teacher,course)}
|
||||
|
|
Loading…
Reference in New Issue