diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb index b9f762f69..269630ec3 100644 --- a/app/helpers/users_helper.rb +++ b/app/helpers/users_helper.rb @@ -544,6 +544,10 @@ module UsersHelper #获取指定用户作为老师的课程 def get_as_teacher_courses user type = [] + option = [] + option << "请选择发布作业的课程" + option << -1 + type << option user.courses.select{|c| user.allowed_to?(:as_teacher,c)}.each do |course| option = [] option << course.name+"("+course.time.to_s+course.term+")" diff --git a/app/views/users/_user_homework_form.html.erb b/app/views/users/_user_homework_form.html.erb index c6c17edf9..2159ec42a 100644 --- a/app/views/users/_user_homework_form.html.erb +++ b/app/views/users/_user_homework_form.html.erb @@ -74,11 +74,6 @@
-