mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
QUEUE_USER_BURIED
This commit is contained in:
parent
69436643fe
commit
4a21911d74
4 changed files with 5 additions and 4 deletions
|
@ -15,6 +15,7 @@ NEW_CARDS_RANDOM = 0
|
||||||
NEW_CARDS_DUE = 1
|
NEW_CARDS_DUE = 1
|
||||||
|
|
||||||
# Queue types
|
# Queue types
|
||||||
|
QUEUE_TYPE_MANUALLY_BURIED = -3
|
||||||
QUEUE_TYPE_NEW = 0
|
QUEUE_TYPE_NEW = 0
|
||||||
QUEUE_TYPE_LRN = 1
|
QUEUE_TYPE_LRN = 1
|
||||||
|
|
||||||
|
|
|
@ -278,7 +278,7 @@ select distinct(n.id) from cards c, notes n where c.nid=n.id and """
|
||||||
elif val == "suspended":
|
elif val == "suspended":
|
||||||
return "c.queue = -1"
|
return "c.queue = -1"
|
||||||
elif val == "buried":
|
elif val == "buried":
|
||||||
return "c.queue in (-2, -3)"
|
return f"c.queue in (-2, {QUEUE_TYPE_MANUALLY_BURIED})"
|
||||||
elif val == "due":
|
elif val == "due":
|
||||||
return f"""
|
return f"""
|
||||||
(c.queue in (2,3) and c.due <= %d) or
|
(c.queue in (2,3) and c.due <= %d) or
|
||||||
|
|
|
@ -28,7 +28,7 @@ CARD_TYPE_RELEARNING = 3
|
||||||
QUEUE_TYPE_PREVIEW = 4
|
QUEUE_TYPE_PREVIEW = 4
|
||||||
QUEUE_TYPE_DAY_LEARN_RELEARN = 3
|
QUEUE_TYPE_DAY_LEARN_RELEARN = 3
|
||||||
QUEUE_TYPE_SIBLING_BURIED = -2
|
QUEUE_TYPE_SIBLING_BURIED = -2
|
||||||
QUEUE_TYPE_MANUALLY_BURIED = -3
|
|
||||||
# revlog types: 0=lrn, 1=rev, 2=relrn, 3=early review
|
# revlog types: 0=lrn, 1=rev, 2=relrn, 3=early review
|
||||||
# positive revlog intervals are in days (rev), negative in seconds (lrn)
|
# positive revlog intervals are in days (rev), negative in seconds (lrn)
|
||||||
# odue/odid store original due/did when cards moved to filtered deck
|
# odue/odid store original due/did when cards moved to filtered deck
|
||||||
|
|
|
@ -624,7 +624,7 @@ def test_bury():
|
||||||
# burying
|
# burying
|
||||||
d.sched.buryCards([c.id], manual=True) # pylint: disable=unexpected-keyword-arg
|
d.sched.buryCards([c.id], manual=True) # pylint: disable=unexpected-keyword-arg
|
||||||
c.load()
|
c.load()
|
||||||
assert c.queue == -3
|
assert c.queue == QUEUE_TYPE_MANUALLY_BURIED
|
||||||
d.sched.buryCards([c2.id], manual=False) # pylint: disable=unexpected-keyword-arg
|
d.sched.buryCards([c2.id], manual=False) # pylint: disable=unexpected-keyword-arg
|
||||||
c2.load()
|
c2.load()
|
||||||
assert c2.queue == -2
|
assert c2.queue == -2
|
||||||
|
@ -1226,7 +1226,7 @@ def test_moveVersions():
|
||||||
col.sched.answerCard(c, 1)
|
col.sched.answerCard(c, 1)
|
||||||
col.sched.buryCards([c.id])
|
col.sched.buryCards([c.id])
|
||||||
c.load()
|
c.load()
|
||||||
assert c.queue == -3
|
assert c.queue == QUEUE_TYPE_MANUALLY_BURIED
|
||||||
|
|
||||||
# revert to version 1
|
# revert to version 1
|
||||||
col.changeSchedulerVer(1)
|
col.changeSchedulerVer(1)
|
||||||
|
|
Loading…
Reference in a new issue