Commit 6bc7324eb2fcaef99b8a87ebbb097746eafd7e60
1 parent
90bb583f
Exists in
master
and in
1 other branch
only use active choices when using catchup algo
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
app/models/question.rb
... | ... | @@ -123,8 +123,8 @@ class Question < ActiveRecord::Base |
123 | 123 | # This will not run once all prompts have been generated, |
124 | 124 | # but it prevents us from having to pregenerate all possible prompts |
125 | 125 | if weights.size < choices.size ** 2 - choices.size |
126 | - choices.each do |l| | |
127 | - choices.each do |r| | |
126 | + choices.active.each do |l| | |
127 | + choices.active.each do |r| | |
128 | 128 | if l.id == r.id |
129 | 129 | next |
130 | 130 | end | ... | ... |