diff --git a/app/models/request_for_comment.rb b/app/models/request_for_comment.rb index 2d91cc8f..c82d2d15 100644 --- a/app/models/request_for_comment.rb +++ b/app/models/request_for_comment.rb @@ -8,7 +8,7 @@ class RequestForComment < ActiveRecord::Base has_many :subscriptions scope :unsolved, -> { where(solved: [false, nil]) } - scope :not_stale, -> { where("user_id%10 <2 OR user_id%10 >= 4").where(exercise.exercise_collections.none{|ec| ec.id = 3} } ########### todo + scope :not_stale, -> { where("user_id%10 < 3").where(exercise.exercise_collections.none{|ec| ec.id = 3} } def self.last_per_user(n = 5) from("(#{row_number_user_sql}) as request_for_comments") diff --git a/lib/user_group_separator.rb b/lib/user_group_separator.rb index 8e1771c1..4dcd00e1 100644 --- a/lib/user_group_separator.rb +++ b/lib/user_group_separator.rb @@ -31,16 +31,4 @@ class UserGroupSeparator :recommended_assignment end end - - def self.getRequestforCommentGroup(user) - lastDigitId = user.id % 10 - if lastDigitId < 2 # 0,1 - :hide_rfc - elsif lastDigitId < 4 # 2,3 - :stale_rfc - else # 4,5,6,7,8,9 - :show_rfc - end - end - end \ No newline at end of file