tweaked user promotion formula

This commit is contained in:
r888888888
2013-07-09 11:17:17 -07:00
parent c256ab5081
commit 87eabe3b00
2 changed files with 13 additions and 13 deletions

View File

@@ -16,7 +16,7 @@ module Reports
end
def self.confidence_interval_for(user, n)
up_votes = Post.where("created_at >= ?", min_time).where(:uploader_id => user.id).where("fav_count >= ?", n).count
up_votes = Post.where("created_at >= ?", min_time).where(:is_deleted => false, :uploader_id => user.id).where("score >= ?", n).count
total_votes = Post.where("created_at >= ?", min_time).where(:uploader_id => user.id).count
ci_lower_bound(up_votes, total_votes, 0.95)
end
@@ -36,7 +36,7 @@ module Reports
end
def users
::User.where("users.level < ? and users.post_upload_count >= 100", ::User::Levels::CONTRIBUTOR).order("created_at desc").limit(50).map {|x| Reports::UserPromotions::User.new(x)}
::User.where("users.level < ? and users.post_upload_count >= 150", ::User::Levels::CONTRIBUTOR).order("created_at desc").limit(50).map {|x| Reports::UserPromotions::User.new(x)}
end
end
end