include mods+admins in janitor report for comparison
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
module Reports
|
||||
class JanitorTrials
|
||||
class Janitor
|
||||
attr_reader :trial
|
||||
attr_reader :user
|
||||
|
||||
def initialize(trial)
|
||||
@trial = trial
|
||||
def initialize(user)
|
||||
@user = user
|
||||
end
|
||||
|
||||
def user
|
||||
trial.user
|
||||
def trial
|
||||
JanitorTrial.where(user_id: user.id).first
|
||||
end
|
||||
|
||||
def since
|
||||
@@ -39,7 +39,7 @@ module Reports
|
||||
end
|
||||
|
||||
def janitors
|
||||
JanitorTrial.where(status: "active").to_a.map {|x| Janitor.new(x)}
|
||||
User.where("level >= ?", User::Levels::JANITOR).to_a.map {|x| Janitor.new(x)}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div id="a-user-promotions">
|
||||
<h1>Janitor Trial Report</h1>
|
||||
|
||||
<p>All numbers shown are for the past 3 months. Binomial proportion confidence interval for how likely a janitor's approvals will achieve a score of at at least n with 95% confidence.</p>
|
||||
<p>All numbers shown are for the past 3 months. Binomial proportion confidence interval for how likely a janitor's approvals will achieve a score of at at least n with 95% confidence. Most statistics are not significant unless there are at least 300 approvals.</p>
|
||||
|
||||
<table width="100%" class="striped" id="sortable">
|
||||
<thead>
|
||||
@@ -29,7 +29,7 @@
|
||||
<td><%= janitor.percentile_50_score %></td>
|
||||
<td><%= number_to_percentage janitor.confidence_interval, :precision => 0 %></td>
|
||||
<td>
|
||||
<% if CurrentUser.user.is_moderator? %>
|
||||
<% if CurrentUser.user.is_moderator? && janitor.trial %>
|
||||
<%= link_to "Promote", promote_janitor_trial_path(janitor.trial), :method => :put, :remote => true %>
|
||||
| <%= link_to "Demote", demote_janitor_trial_path(janitor.trial), :method => :put, :remote => true %>
|
||||
<% end %>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div id="a-user-promotions">
|
||||
<h1>User Promotion Confidence Intervals</h1>
|
||||
|
||||
<p>Binomial proportion confidence interval for how likely a user's uploads will achieve a score of at at least n with 95% confidence within the past 30 days.</p>
|
||||
<p>Binomial proportion confidence interval for how likely a user's uploads will achieve a score of at at least n with 95% confidence within the past 30 days. Most statistics are not significant unless there are at least 300 uploads.</p>
|
||||
|
||||
<table width="100%" class="striped" id="sortable">
|
||||
<thead>
|
||||
|
||||
Reference in New Issue
Block a user