diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb index 770c36a58..4088d4156 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/comments_controller.rb @@ -34,20 +34,20 @@ class CommentsController < ApplicationController ids = params[:asset_id].split(',') update_kindeditor_assets_owner ids,@comment.id,OwnerTypeHelper::COMMENT end - # ������ض�̬�ļ�¼add start - if( @comment.id && @news.course ) - if(@news.author_id != User.current.id) - notify = ActivityNotify.new() - notify.activity_container_id = @news.course.id - notify.activity_container_type = 'Course' - notify.activity_id = @comment.id - notify.activity_type = 'Comment' - notify.notify_to = @news.author_id - notify.is_read = 0 - notify.save() - end - end - # ������ض�̬�ļ�¼add end + # # ������ض�̬�ļ�¼add start + # if( @comment.id && @news.course ) + # if(@news.author_id != User.current.id) + # notify = ActivityNotify.new() + # notify.activity_container_id = @news.course.id + # notify.activity_container_type = 'Course' + # notify.activity_id = @comment.id + # notify.activity_type = 'Comment' + # notify.notify_to = @news.author_id + # notify.is_read = 0 + # notify.save() + # end + # end + # # ������ض�̬�ļ�¼add end flash[:notice] = l(:label_comment_added) end 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/_course_message.html.erb b/app/views/users/_course_message.html.erb index a2ff03dd2..f622ad20c 100644 --- a/app/views/users/_course_message.html.erb +++ b/app/views/users/_course_message.html.erb @@ -50,16 +50,15 @@