REVLOG_CRAM
This commit is contained in:
parent
e1a283b168
commit
600c70edcb
@ -73,6 +73,7 @@ BUTTON_FOUR = 4
|
||||
REVLOG_LRN = 0
|
||||
REVLOG_REV = 1
|
||||
REVLOG_RELRN = 2
|
||||
REVLOG_CRAM = 3
|
||||
|
||||
# Labels
|
||||
##########################################################################
|
||||
|
@ -556,7 +556,7 @@ did = ? and queue = 3 and due <= ? limit ?""",
|
||||
# ease 1=no, 2=yes, 3=remove
|
||||
conf = self._lrnConf(card)
|
||||
if card.odid and not card.wasNew:
|
||||
type = 3
|
||||
type = REVLOG_CRAM
|
||||
elif card.type == 2:
|
||||
type = REVLOG_RELRN
|
||||
else:
|
||||
|
@ -961,7 +961,7 @@ select id from cards where did in %s and queue = 2 and due <= ? limit ?)"""
|
||||
def _answerRevCard(self, card: Card, ease: int) -> None:
|
||||
delay = 0
|
||||
early = bool(card.odid and (card.odue > self.today))
|
||||
type = early and 3 or REVLOG_REV
|
||||
type = early and REVLOG_CRAM or REVLOG_REV
|
||||
|
||||
if ease == BUTTON_ONE:
|
||||
delay = self._rescheduleLapse(card)
|
||||
|
@ -156,7 +156,7 @@ sum(case when ease = 1 then 1 else 0 end), /* failed */
|
||||
sum(case when type = {REVLOG_LRN} then 1 else 0 end), /* learning */
|
||||
sum(case when type = {REVLOG_REV} then 1 else 0 end), /* review */
|
||||
sum(case when type = {REVLOG_RELRN} then 1 else 0 end), /* relearn */
|
||||
sum(case when type = 3 then 1 else 0 end) /* filter */
|
||||
sum(case when type = {REVLOG_CRAM} then 1 else 0 end) /* filter */
|
||||
from revlog where id > ? """
|
||||
+ lim,
|
||||
(self.col.sched.dayCutoff - 86400) * 1000,
|
||||
@ -552,13 +552,13 @@ sum(case when type = {REVLOG_LRN} then 1 else 0 end), -- lrn count
|
||||
sum(case when type = {REVLOG_REV} and lastIvl < 21 then 1 else 0 end), -- yng count
|
||||
sum(case when type = {REVLOG_REV} and lastIvl >= 21 then 1 else 0 end), -- mtr count
|
||||
sum(case when type = {REVLOG_RELRN} then 1 else 0 end), -- lapse count
|
||||
sum(case when type = 3 then 1 else 0 end), -- cram count
|
||||
sum(case when type = {REVLOG_CRAM} then 1 else 0 end), -- cram count
|
||||
sum(case when type = {REVLOG_LRN} then time/1000.0 else 0 end)/:tf, -- lrn time
|
||||
-- yng + mtr time
|
||||
sum(case when type = {REVLOG_REV} and lastIvl < 21 then time/1000.0 else 0 end)/:tf,
|
||||
sum(case when type = {REVLOG_REV} and lastIvl >= 21 then time/1000.0 else 0 end)/:tf,
|
||||
sum(case when type = {REVLOG_RELRN} then time/1000.0 else 0 end)/:tf, -- lapse time
|
||||
sum(case when type = 3 then time/1000.0 else 0 end)/:tf -- cram time
|
||||
sum(case when type = {REVLOG_CRAM} then time/1000.0 else 0 end)/:tf -- cram time
|
||||
from revlog %s
|
||||
group by day order by day"""
|
||||
% lim,
|
||||
|
Loading…
Reference in New Issue
Block a user