mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
apply selective study to review early
This commit is contained in:
parent
3d5a427f85
commit
98fb0f5bb9
1 changed files with 10 additions and 7 deletions
17
anki/deck.py
17
anki/deck.py
|
@ -503,16 +503,19 @@ where type >= 0
|
|||
|
||||
def _rebuildRevEarlyCount(self):
|
||||
# in the future it would be nice to skip the first x days of due cards
|
||||
extraLim = ""
|
||||
self.revCount = self.s.scalar("""
|
||||
select count() from cards where type = 1 and combinedDue > :now
|
||||
%s""" % extraLim, now=self.dueCutoff)
|
||||
self.revCount = self.s.scalar(
|
||||
self.cardLimit(
|
||||
"revActive", "revInactive", """
|
||||
select count() from cards c where type = 1 and combinedDue > :now
|
||||
"""), now=self.dueCutoff)
|
||||
|
||||
def _fillRevEarlyQueue(self):
|
||||
if self.revCount and not self.revQueue:
|
||||
self.revQueue = self.s.all("""
|
||||
select id, factId from cards where type = 1 and combinedDue > :lim
|
||||
order by combinedDue limit %d""" % self.queueLimit, lim=self.dueCutoff)
|
||||
self.revQueue = self.s.all(
|
||||
self.cardLimit(
|
||||
"revActive", "revInactive", """
|
||||
select id, factId from cards c where type = 1 and combinedDue > :lim
|
||||
order by combinedDue limit %d""" % self.queueLimit), lim=self.dueCutoff)
|
||||
self.revQueue.reverse()
|
||||
|
||||
# Learn more
|
||||
|
|
Loading…
Reference in a new issue