Commit graph

261 commits

Author SHA1 Message Date
Damien Elmes
d9348e72dd replace fi adjustment with factor 2012-05-20 21:35:56 +09:00
Damien Elmes
745bbe1382 update children too 2012-05-20 20:55:14 +09:00
Damien Elmes
f00b7201b4 add fn to extend today's limits (into the negatives allowed) 2012-05-20 20:44:21 +09:00
Damien Elmes
faa3c7134b find and cards with invalid dids on deck list 2012-05-20 19:37:43 +09:00
Damien Elmes
b6bdd4aa21 daily learning queue
The way we were handling 1 day+ learning intervals was not great - they'd show
up at the start of a new day before normal reviews, meaning the hardest cards
came first. In previous Anki versions we deliberately sorted the queue in the
opposite order to prevent that. When relearning the cards the next day, if you
failed a card and expected to see it in 10 minutes that wouldn't happen
either, as all the overdue cards took precedence.

To fix this, we put cards that are due tomorrow or later into a separate queue
(queue 3), and pull cards from that queue only after the reviews are done. In
the future it might also be nice to move overdue learning cards into that
queue automatically at the start of a session.
2012-05-20 16:56:14 +09:00
Damien Elmes
32fde2a072 encode daily steps in left
When a user has learning steps that extend past the daily cutoff, we end up
counting them all instead of only the ones that would be done today. In order
to avoid this without expensive calculations or db schema changes, we
calculate the number of steps until the daily cutoff and pack it into the left
column, as totalLeft + leftToday*1000.
2012-05-20 16:05:50 +09:00
Damien Elmes
33407a6043 if the next step of the learn card is past the day cutoff, ignore left 2012-05-20 12:01:52 +09:00
Damien Elmes
072e93590b don't bump mod time when expired failed cards 2012-05-14 05:44:48 +09:00
Damien Elmes
32bb469c63 proactively remove empty dids 2012-05-13 08:32:48 +09:00
Damien Elmes
e3a848b5b8 tally lrn separately so we don't limit it with the rev limit 2012-05-06 02:20:25 +09:00
Damien Elmes
0e2637a999 when cram deck removed, cards in learning need to be reset 2012-05-06 01:55:18 +09:00
Damien Elmes
c2370fe3ef fix bug where nondue review cards in cram were treated as due 2012-05-06 01:44:10 +09:00
Damien Elmes
623dff8df0 allow for more cards in a cram deck 2012-05-05 23:52:47 +09:00
Damien Elmes
47e8e3d718 must set odue to zero when removing failed 2012-05-05 01:28:47 +09:00
Damien Elmes
d359a600d9 adjust properties directly on leech 2012-05-05 01:20:18 +09:00
Damien Elmes
461e240d53 allow python-bundled json 2012-04-28 17:41:56 +09:00
Damien Elmes
491596096a fix inverted cmp in leech handler 2012-04-28 16:29:59 +09:00
Damien Elmes
b5ad2eb880 clear overdue in deck browser too 2012-04-24 05:38:18 +09:00
Damien Elmes
b2bc97ee49 clear overdue lapsed cards from learning queue 2012-04-24 05:28:19 +09:00
Damien Elmes
dd4e85edfd automatically .reset() if attempting to getCard() from fresh deck 2012-04-23 04:16:51 +09:00
Damien Elmes
bf13492c3c fix dynIvlBoost() thanks to itraveller 2012-04-23 00:24:20 +09:00
Damien Elmes
f2e183f729 check day when checking due counts 2012-04-22 09:26:08 +09:00
Damien Elmes
4b3e1f0d2b accept a string did in remDyn() 2012-04-20 02:19:00 +09:00
Damien Elmes
20ecd7359d when resetting lrn reps, need to choose between lrn/lapse 2012-04-19 05:53:24 +09:00
Damien Elmes
f963a31d9c must set factor when cards are rescheduled as a review 2012-04-19 04:40:43 +09:00
Damien Elmes
336b1e7c58 fix bugs with daily counts
- When we reset() the deck, we need to update the daily counts for all decks,
  not just the selected ones, or the deck list is inaccurate
