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/account/lost_password.html.erb b/app/views/account/lost_password.html.erb index 9881dd186..5bf93fd14 100644 --- a/app/views/account/lost_password.html.erb +++ b/app/views/account/lost_password.html.erb @@ -9,7 +9,7 @@ <%= text_field_tag 'mail', nil, :size => 40, :placeholder => '请输入注册邮箱',:class=>'NomalInput mb20'%> <% if flash[:error] %> -
<%= flash[:error]%>
+<%= flash[:error]%>
<% elsif flash[:notice] %><%= flash[:notice]%>
diff --git a/app/views/boards/_course_show.html.erb b/app/views/boards/_course_show.html.erb index b8bbf3d63..f117acd7f 100644 --- a/app/views/boards/_course_show.html.erb +++ b/app/views/boards/_course_show.html.erb @@ -37,7 +37,7 @@ <% @topics.each do |topic| %>