diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index ea984aa80..96fb8cfce 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -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)} diff --git a/app/views/files/_upload_course_files.erb b/app/views/files/_upload_course_files.erb index 133b8b4d6..0a35c783c 100644 --- a/app/views/files/_upload_course_files.erb +++ b/app/views/files/_upload_course_files.erb @@ -25,7 +25,7 @@
- +