- We don't want to save the decks at that time, or simply opening Anki on
  another machine will cause a conflict with all decks
2012-04-19 02:45:46 +09:00
Damien Elmes
35f89bfea7 collapse relearning to 2 buttons if single step 2012-04-18 01:59:51 +09:00
Damien Elmes
55812bef86 remove cards from cram decks and the relearning queue on suspend 2012-04-17 22:53:48 +09:00
Damien Elmes
5ac1ec2067 when shifting cards on reschedule, only shift new cards 2012-04-12 00:37:22 +09:00
Damien Elmes
bbac32b477 ensure lapsed reviews are scheduled for tomorrow on graduate 2012-04-07 14:28:41 +09:00
Damien Elmes
5c59f6a558 fix illegal check thanks to kostas 2012-04-05 03:50:03 +09:00
Damien Elmes
7553573304 fix earlier cram fix 2012-03-30 02:42:54 +09:00
Damien Elmes
07c3297a9a don't include suspended cards in cram 2012-03-30 00:03:30 +09:00
Damien Elmes
d8ec8d0389 another rev scheduling bug 2012-03-27 09:15:39 +09:00
Damien Elmes
c62dd41f77 bug in rev scheduling 2012-03-27 05:22:47 +09:00
Damien Elmes
eb8326c605 failure mult should only be applied to reviews 2012-03-24 23:58:24 +09:00
Damien Elmes
ce86670c76 find&replace should ignore notes without provided field 2012-03-24 04:06:51 +09:00
Damien Elmes
5c5341b5e5 make sure we don't modify the active decks during scheduling 2012-03-20 00:37:39 +09:00
Damien Elmes
e9a87b9fd9 apply failure multiplier in cram mode 2012-03-20 00:03:52 +09:00
Damien Elmes
62117453ff timeboxing 2012-03-16 19:56:10 +09:00
Damien Elmes
4c369ba6af make sure daysLate() works with review cards in a cram deck 2012-03-16 19:08:13 +09:00
Damien Elmes
17891edb72 card rescheduling needs to bump mod time and usn 2012-03-13 22:28:25 +09:00
Damien Elmes
acd0316a14 more cram orderings, clear out before rebuild 2012-03-13 21:40:31 +09:00
Damien Elmes
dc85212bfe remove review order options
As cram decks provide a more efficient way of ordering reviews, we can limit
normal reviews to just due order.
2012-03-13 19:25:28 +09:00
Damien Elmes
81c07158e9 make sure reviews are due when cramming 2012-03-13 19:16:39 +09:00
Damien Elmes
60dd0b426c store order as an index 2012-03-13 18:12:06 +09:00
Damien Elmes
d5dbfa3243 new/rev limits in tree shouldn't be applied for dyn decks 2012-03-12 23:27:12 +09:00
Damien Elmes
f4e962aa58 make sure we move reviews back to original deck 2012-03-12 12:33:46 +09:00
Damien Elmes
324861a946 or on bury 2012-03-12 12:17:57 +09:00
Damien Elmes
ea64e4da1b don't need to removeFailed() when suspending 2012-03-12 12:16:37 +09:00
Damien Elmes
dc589a5c15 rescheduling ignores dynamic decks 2012-03-12 12:08:46 +09:00
Damien Elmes
8030b2c969 use type not queue for rev sib. spacing, fix cram case 2012-03-11 14:52:12 +09:00
Damien Elmes
4a12ec62c1 log cram reps separately; fix std rev reps 2012-03-11 14:06:59 +09:00
Damien Elmes
da07e15a87 generalize into 'dynamic decks'
- search and limits are embedded in the deck
- decks can be refreshed
- they have the option to treat due reviews normally rather than cram them
- some options are inherited from the original deck, others taken from the
  dynamic deck
2012-03-10 19:41:37 +09:00
Damien Elmes
ffaf7ffc66 removing cram decks, estimates, failure handling 2012-03-09 06:56:07 +09:00
Damien Elmes
01404fafaa start of cram refactor 2012-03-08 16:47:22 +09:00
Damien Elmes
a2312f9a1f change cards table schema
In preparation for cramming:

