reviewHistory->revlog

This commit is contained in:
Damien Elmes 2011-02-19 12:53:38 +09:00
parent 0080a8ffc1
commit 7b52a4e519

View file

@ -1666,7 +1666,7 @@ not be touched.""") %
h['newof'] = str(self.deck.newCountAll()) h['newof'] = str(self.deck.newCountAll())
# counts & time for today # counts & time for today
todayStart = self.deck.failedCutoff - 86400 todayStart = self.deck.failedCutoff - 86400
sql = "select count(), sum(thinkingTime) from reviewHistory" sql = "select count(), sum(userTime) from revlog"
(reps, time_) = self.deck.s.first( (reps, time_) = self.deck.s.first(
sql + " where time > :start", start=todayStart) sql + " where time > :start", start=todayStart)
h['timeToday'] = sessionColour % ( h['timeToday'] = sessionColour % (
@ -1685,10 +1685,10 @@ not be touched.""") %
start = self.deck.sessionStartTime or time.time() - limit start = self.deck.sessionStartTime or time.time() - limit
start2 = self.deck.lastSessionStart or start - limit start2 = self.deck.lastSessionStart or start - limit
last10 = self.deck.s.scalar( last10 = self.deck.s.scalar(
"select count(*) from reviewHistory where time >= :t", "select count(*) from revlog where time >= :t",
t=start) t=start)
last20 = self.deck.s.scalar( last20 = self.deck.s.scalar(
"select count(*) from reviewHistory where " "select count(*) from revlog where "
"time >= :t and time < :t2", "time >= :t and time < :t2",
t=start2, t2=start) t=start2, t2=start)
h['repsInSes'] = sessionColour % last10 h['repsInSes'] = sessionColour % last10