Commit 5c84eec6b068a290f86cb13eccd79553dd978f2d
1 parent
7d64912c69
Exists in
master
Added fix to adapt the algorithm to when the user reviews the card
Showing 1 changed file with 1 additions and 0 deletions Side-by-side Diff
flashcards/models.py
View file @
5c84eec
... | ... | @@ -224,6 +224,7 @@ |
224 | 224 | self.last_interval = 6 |
225 | 225 | else: |
226 | 226 | self.last_response_factor = min(1.3, self.last_response_factor + (0.1 - (5 - q) * (0.08 + (5 - q) * 0.02))) |
227 | + self.last_interval += (now() - self.next_review).days | |
227 | 228 | self.last_interval = int(round(self.last_interval * self.last_response_factor)) |
228 | 229 | self.next_review = user_flashcard_quiz.when + timedelta(days=self.last_interval) |
229 | 230 | self.save() |