From 0bade2c2e7376eb3f8987ece69e1cf683039276d Mon Sep 17 00:00:00 2001 From: Maximilian Grundke Date: Wed, 25 Oct 2017 14:05:10 +0200 Subject: [PATCH] Fix recommending too difficult questions if user has too low level --- app/models/proxy_exercise.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/proxy_exercise.rb b/app/models/proxy_exercise.rb index 5bdff20d..612fbc59 100644 --- a/app/models/proxy_exercise.rb +++ b/app/models/proxy_exercise.rb @@ -72,7 +72,7 @@ class ProxyExercise < ActiveRecord::Base # find exercises potential_recommended_exercises = [] - exercises.where("expected_difficulty > 1").each do |ex| + exercises.where("expected_difficulty >= 1").each do |ex| ## find exercises which have only tags the user has already seen if (ex.tags - tags_user_has_seen).empty? potential_recommended_exercises << ex