Commit graph

111 commits

Author SHA1 Message Date
Damien Elmes
315838a56b fix answer buttons on review card 2012-05-27 13:14:58 +09:00
Damien Elmes
fa5fca5941 don't touch due cards either 2012-05-24 18:02:32 +09:00
Damien Elmes
ec1a4f7458 even if failed 2012-05-24 17:51:49 +09:00
Damien Elmes
e3bb4a817e and undue cards have untouched ivl 2012-05-24 17:35:27 +09:00
Damien Elmes
455796f189 when rescheduling off, graduating cards get reset to new 2012-05-24 17:12:12 +09:00
Damien Elmes
d6bce7c873 start on filter/cram updates, deck:filtered
- cram decks no longer pull cards from other cram decks, as tests like is:due
  don't make sense on crammed decks
- cram decks now default to not overriding the original deck's steps
- remove obsolote dyn_failed sort order - have to fix this in upgrade
- search/limit/order properties have been merged into a list, in case we may
  want to support multiple queries in the future (eg 10 cards from tag A, 20
  cards from tag B)
- added a resched option to disable boosting/failure - not yet implemented
- added an unused flag to allow cards to persist in the cram deck after
  graduation. implementing this will take some work and won't come in 2.0
- instead of is:filtereddeck, use deck:filtered
2012-05-24 13:38:58 +09:00
Damien Elmes
a8513a679a fix some unittest issues thanks to kostas 2012-05-21 08:47:00 +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
d877fad653 remove obsolete test 2012-05-17 10:13:30 +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
7c95b00253 fix unit test 2012-05-05 01:29:54 +09:00
Damien Elmes
b2bc97ee49 clear overdue lapsed cards from learning queue 2012-04-24 05:28:19 +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
cbeccc4d8a fix sched unit test 2012-04-15 10:51:34 +09:00
Damien Elmes
bbac32b477 ensure lapsed reviews are scheduled for tomorrow on graduate 2012-04-07 14:28:41 +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
60dd0b426c store order as an index 2012-03-13 18:12:06 +09:00
Damien Elmes
f4e962aa58 make sure we move reviews back to original deck 2012-03-12 12:33:46 +09:00
Damien Elmes
ea64e4da1b don't need to removeFailed() when suspending 2012-03-12 12:16:37 +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
f6b2e69669 remove did from notes, use model did instead 2012-03-09 09:12:27 +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
766e153840 try to avoid showing the same card twice in a row 2012-01-24 00:43:44 +09: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
0a279f6a26 remove clozectx, add styling to stdmodels 2011-12-11 02:33:27 +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
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
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
b99dbb1466 don't .reset() on deck load by default anymore 2011-12-05 13:40:37 +09:00
Damien Elmes
c961b5843a fix ivl estimation for new cards 2011-12-02 22:10:33 +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
6e4e8249fb facts -> notes 2011-11-23 12:37:21 +09:00
Damien Elmes
58c56c433a apply review limit; fix finished msg 2011-11-15 04:05:44 +09:00
Damien Elmes
795cdd7d3f remove the concept of non-active templates
The old template handling was too complicated, and generated frequent
questions on the forums. By dropping non-active templates we can do away with
the generate cards function, and advanced users can simulate the old behaviour
by using conditional field templates.
2011-11-08 18:06:19 +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
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