From dc589a5c156c9151557f6bbaaf8b68312a05cb84 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 12 Mar 2012 12:08:07 +0900 Subject: [PATCH] rescheduling ignores dynamic decks --- anki/sched.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/anki/sched.py b/anki/sched.py index 8b320ef1f..03a4fef1a 100644 --- a/anki/sched.py +++ b/anki/sched.py @@ -1007,7 +1007,6 @@ your short-term review workload will become.""")) def forgetCards(self, ids): "Put cards at the end of the new queue." - print "fixme: make sure this works with dynamic decks, and mv too" self.col.db.execute( "update cards set type=0,queue=0,ivl=0 where id in "+ids2str(ids)) pmax = self.col.db.scalar( @@ -1023,9 +1022,9 @@ your short-term review workload will become.""")) for id in ids: r = random.randint(imin, imax) d.append(dict(id=id, due=r+t, ivl=max(1, r), mod=mod)) - self.col.db.executemany( - "update cards set type=2,queue=2,ivl=:ivl,due=:due where id=:id", - d) + self.col.db.executemany(""" +update cards set type=2,queue=2,ivl=:ivl,due=:due where id=:id and odid=0""", + d) # Repositioning new cards ##########################################################################