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