Commit 32d574d65a93119e7b0b7d4645bf9028287357aa
1 parent
cc084f19
Exists in
master
and in
1 other branch
Making catchup algorithm non hard coded
Showing
2 changed files
with
11 additions
and
2 deletions
Show diff stats
app/controllers/prompts_controller.rb
@@ -70,8 +70,8 @@ class PromptsController < InheritedResources::Base | @@ -70,8 +70,8 @@ class PromptsController < InheritedResources::Base | ||
70 | #@prompt.choices.each(&:compute_score!) | 70 | #@prompt.choices.each(&:compute_score!) |
71 | respond_to do |format| | 71 | respond_to do |format| |
72 | if successful | 72 | if successful |
73 | - catchup_marketplace_ids = [120, 117, 1, 116] | ||
74 | - if catchup_marketplace_ids.include?(@question.id) | 73 | + #catchup_marketplace_ids = [120, 117, 1, 116] |
74 | + if @question.uses_catchup? | ||
75 | logger.info("Question #{@question.id} is using catchup algorithm!") | 75 | logger.info("Question #{@question.id} is using catchup algorithm!") |
76 | next_prompt = @question.catchup_choose_prompt | 76 | next_prompt = @question.catchup_choose_prompt |
77 | else | 77 | else |
db/migrate/20100420130849_add_catchup_bool_to_questions.rb
0 → 100644