修改项目500问题

This commit is contained in:
huang 2015-09-03 19:19:46 +08:00
parent 6f64355a4a
commit 4ce8282bd2
1 changed files with 4 additions and 4 deletions

View File

@ -423,7 +423,7 @@ module UserScoreHelper
#更新分数
def update_score(option_number)
option_number.total_score = collaboration(option_number) + influence(option_number) + skill(option_number) + active(option_number)
option_number.total_score = collaboration(option_number) + influence(option_number) + skill(option_number)
if option_number.total_score < 0
option_number.total_score = 0
end
@ -444,9 +444,9 @@ module UserScoreHelper
option_number.praise_by_one * 4 + option_number.praise_by_two * 6 + option_number.praise_by_three * 8 - option_number.tread * 2 - option_number.tread_by_one * 2 - option_number.tread_by_two * 4 - option_number.tread_by_three * 6
end
#项目贡献得分
def active(option_number)
option_number.changeset * 4 + option_number.document * 4 + option_number.attachment * 4 + option_number.issue_done_ratio * 2 + option_number.post_issue * 4 + option_number.memo * 2
end
#def active(option_number)
# option_number.changeset * 4 + option_number.document * 4 + option_number.attachment * 4 + option_number.issue_done_ratio * 2 + option_number.post_issue * 4 + option_number.memo * 2
#end
#更新发帖数
def update_memo_number(user,type,project=nil)