Commit 8b024299f9ffe29a917fcc1538b2d03265f0ec61
1 parent
a858f087
Exists in
master
and in
29 other branches
suggestions: update use of RULES on stoa plugin
Showing
1 changed file
with
3 additions
and
4 deletions
Show diff stats
plugins/stoa/lib/ext/profile_suggestion.rb
| ... | ... | @@ -4,10 +4,9 @@ class ProfileSuggestion |
| 4 | 4 | |
| 5 | 5 | CATEGORIES.merge!({:common_classroom => _('Classroom in common')}) |
| 6 | 6 | |
| 7 | - RULES += %w[ | |
| 8 | - people_with_common_classroom | |
| 9 | - ] | |
| 10 | - | |
| 7 | + RULES[:people_with_common_classroom] = { | |
| 8 | + :threshold => 2, :weight => 1, :connection => 'Profile' | |
| 9 | + } | |
| 11 | 10 | def self.people_with_common_classroom(person) |
| 12 | 11 | usp_id = person.usp_id |
| 13 | 12 | return if usp_id.nil? | ... | ... |