Commit 7ed01ae95bc3adf33723ecd984cf19be03ab34a3
1 parent
cbff7bba
Exists in
master
and in
1 other branch
Remove filter by text_articles
Showing
1 changed file
with
3 additions
and
1 deletions
Show diff stats
script/export_ranking.rb
... | ... | @@ -11,6 +11,7 @@ profile_ids.each do |profile_id| |
11 | 11 | profile_name = profile.name |
12 | 12 | end |
13 | 13 | |
14 | + next if profile_name != 'Conferencia' | |
14 | 15 | puts "Creating spreadsheet for #{profile_name}" |
15 | 16 | |
16 | 17 | CSV.open( "ranking_gamification_for_#{profile_name}.csv", 'w' ) do |csv| |
... | ... | @@ -37,13 +38,14 @@ profile_ids.each do |profile_id| |
37 | 38 | person.friends.count, |
38 | 39 | person.comments.where(:source_id => person_articles).joins(:votes).where('vote > 0').count + person_articles.joins(:votes).where('vote > 0').count, |
39 | 40 | person.comments.where(:source_id => person_articles).joins(:votes).where('vote < 0').count + person_articles.joins(:votes).where('vote < 0').count, |
40 | - person_articles.text_articles.count, | |
41 | + person_articles.count, | |
41 | 42 | person.comments.where(source_id: person_articles).count, |
42 | 43 | Comment.where(:source_id => person_articles).count, |
43 | 44 | (person.following_articles & person.article_followers.where(article_id: person_articles)).count, |
44 | 45 | ArticleFollower.where(:article_id => person_articles).count |
45 | 46 | ] |
46 | 47 | csv << [person.identifier, person.name, person.points] + categories_values + quantities_values |
48 | + break if count > 200 | |
47 | 49 | end |
48 | 50 | end |
49 | 51 | end | ... | ... |