change report time range to match actual upload formula
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user