From 8b3b2d18c8d6d3acf59fbae645e85a8ab56ed037 Mon Sep 17 00:00:00 2001 From: r888888888 Date: Wed, 23 Sep 2015 14:06:58 -0700 Subject: [PATCH] change report time range to match actual upload formula --- app/logical/reports/user_promotions.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/logical/reports/user_promotions.rb b/app/logical/reports/user_promotions.rb index 2ef90e1cd..a1d535452 100644 --- a/app/logical/reports/user_promotions.rb +++ b/app/logical/reports/user_promotions.rb @@ -38,14 +38,14 @@ module Reports end def self.deletion_confidence_interval_for(user, days = nil) - date = (days || 30).days.ago + date = (days || 120).days.ago deletions = Post.where("created_at >= ?", date).where(:uploader_id => user.id, :is_deleted => true).count total = Post.where("created_at >= ?", date).where(:uploader_id => user.id).count ci_lower_bound(deletions, total) end def self.negative_score_confidence_interval_for(user, days = nil) - date = (days || 30).days.ago + date = (days || 120).days.ago hits = Post.where("created_at >= ? and score < 0", date).where(:uploader_id => user.id).count total = Post.where("created_at >= ?", date).where(:uploader_id => user.id).count ci_lower_bound(hits, total)