diff --git a/anki/schedv2.py b/anki/schedv2.py index ce15876c5..04e002699 100644 --- a/anki/schedv2.py +++ b/anki/schedv2.py @@ -1595,13 +1595,20 @@ else type end), due = odue, odue = 0, odid = 0, usn = ? where odid != 0""", self.col.usn()) - def _removeAllFromLearning(self): + def _removeAllFromLearning(self, schedVer=2): # remove review cards from relearning - self.col.db.execute(""" -update cards set -due = odue, queue = 2, type = 2, mod = %d, usn = %d, odue = 0 -where queue in (1,3) and type in (2, 3) -""" % (intTime(), self.col.usn())) + if schedVer == 1: + self.col.db.execute(""" + update cards set + due = odue, queue = 2, type = 2, mod = %d, usn = %d, odue = 0 + where queue in (1,3) and type in (2, 3) + """ % (intTime(), self.col.usn())) + else: + self.col.db.execute(""" + update cards set + due = %d+ivl, queue = 2, type = 2, mod = %d, usn = %d, odue = 0 + where queue in (1,3) and type in (2, 3) + """ % (self.today, intTime(), self.col.usn())) # remove new cards from learning self.forgetCards(self.col.db.list( "select id from cards where queue in (1,3)")) @@ -1637,5 +1644,5 @@ where queue < 0""" % (intTime(), self.col.usn())) def moveToV2(self): self._emptyAllFiltered() - self._removeAllFromLearning() + self._removeAllFromLearning(schedVer=1) self._remapLearningAnswers("ease=ease+1 where ease in (2,3)")