From 884405d2a69a14de33faaa6b0f6aa49999eb564d Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Tue, 19 Apr 2011 06:55:30 +0900 Subject: [PATCH] show the latest review instead --- anki/stats.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/anki/stats.py b/anki/stats.py index 8ad101c19..416aef303 100644 --- a/anki/stats.py +++ b/anki/stats.py @@ -24,9 +24,12 @@ class CardStats(object): self.txt = "" self.addLine(_("Added"), self.strTime(c.crt)) first = self.deck.db.scalar( - "select time/1000 from revlog where rep = 1 and cid = :id", id=c.id) + "select min(time) from revlog where cid = ?", c.id) + last = self.deck.db.scalar( + "select max(time) from revlog where cid = ?", c.id) if first: - self.addLine(_("First Review"), self.strTime(first)) + self.addLine(_("First Review"), self.strTime(first/1000)) + self.addLine(_("Latest Review"), self.strTime(last/1000)) if c.reps: if c.queue == 2: next = time.time()+((self.deck.sched.today - c.due)*86400)