don't present rfcs of experimental users to others

This commit is contained in:
Ralf Teusner
2018-02-15 17:27:35 +01:00
parent 208a856cb8
commit 4778fc68fc
2 changed files with 2 additions and 1 deletions

View File

@ -66,6 +66,6 @@ class Submission < ActiveRecord::Base
end
def unsolved_rfc
RequestForComment.unsolved.where(exercise_id: exercise).where.not(question: nil).order("RANDOM()").find { | rfc_element |(rfc_element.comments_count < MAX_COMMENTS_ON_RECOMMENDED_RFC) }
RequestForComment.unsolved.not_stale.where(exercise_id: exercise).where.not(question: nil).order("RANDOM()").find { | rfc_element |(rfc_element.comments_count < MAX_COMMENTS_ON_RECOMMENDED_RFC) }
end
end