diff --git a/app/controllers/homework_attach_controller.rb b/app/controllers/homework_attach_controller.rb
index abbb47c1c..e5f9685f0 100644
--- a/app/controllers/homework_attach_controller.rb
+++ b/app/controllers/homework_attach_controller.rb
@@ -156,6 +156,7 @@ class HomeworkAttachController < ApplicationController
#获取可选成员列表
#homework:作业
#users:该作业所有成员
+ #q:模糊匹配的用户的昵称
def members_for_homework homework,users,q
homework.bid.courses.first.members.joins(:member_roles).where("member_roles.role_id IN (:role_id) and user_id not in (:users)", {:role_id => [5, 10],:users => users}).joins(:user).where("users.login like '%#{q}%'")
end
diff --git a/app/views/homework_attach/show.html.erb b/app/views/homework_attach/show.html.erb
index 0e7adacbe..7df12032f 100644
--- a/app/views/homework_attach/show.html.erb
+++ b/app/views/homework_attach/show.html.erb
@@ -49,7 +49,7 @@
- 平均评分:
+ | 平均评分:
<%= rating_for @homework, :static => true, dimension: :quality, class: 'rateable div_inline' %>
|
发布时间:<%=format_time @homework.created_at %> |
diff --git a/db/schema.rb b/db/schema.rb
index b37bc56e8..826d0eb81 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -924,13 +924,11 @@ ActiveRecord::Schema.define(:version => 20140609061903) do
add_index "user_preferences", ["user_id"], :name => "index_user_preferences_on_user_id"
create_table "user_scores", :force => true do |t|
- t.integer "user_id", :null => false
- t.integer "collaboration"
- t.integer "influence"
- t.integer "skill"
- t.integer "active"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
+ t.integer "user_id"
+ t.integer "collaboration"
+ t.integer "influence"
+ t.integer "skill"
+ t.integer "activity"
end
create_table "user_statuses", :force => true do |t|