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
|
@ -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_RELRN} then 1 else 0 end), /* relearn */
|
||||
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,
|
||||
(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)
|
||||
)
|
||||
if lims:
|
||||
lim = "where " + " and ".join(lims)
|
||||
lim = "and " + " and ".join(lims)
|
||||
else:
|
||||
lim = ""
|
||||
ease4repl = "ease"
|
||||
|
@ -756,7 +756,7 @@ select (case
|
|||
when type in ({REVLOG_LRN},{REVLOG_RELRN}) then 0
|
||||
when lastIvl < 21 then 1
|
||||
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
|
||||
order by thetype, ease"""
|
||||
% (ease4repl, lim)
|
||||
|
|
Loading…
Reference in New Issue