屏蔽个人分数实时刷新功能

修复个人分数计分异常
This commit is contained in:
z9hang 2014-06-27 11:15:10 +08:00
parent 745727b8e7
commit bc587f3e7d
2 changed files with 4 additions and 4 deletions

View File

@ -53,7 +53,7 @@ class UserScore < ActiveRecord::Base
user_score = current_user.user_score_attr
user_grade = nil #项目个人得分
project = obj.project
unless project.nil? && project.project_type == 0
unless project.nil?
user_grade = UserGrade.find_by_user_id_and_project_id(current_user.id, project.id)
if user_grade.nil?
user_grade = UserGrade.create(:user_id => current_user.id,:project_id => project.id)
@ -178,7 +178,7 @@ class UserScore < ActiveRecord::Base
current_user_grade = nil #项目个人得分
target_user_grade = nil
project = obj.project
unless project.nil? && project.project_type == 0
unless project.nil?
current_user_grade = UserGrade.find_by_user_id_and_project_id(current_user.id, project.id)
target_user_grade = UserGrade.find_by_user_id_and_project_id(target_user.id, project.id)
if current_user_grade.nil?
@ -285,7 +285,7 @@ class UserScore < ActiveRecord::Base
user_score = current_user.try(:user_score_attr)
user_grade = nil #项目个人得分
project = obj.project
unless project.nil? && project.project_type == 0
unless project.nil?
user_grade = UserGrade.find_by_user_id_and_project_id(current_user.id, project.id)
if user_grade.nil?
user_grade = UserGrade.create(:user_id => current_user.id,:project_id => project.id)

View File

@ -35,7 +35,7 @@
</head>
<!--加上 onload="Javascript:t()" 开始定时刷新分数 -->
<body class="<%= h body_css_classes %>" onload="Javascript:t()">
<body class="<%= h body_css_classes %>">
<div id="wrapper">
<div id="wrapper2">
<div id="wrapper3">