- add odid for storing old deck on a per-card basis
- rename edue to odue
- at the moment note.did still exists, but in the future we may ignore it and
  use model.did instead
2012-03-08 11:28:12 +09:00
Damien Elmes
620f16c876 fix forgetCards() bug 2012-02-26 04:30:56 +09:00
Damien Elmes
d06dccad32 deck list counts should be reps not cards, to match study screen 2012-02-14 12:27:17 +09:00
Damien Elmes
030e5498b3 "this deck" 2012-02-13 12:31:35 +09:00
Damien Elmes
2a76c8f4f0 reload card after suspending it in leech handler
this fixes the issue with display of due time in browser after an unsuspend
2012-01-24 01:24:46 +09:00
Damien Elmes
766e153840 try to avoid showing the same card twice in a row 2012-01-24 00:43:44 +09:00
Damien Elmes
d9a19f3e5e fix parent limits on review screen counts 2012-01-23 22:10:03 +09:00
nobnago
262e04ed4f fixes wrong rev queue order 2012-01-17 22:07:42 +01:00
Damien Elmes
8ac1587b12 add per-deck due counts back to scheduler 2012-01-16 09:55:44 +09:00
Damien Elmes
bacbea13e0 conf() -> confForDid(); add getConf() 2011-12-13 13:56:05 +09:00
Damien Elmes
0448175d10 when estimating interval, return ideal, not adjusted 2011-12-13 12:20:30 +09:00
Damien Elmes
918bfa2e62 move some prefs into collection 2011-12-10 23:48:36 +09:00
Damien Elmes
4428c04774 new order is now a deck property 2011-12-10 22:45:44 +09:00
Damien Elmes
78494283c2 store forgetting index as %, fix card sorting 2011-12-10 04:11:43 +09:00
Damien Elmes
20ffbd57a7 don't need relearn flag, can infer from empty delays list 2011-12-09 08:36:00 +09:00
Damien Elmes
451962d4a8 drop the special config for top level decks
New/rev card mixing, collapse time and the timeboxing limit are now a
collection property. I appreciate how it could be useful to have those
settings per top-level deck in some cases, but having some settings inherited
from the top level deck makes for a confusing UI.
2011-12-09 07:55:40 +09:00
Damien Elmes
8c9c3489e5 fetch reviews in subdecks incrementally like new cards
- allows separate review order for different decks
- makes new card and rev card handling consistent
- for users who find it confusing to have cards from different decks mixed in
  and thus click on each deck in turn, they can now just select the parent
  deck and have it work as expected
- for users who want their cards mixed together randomly, they can keep the
  cards in a single deck
2011-12-09 04:02:43 +09:00
Damien Elmes
d52b2d4801 if counts() is passed a card, add the necessary count 2011-12-05 19:34:25 +09:00
Damien Elmes
8308c79fa6 minor refactor of count handling
- drop lrnCount; rename lrnRepCount to lrnCount
- on card fetch, decr count by card.left
- drop cardCounts(), rename repCounts() to just counts()
- fix lrn count bugs
2011-12-05 19:15:46 +09:00
Damien Elmes
e7101faff7 don't overcount learning reps by 1 2011-12-05 17:57:32 +09:00
Damien Elmes
c961b5843a fix ivl estimation for new cards 2011-12-02 22:10:33 +09:00
Damien Elmes
4a3b190453 fix bug in rev ivl adjustment that could lead to 0 day interval 2011-12-01 17:35:26 +09:00
Damien Elmes
223cc48052 don't wrap template in div; reference #card instead
We want the background color to fill the card area rather than only the size
of the card content, so we need to set the CSS for the outer container
instead.
2011-11-28 14:45:43 +09:00
Damien Elmes
daea038aa4 deckCounts -> deckDue 2011-11-24 17:04:26 +09:00
Damien Elmes
f7790275ce groups -> decks 2011-11-23 19:28:09 +09:00
Damien Elmes
279a942642 deck -> collection 2011-11-23 17:47:44 +09:00
Damien Elmes
6e4e8249fb facts -> notes 2011-11-23 12:37:21 +09:00
Damien Elmes
10e1c1b03e tweak tag handling 2011-11-23 11:39:33 +09:00
Damien Elmes
16ecfe4097 add forgetting index adj; thanks to adam mesha for the inspiration 2011-11-15 19:15:22 +09:00
Damien Elmes
58c56c433a apply review limit; fix finished msg 2011-11-15 04:05:44 +09:00
Damien Elmes
4a4f4797db update daily counts on reset instead of each review 2011-11-15 02:53:55 +09:00
Damien Elmes
c16cb6ee9b fix more bugs in group count tree 2011-10-24 01:28:43 +09:00
Damien Elmes
f37f4aff96 need to sort tree based on split components, not string order 2011-10-22 21:14:46 +09:00
Damien Elmes
40e9eea43f fix update cutoff call 2011-09-29 04:01:11 +09:00
Damien Elmes
699839188b ensure we give correct intervals for new cards 2011-09-23 14:55:20 +09:00
Damien Elmes
001a69db43 make sure we update the rep count on pass/fail, and add unit test 2011-09-23 12:52:38 +09:00
Damien Elmes
e7f416406d refactor learning
Rather than showing the user how many cards are in the learning queue, we want
to be able to show them the number of reps they have to do to clear the queue,
so they can better estimate the required time. Before we were counting up with
the grade column, but this means we can't quickly sum up the number of reps
left. So we invert it, and count down instead.

