mirror of
https://github.com/discourse/discourse.git
synced 2025-02-08 12:24:55 +00:00
If you click a (?) icon beside the reviewable status a pop up will appear with expanded informatio that explains how the reviewable got its score, and how it compares to system thresholds.
25 lines
467 B
Ruby
25 lines
467 B
Ruby
# frozen_string_literal: true
|
|
|
|
class ReviewableScoreExplanationSerializer < ApplicationSerializer
|
|
attributes(
|
|
:user_id,
|
|
:type_bonus,
|
|
:trust_level_bonus,
|
|
:take_action_bonus,
|
|
:flags_agreed,
|
|
:flags_disagreed,
|
|
:flags_ignored,
|
|
:user_accuracy_bonus,
|
|
:score
|
|
)
|
|
|
|
def user_accuracy_bonus
|
|
ReviewableScore.calc_user_accuracy_bonus(
|
|
object.flags_agreed,
|
|
object.flags_disagreed,
|
|
object.flags_ignored
|
|
)
|
|
end
|
|
|
|
end
|