mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Ignore rescheduled cards in old stats page (#2863)
* Ignore rescheduled cards in old stats page Rescheduled cards are not actual reviews. So, including them in Cards Studied Today is inappropriate. * Simplify SQL query * Fix Answer Buttons graph * Fix error * Potentially fix error
This commit is contained in:
parent
4e281026a0
commit
884e8dcac5
1 changed files with 3 additions and 3 deletions
|
@ -152,7 +152,7 @@ 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 = {REVLOG_CRAM} 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 type != {REVLOG_RESCHED} and id > ? """
|
||||||
+ lim,
|
+ lim,
|
||||||
(self.col.sched.day_cutoff - 86400) * 1000,
|
(self.col.sched.day_cutoff - 86400) * 1000,
|
||||||
)
|
)
|
||||||
|
@ -746,7 +746,7 @@ select count(), avg(ivl), max(ivl) from cards where did in %s and queue = {QUEUE
|
||||||
"id > %d" % ((self.col.sched.day_cutoff - (days * 86400)) * 1000)
|
"id > %d" % ((self.col.sched.day_cutoff - (days * 86400)) * 1000)
|
||||||
)
|
)
|
||||||
if lims:
|
if lims:
|
||||||
lim = "where " + " and ".join(lims)
|
lim = "and " + " and ".join(lims)
|
||||||
else:
|
else:
|
||||||
lim = ""
|
lim = ""
|
||||||
ease4repl = "ease"
|
ease4repl = "ease"
|
||||||
|
@ -756,7 +756,7 @@ select (case
|
||||||
when type in ({REVLOG_LRN},{REVLOG_RELRN}) then 0
|
when type in ({REVLOG_LRN},{REVLOG_RELRN}) then 0
|
||||||
when lastIvl < 21 then 1
|
when lastIvl < 21 then 1
|
||||||
else 2 end) as thetype,
|
else 2 end) as thetype,
|
||||||
(case when type in ({REVLOG_LRN},{REVLOG_RELRN}) and ease = 4 then %s else ease end), count() from revlog %s
|
(case when type in ({REVLOG_LRN},{REVLOG_RELRN}) and ease = 4 then %s else ease end), count() from revlog where type != {REVLOG_RESCHED} %s
|
||||||
group by thetype, ease
|
group by thetype, ease
|
||||||
order by thetype, ease"""
|
order by thetype, ease"""
|
||||||
% (ease4repl, lim)
|
% (ease4repl, lim)
|
||||||
|
|
Loading…
Reference in a new issue