I also dropped the 'first time bonus' for now. If there's enough demand for
it, it can be added back by using the flags column, instead of a dedicated
cycles column.
2011-09-23 10:29:49 +09:00
Damien Elmes
2b34d8a948 more group/sched refactoring
- keep track of rep/time counts per group, instead of just at the top level
- sort by due after retrieving learn cards
- ensure activeGroups is sorted alphabetically
- ensure new cards come in alphabetical group order
- ensure queues are refilled when empty
2011-09-23 08:19:22 +09:00
Damien Elmes
024c42fef8 group scheduling refactor
see the following for background discussion:
http://groups.google.com/group/ankisrs-users/browse_thread/thread/4db5e82f7dff74fb

- change sched index to the more efficient gid, queue, due
- drop the dynamic index support. as there's no no q/a cache anymore, it's
  cheap enough to hit the cards table directly, and we can't use the index in
  its new form.
- drop order by clauses (see todo)
- ensure there's always an active group. if users want to study all groups at
  once, they need to create a top level group. we do this because otherwise
  the 'top level group' that's active when everything is selected is not
  clear.

to do:

- new cards will appear in gid order, but the gid numbers don't reflect
  alphabetical sorting. we need to change the scheduling code so that it steps
  through each group in turn
- likewise for the learn queue
2011-09-22 11:54:01 +09:00
Damien Elmes
dac46752ed drop the count_answered option 2011-09-18 09:42:04 +09:00
Damien Elmes
f3965f4c09 when suspending leeches, make sure we don't put the card back in the queue 2011-09-17 21:42:41 +09:00
Damien Elmes
bc9f6e6a24 add USNs
Decks now have an "update sequence number". All objects also have a USN, which
is set to the deck USN each time they are modified. When syncing, each side
sends any objects with a USN >= clientUSN. When objects are copied via sync,
they have their USNs bumped to the current serverUSN. After a sync, the USN on
both sides is set to serverUSN + 1.

This solves the failing three way test, ensures we receive all changes
regardless of clock drift, and as the revlog also has a USN now, ensures that
old revlog entries are imported properly too.

Objects retain a separate modification time, which is used for conflict
resolution, deck subscriptions/importing, and info for the user.

Note that if the clock is too far off, it will still cause confusion for
users, as the due counts may be different depending on the time. For this
reason it's probably a good idea to keep a limit on how far the clock can
deviate.

We still keep track of the last sync time, but only so we can determine if the
schema has changed since the last sync.

The media code needs to be updated to use USNs too.
2011-09-13 21:10:21 +09:00
Damien Elmes
14b642f633 mod schema when rev order updated 2011-09-09 22:38:00 +09:00
Damien Elmes
af2b2373b9 dueCounts() 2011-09-09 18:40:46 +09:00