make a distinction between cards in learning and relearing on upgrade

This commit is contained in:
Damien Elmes 2012-05-22 20:58:27 +09:00
parent 0fcf36c2a7
commit cb24e106e6

View file

@ -684,7 +684,10 @@ and ord = ? limit 1""", m['id'], t['ord']):
# and failed cards # and failed cards
left = len(col.decks.confForDid(1)['lapse']['delays'])*1001 left = len(col.decks.confForDid(1)['lapse']['delays'])*1001
col.db.execute(""" col.db.execute("""
update cards set odue = ?, left=?, type=2, ivl=max(ivl, 1) where type=1""", update cards set left=?,type=1,queue=1,ivl=1 where type=1 and ivl <= 1""",
left)
col.db.execute("""
update cards set odue=?,left=?,type=2 where type=1 and ivl > 1""",
col.sched.today+1, left) col.sched.today+1, left)
# and due cards # and due cards
col.db.execute(""" col.db.execute("""