mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
reset rep/lapse count on export
This commit is contained in:
parent
500dff04c8
commit
6c1239ee9c
2 changed files with 7 additions and 1 deletions
|
@ -161,7 +161,7 @@ class AnkiExporter(Exporter):
|
|||
data)
|
||||
else:
|
||||
# need to reset card state
|
||||
self.dst.sched.forgetCards(cids)
|
||||
self.dst.sched.resetCards(cids)
|
||||
# models
|
||||
for m in self.src.models.all():
|
||||
if int(m['id']) in mids:
|
||||
|
|
|
@ -1216,6 +1216,12 @@ update cards set type=2,queue=2,ivl=:ivl,due=:due,
|
|||
usn=:usn, mod=:mod, factor=:fact where id=:id and odid=0""",
|
||||
d)
|
||||
|
||||
def resetCards(self, ids):
|
||||
"Completely reset cards for export."
|
||||
self.col.db.execute(
|
||||
"update cards set reps=0, lapses=0 where id in " + ids2str(ids))
|
||||
self.forgetCards(ids)
|
||||
|
||||
# Repositioning new cards
|
||||
##########################################################################
|
||||
|
||||
|
|
Loading…
Reference in a new issue