rescheduling ignores dynamic decks

This commit is contained in:
Damien Elmes 2012-03-12 12:08:07 +09:00
parent 8030b2c969
commit dc589a5c15

View file

@ -1007,7 +1007,6 @@ your short-term review workload will become."""))
def forgetCards(self, ids): def forgetCards(self, ids):
"Put cards at the end of the new queue." "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( self.col.db.execute(
"update cards set type=0,queue=0,ivl=0 where id in "+ids2str(ids)) "update cards set type=0,queue=0,ivl=0 where id in "+ids2str(ids))
pmax = self.col.db.scalar( pmax = self.col.db.scalar(
@ -1023,8 +1022,8 @@ your short-term review workload will become."""))
for id in ids: for id in ids:
r = random.randint(imin, imax) r = random.randint(imin, imax)
d.append(dict(id=id, due=r+t, ivl=max(1, r), mod=mod)) d.append(dict(id=id, due=r+t, ivl=max(1, r), mod=mod))
self.col.db.executemany( self.col.db.executemany("""
"update cards set type=2,queue=2,ivl=:ivl,due=:due where id=:id", update cards set type=2,queue=2,ivl=:ivl,due=:due where id=:id and odid=0""",
d) d)
# Repositioning new cards # Repositioning new cards