From cab847f4e84d1b4ad865e7791ff842c1f1c57027 Mon Sep 17 00:00:00 2001 From: Rohan Rangray Date: Wed, 3 Jun 2015 13:08:53 -0700 Subject: [PATCH] Fixed bug in study score update --- flashcards/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flashcards/models.py b/flashcards/models.py index 4551740..e20b587 100644 --- a/flashcards/models.py +++ b/flashcards/models.py @@ -226,7 +226,7 @@ class UserFlashcard(Model): if self.last_interval == 1: self.last_interval = 6 else: - self.last_response_factor = min(1.3, self.last_response_factor + (0.1 - (5 - q) * (0.08 + (5 - q) * 0.02))) + self.last_response_factor = max(1.3, self.last_response_factor + (0.1 - (5 - q) * (0.08 + (5 - q) * 0.02))) self.last_interval += (now() - self.next_review).days self.last_interval = int(round(self.last_interval * self.last_response_factor)) self.next_review = user_flashcard_quiz.when + timedelta(days=self.last_interval) -- 1.9.1