From 5c84eec6b068a290f86cb13eccd79553dd978f2d Mon Sep 17 00:00:00 2001 From: Rohan Rangray Date: Wed, 3 Jun 2015 04:05:21 -0700 Subject: [PATCH] Added fix to adapt the algorithm to when the user reviews the card --- flashcards/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/flashcards/models.py b/flashcards/models.py index e9aee37..f6d11fc 100644 --- a/flashcards/models.py +++ b/flashcards/models.py @@ -224,6 +224,7 @@ class UserFlashcard(Model): 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_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) self.save() -- 1.9.1