Damien Elmes
a4f644e780
correctly determine period when relying on first day
2011-04-29 11:36:01 +09:00
Damien Elmes
6a93e69fee
prevent people from shooting themselves in the foot
2011-04-28 09:31:48 +09:00
Damien Elmes
f969aec03f
add created field to models so we can tell if they were originally the same
2011-04-28 09:24:05 +09:00
Damien Elmes
5856ad7545
make latex pre/postamble a model property
2011-04-28 09:24:05 +09:00
Damien Elmes
3327c27d81
only look at the last 10 answers for time
2011-04-28 09:24:05 +09:00
Damien Elmes
0bbdd722c2
very basic eta
2011-04-28 09:24:05 +09:00
Damien Elmes
19fd581839
change default lrn timing; leechAction doesn't need an array
2011-04-28 09:24:05 +09:00
Damien Elmes
754dcef4f7
handle the case where learning cards have a grade higher than their config
2011-04-28 09:24:05 +09:00
Damien Elmes
0d6064b933
rename()
2011-04-28 09:24:05 +09:00
Damien Elmes
47c30f172f
fix issues suspending learning cards
...
- cards in final review are first reset as rev cards so that type==queue and
they can be restored correctly
- new cards in learning have type set to 1 so they too can be restored
correctly
2011-04-28 09:24:05 +09:00
Damien Elmes
6946dc2eaa
make sure we don't introduce fp due times for learn cards
2011-04-28 09:24:05 +09:00
Damien Elmes
d1deeb2b37
keep track of session reps in scheduler
2011-04-28 09:24:05 +09:00
Damien Elmes
adb600e94d
if the user has relearn failed on, show the learn interval
2011-04-28 09:24:05 +09:00
Damien Elmes
add2e0aaa9
give easy an extra day boost
2011-04-28 09:24:05 +09:00
Damien Elmes
2fa767c503
when rescheduling ensure ivl >= 1; remove dead code
2011-04-28 09:24:05 +09:00
Damien Elmes
88c4f010d3
update rescheduling
...
like forgetCards(), we no longer adjust the stats or revlog for the card
2011-04-28 09:24:05 +09:00
Damien Elmes
8a9174fd4d
we don't need rep in the revlog
2011-04-28 09:24:05 +09:00
Damien Elmes
cc0df00fe5
put cards at end when forgetting; drop support for forgetting leeches
...
forgetCards() needs to know the highest positioned card, and that requires a
full table scan, so it's not appropriate for part of answerCards()
2011-04-28 09:24:04 +09:00
Damien Elmes
5278b3c2bb
make sure due is converted to int on upgrade
2011-04-28 09:24:04 +09:00
Damien Elmes
431fd2585e
when adding cards, use rand(1, maxfid)
...
this means that content added earlier has a higher chance of appearing, but it
makes it consistent with sortCards(), and the user can sort manually if need
be
2011-04-28 09:24:04 +09:00
Damien Elmes
c4c1cdeb6b
if there are no cards to shift, don't try
2011-04-28 09:24:04 +09:00
Damien Elmes
7acdbfa9ae
support for shifting
2011-04-28 09:24:04 +09:00
Damien Elmes
b69031cd4f
generalize order/random
2011-04-28 09:24:04 +09:00
Damien Elmes
1641256da4
random ids should start at 1
2011-04-28 09:24:04 +09:00
Damien Elmes
82a3443abe
randomize if necessary on upgrade; don't add old option names
2011-04-28 09:24:04 +09:00
Damien Elmes
82c3119c90
update randomizing/ordering code and forgetCards()
...
instead of completely resetting a card like we did in resetCards() in the
past, forgetCards() just puts the card back in the new queue and leaves the
factor and revlog alone. If users want to complete reset a card, they'll need to
export it.
2011-04-28 09:24:04 +09:00
Damien Elmes
0df95eafc0
revlog updates
...
- use negative numbers to denote second intervals
- record the rev ivl when leaving lrn queue
- improve revlog upgrade
- don't truncate precision when recording time taken
2011-04-28 09:24:04 +09:00
Damien Elmes
497c25daa4
make it easier for callers to add extra lines
2011-04-28 09:24:04 +09:00
Damien Elmes
466c14421b
tweak stats
2011-04-28 09:24:04 +09:00
Damien Elmes
7d64036a07
drop streak, make reps log all entries
...
reps should now be equal to the number of entries in the revlog, and only
exists so that we can order by review count in the browser efficiently
streak is no longer necessary as we have a learn queue now
2011-04-28 09:24:04 +09:00
Damien Elmes
946b54185e
more humane time display
2011-04-28 09:24:04 +09:00
Damien Elmes
58fa7ff714
be consistent with .db references
2011-04-28 09:24:04 +09:00
Damien Elmes
884405d2a6
show the latest review instead
2011-04-28 09:24:04 +09:00
Damien Elmes
5394740ea7
we don't need changed anymore, since it's usually only updated on review
2011-04-28 09:24:04 +09:00
Damien Elmes
d6258e7231
more tweaks
2011-04-28 09:24:04 +09:00
Damien Elmes
799b322e12
tweak card info layout
2011-04-28 09:24:04 +09:00
Damien Elmes
1c2b403348
apply selective groups to learning queue too
...
originally the plan was to get the user to "forget learning cards" or "remove
final drill" when switching between categories, but that's cumbersome and not
intuitive
2011-04-28 09:24:04 +09:00
Damien Elmes
890df46047
remember tags per model
2011-04-28 09:24:04 +09:00
Damien Elmes
9b56c862cd
use 'initial group' instead of 'fact group'
2011-04-28 09:24:04 +09:00
Damien Elmes
10426b6606
don't lstrip the bom
2011-04-28 09:24:04 +09:00
Damien Elmes
3af48542e4
include card & fact group in card info
2011-04-28 09:24:03 +09:00
Damien Elmes
003737c03f
generate a separate cumulative plot for each revlog type
2011-04-28 09:24:03 +09:00
Damien Elmes
b422019970
compress graph; show % correct instead; ignore hours with counts < 30
2011-04-28 09:24:03 +09:00
Damien Elmes
8085ba299e
hourly retention graph
2011-04-28 09:24:03 +09:00
Damien Elmes
2243b691cc
add full search to ignore formatting
2011-04-28 09:24:03 +09:00
Damien Elmes
4a568a83be
strip html from latex so clozes work properly
...
in the future we could look at replacing the cloze html with something
prettier, but it might cause latex errors
2011-04-28 09:24:03 +09:00
Damien Elmes
f0909ebed2
if context is off, don't lose outer field styling
2011-04-28 09:24:03 +09:00
Damien Elmes
0fdb966766
wrap clozes in a classed span instead of bold
2011-04-28 09:24:03 +09:00
Damien Elmes
03d00228aa
support stripping context of cloze
2011-04-28 09:24:03 +09:00
Damien Elmes
3c269d5fba
sticky fields; add forget option to leeches
2011-04-28 09:24:03 +09:00
Damien Elmes
344b111b80
centralize all tmp dir access
2011-04-28 09:24:03 +09:00
Damien Elmes
d96a0eaf08
rev count should be decremented on fetch
2011-04-28 09:24:03 +09:00
Damien Elmes
786600ebb6
check python version and locale on load
2011-04-28 09:24:03 +09:00
Damien Elmes
e38125d9aa
predictable review queue randomization
2011-04-28 09:24:03 +09:00
Damien Elmes
ce0df2652f
add utils for adding/removing tags
2011-04-28 09:24:03 +09:00
Damien Elmes
f7c11f5771
fix accidental inverted colours
2011-04-28 09:24:03 +09:00
Damien Elmes
aac840f375
remove redundant cardHasTag()
2011-04-28 09:24:03 +09:00
Damien Elmes
173379f451
minor utils tweaks
2011-04-28 09:24:03 +09:00
Damien Elmes
84d59e4b01
don't truncate sort field anymore, since we display it in the gui
2011-04-28 09:24:03 +09:00
Damien Elmes
e8d6714130
make sure the failed card count reflects the cutoff
2011-04-28 09:24:03 +09:00
Damien Elmes
8b747c3aac
allow the user to choose if case should be folded
2011-04-28 09:24:03 +09:00
Damien Elmes
bee14e1a0b
make fieldNames() available for gui code too
2011-04-28 09:24:03 +09:00
Damien Elmes
d51cd5a433
find & replace
2011-04-28 09:24:03 +09:00
Damien Elmes
98a63285e1
port changeModel()
2011-04-28 09:24:02 +09:00
Damien Elmes
1baa7bb5b6
reload field map on fact load(); order by ordinal not id
2011-04-28 09:24:02 +09:00
Damien Elmes
5619959b5a
when reloading card, make sure cache is discarded
2011-04-28 09:24:02 +09:00
Damien Elmes
572fe6041a
convert some list comps to generators
2011-04-28 09:24:02 +09:00
Damien Elmes
d7b86da811
canonify tags after bulk update
2011-04-28 09:24:02 +09:00
Damien Elmes
93d80678f9
_fields -> fields
2011-04-28 09:24:02 +09:00
Damien Elmes
89673f0c0a
if no tags were provided, just return
2011-04-28 09:24:02 +09:00
Damien Elmes
d611299715
make sure add/delTags() is limited to provided ids
2011-04-28 09:24:02 +09:00
Damien Elmes
96d3a25c9a
add hook into upgrade
2011-04-28 09:24:02 +09:00
Damien Elmes
e344e1a6a8
default to a useful model id on upgrade
2011-04-28 09:24:02 +09:00
Damien Elmes
6be313bcd3
updateCardGids()
2011-04-28 09:24:02 +09:00
Damien Elmes
8c1c729544
fix card state negation
2011-04-28 09:24:02 +09:00
Damien Elmes
437b4780c0
add missing cardIvl sort
2011-04-28 09:24:02 +09:00
Damien Elmes
13a484ea36
allow user to abort schema mod
2011-04-28 09:24:02 +09:00
Damien Elmes
e339df5ef8
ensure first field can be sorted, flush config out, and ensure schema mod
2011-04-28 09:24:02 +09:00
Damien Elmes
1b3548f164
fix sorting by ease
2011-04-28 09:24:02 +09:00
Damien Elmes
2a225b1fae
use the sort property set in the deck
2011-04-28 09:24:02 +09:00
Damien Elmes
d089deae5a
add the ability to reverse sort order
2011-04-28 09:24:02 +09:00
Damien Elmes
6617214708
add recent list; fix groups
2011-04-28 09:24:02 +09:00
Damien Elmes
7ffff24790
fix case where multiple models have the same template
2011-04-28 09:24:02 +09:00
Damien Elmes
d6116a5377
model and group searching
2011-04-28 09:24:02 +09:00
Damien Elmes
aacb57c196
add a countless group tree too
2011-04-28 09:24:02 +09:00
Damien Elmes
9ebbdc2be1
sort by card ordinal after fact sort
2011-04-28 09:24:02 +09:00
Damien Elmes
efe6177c7a
refactor ordering
2011-04-28 09:24:02 +09:00
Damien Elmes
291bd399b7
field searching
...
dropped support for field:foo, as you can type 'foo:' instead to accomplish
the same thing
2011-04-28 09:24:01 +09:00
Damien Elmes
57938927e7
users can pass a number for template ordinal; makes show:one obsolete
2011-04-28 09:24:01 +09:00
Damien Elmes
94d4e319ae
fids and template searches
2011-04-28 09:24:01 +09:00
Damien Elmes
a13c18cf4b
start refactoring find code
2011-04-28 09:24:01 +09:00
Damien Elmes
2343222245
remove rest of q/a searching
2011-04-28 09:24:01 +09:00
Damien Elmes
69a9d665e3
question/answer searching is obsolete
2011-04-28 09:24:01 +09:00
Damien Elmes
4ffd239ea8
remove obsolete striphtmlalt
2011-04-28 09:24:01 +09:00
Damien Elmes
2dfdfad6f2
update license link
2011-04-28 09:24:01 +09:00
Damien Elmes
8fcc6b3085
gpl3->agpl
2011-04-28 09:24:01 +09:00
Damien Elmes
c5e7756304
ensure model/template gid exists; mark schema modified when group deleted
2011-04-28 09:24:01 +09:00
Damien Elmes
86a7106eab
when deleting a group, update cards and facts too
2011-04-28 09:24:01 +09:00
Damien Elmes
673913a2a8
fix group tree when no cards use a group
2011-04-28 09:24:01 +09:00
Damien Elmes
95b3f60353
strip sox munging
2011-04-28 09:24:01 +09:00
Damien Elmes
82d006d145
strip noise profile code
2011-04-28 09:24:01 +09:00
Damien Elmes
c682080890
make it easier to get media dir; remove tidyHTML()
2011-04-28 09:24:01 +09:00
Damien Elmes
6ed48171fc
add a default group to model, add groupName()
2011-04-28 09:24:01 +09:00
Damien Elmes
f256d18971
return fields in sorted order
2011-04-28 09:24:01 +09:00
Damien Elmes
ab3a86d44e
add noautosub arg to mplayer
2011-04-28 09:24:01 +09:00
Damien Elmes
c799b7c97e
include model name in stdmodels; provide ability to get model outside cache
2011-04-28 09:24:01 +09:00
Damien Elmes
de81f0238a
template moving
2011-04-28 09:24:01 +09:00
Damien Elmes
c8b16a0e0e
accept a reload argument in q()
2011-04-28 09:24:01 +09:00
Damien Elmes
dba04598ae
pad ivl graph
2011-04-28 09:24:01 +09:00
Damien Elmes
9705dbdcfe
small tweaks
2011-04-28 09:24:01 +09:00
Damien Elmes
fba161d0b1
tablify info
2011-04-28 09:24:01 +09:00
Damien Elmes
5dc418060e
fix forecost avg calculation
2011-04-28 09:24:00 +09:00
Damien Elmes
02b1494a10
improve review time data; make sure graph bounds include end points
2011-04-28 09:24:00 +09:00
Damien Elmes
4c8eec5659
duplicate imports
2011-04-28 09:24:00 +09:00
Damien Elmes
84d2f32685
move graph code into stats.py; remove old deck stats
2011-04-28 09:24:00 +09:00
Damien Elmes
4be8b9d38c
fix zerodiv and other errors
2011-04-28 09:24:00 +09:00
Damien Elmes
a856665824
give the pie a background again
2011-04-28 09:24:00 +09:00
Damien Elmes
b47275599b
fix selective on some graphs; tweak pie layout
2011-04-28 09:24:00 +09:00
Damien Elmes
2d8faa8608
give the forecast a sensible limit
2011-04-28 09:24:00 +09:00
Damien Elmes
b5c8ba7b9f
apply selective to card/fact counts
2011-04-28 09:24:00 +09:00
Damien Elmes
525787b33f
tweak call args
2011-04-28 09:24:00 +09:00
Damien Elmes
014cc035ee
add selective study limits to remaining graphs
2011-04-28 09:24:00 +09:00
Damien Elmes
be7794bb56
include day/week info too
2011-04-28 09:24:00 +09:00
Damien Elmes
ed9901a71d
add average review # to forecast
2011-04-28 09:24:00 +09:00
Damien Elmes
30d62875d0
css, more layout tweaks, add suspended back into display
2011-04-28 09:24:00 +09:00
Damien Elmes
282d0bb9ba
add deck creation date
2011-04-28 09:24:00 +09:00
Damien Elmes
a5d751283b
add a separate _title()
2011-04-28 09:24:00 +09:00
Damien Elmes
f67c72bec3
move the graph layout around
2011-04-28 09:24:00 +09:00
Damien Elmes
2479913f9b
add a pie graph, add average interval to ivls area
2011-04-28 09:24:00 +09:00
Damien Elmes
c64c7a2acb
hide the cumulative graph if datapoints < 2
2011-04-28 09:24:00 +09:00
Damien Elmes
74a52694ec
for daily graph, use minutes instead of hours
2011-04-28 09:24:00 +09:00
Damien Elmes
e950c8af1c
just chop off options/group completely
2011-04-28 09:24:00 +09:00
Damien Elmes
0b92423cf7
settings->options, return bool for syncingEnabled
2011-04-28 09:24:00 +09:00
Damien Elmes
4af961f1d0
put langs in lang
2011-04-28 09:24:00 +09:00
Damien Elmes
11f3de525f
groupConf() takes gcid, not gid
2011-04-28 09:23:59 +09:00
Damien Elmes
692fba2ea3
use the deck's groups instead of holding on to a private copy
2011-04-28 09:23:59 +09:00
Damien Elmes
e93ded1e04
update a few group configs
2011-04-28 09:23:59 +09:00
Damien Elmes
4b9c6fc822
track gcid additions too
2011-04-28 09:23:59 +09:00
Damien Elmes
77ee8f1385
ditch useGroups
2011-04-28 09:23:59 +09:00
Damien Elmes
f75e2af195
use a single group setting
2011-04-28 09:23:59 +09:00
Damien Elmes
73625e5751
include the gid in the tree so we can tell which groups are real
2011-04-28 09:23:59 +09:00
Damien Elmes
fc96e12a0a
add some randomness to lrn interval
2011-04-28 09:23:59 +09:00
Damien Elmes
495b058618
include total count in with rev+due
2011-04-28 09:23:59 +09:00
Damien Elmes
2a1355eb16
make the group tree part of the scheduler instead
2011-04-28 09:23:59 +09:00
Damien Elmes
728715ff84
counts by group
2011-04-28 09:23:59 +09:00
Damien Elmes
2d00163323
tree grouping; add column to groups so they can remember tags
2011-04-28 09:23:59 +09:00
Damien Elmes
e547b0586a
simplify undo
...
The undo code was using triggers and a temporary table to write out all changed rows before making a change. This made for powerful undo/redo support, but had some problems:
- creating the tables and triggers wasn't cheap, especially on mobile devices
- likewise, every data modification required writing into two separate databases, almost doubling the amount of writes required
- it was possible to leave the DB in an inconsistent state if an undoable operation is followed by a non-undoable operation that references the undoable operation, and the user then rolls back the undoable operation.
To address these issues, we simplify undo by integrating it with the autosave changes:
- .save() can be passed a name to mark a rollback point. If the user undoes the change, any changes since the last save are lost
- autosaves happen every 5 minutes, and are pushed back on a .save(), so the maximum work a user can lose is 5 minutes.
- reviews are handled separately, so we can let the user undo multiple reviews at once
- if necessary, special cases could be added for other operations like marking
This means that if a user does two damaging operations in a row they won't be able to restore the first one, but such an event is both unlikely, and is also covered by the backups made each time a deck is opened.
2011-04-28 09:23:59 +09:00
Damien Elmes
01eb8d98a5
update order consts
2011-04-28 09:23:59 +09:00
Damien Elmes
2d6e9cc186
shorten some queue options
2011-04-28 09:23:59 +09:00
Damien Elmes
5914761ff8
don't die if the reps data is empty
2011-04-28 09:23:59 +09:00
Damien Elmes
b52a2eed6d
add descriptions and xaxis relabeling
2011-04-28 09:23:59 +09:00
Damien Elmes
674d2b2b30
add outline to ease bars
2011-04-28 09:23:59 +09:00
Damien Elmes
a3c7ae87e7
tweak layout, add cum% for intervals
2011-04-28 09:23:59 +09:00
Damien Elmes
eba64a0d3d
give intervals a type too
2011-04-28 09:23:59 +09:00
Damien Elmes
91903a79be
simplify graph calls
2011-04-28 09:23:59 +09:00
Damien Elmes
3c5c21f6a6
remove calcStats()
2011-04-28 09:23:59 +09:00
Damien Elmes
457b0f5c73
don't generate all the graphs at once
2011-04-28 09:23:59 +09:00
Damien Elmes
28191cde45
remove average time graph
2011-04-28 09:23:59 +09:00
Damien Elmes
f03745a1a3
average time graph
...
probably won't use this, but saving the code
2011-04-28 09:23:58 +09:00
Damien Elmes
63efc4dbaa
remove the separate timeGraph()
2011-04-28 09:23:58 +09:00
Damien Elmes
40706f3493
break reps graph into separate graphs; exclude cumulative line from stack
2011-04-28 09:23:58 +09:00
Damien Elmes
b9848c8cd9
display different graphs for different due periods; chunk by week or month
2011-04-28 09:23:58 +09:00
Damien Elmes
e090a64fbb
remove separate cumul graph and render over due instead
2011-04-28 09:23:58 +09:00
Damien Elmes
b40dbd6fb8
fix young count
2011-04-28 09:23:58 +09:00
Damien Elmes
43f8623d78
tweak graph layout and separate cumul graph into young/mature
2011-04-28 09:23:58 +09:00
Damien Elmes
72ed9ceb02
but don't mark all ease 1s as learning
2011-04-28 09:23:58 +09:00
Damien Elmes
139f1afc41
try to mark initial / lapsed on upgrade
2011-04-28 09:23:58 +09:00
Damien Elmes
494101212e
go back to 0.7 due to linewidth
2011-04-28 09:23:58 +09:00
Damien Elmes
d6f968a47f
add extra data to reps/time graphs, simplify graph building
2011-04-28 09:23:58 +09:00
Damien Elmes
c7eb4253bd
set a different log type for lapsed learning
2011-04-28 09:23:58 +09:00
Damien Elmes
4867ffe25a
revert to flot 0.6 due to redraw bug
2011-04-28 09:23:58 +09:00
Damien Elmes
153c574d64
fix lastInt and nextInt being switched on upgrade
2011-04-28 09:23:58 +09:00
Damien Elmes
9c1e0befc6
bundle js libs; include them in report(); fix some graph ids
2011-04-28 09:23:58 +09:00
Damien Elmes
6ec2500eb8
reps & time graphs
2011-04-28 09:23:58 +09:00
Damien Elmes
60ef1ec49f
eases graph
2011-04-28 09:23:58 +09:00
Damien Elmes
f850ce8b06
when upgrading, make sure old reps are marked as reviews
2011-04-28 09:23:58 +09:00
Damien Elmes
7d5d72adf8
add intervals, boxing in weeks for now
2011-04-28 09:23:58 +09:00
Damien Elmes
89fa08c548
due and cumulative due graphs ported
2011-04-28 09:23:58 +09:00
Damien Elmes
2ca9568196
initial graph code reorganization
2011-04-28 09:23:58 +09:00
Damien Elmes
cc9f5b8d86
stripMedia->strip
2011-04-28 09:23:58 +09:00
Damien Elmes
15737959f5
fix upgrading of type answer
2011-04-28 09:23:58 +09:00
Damien Elmes
f26c6f76bc
fix other missing properties on upgrade
2011-04-28 09:23:57 +09:00
Damien Elmes
3c40854583
fix collapsing; make sure learning cards are put back on the heap
2011-04-28 09:23:57 +09:00
Damien Elmes
e53ae3f2b0
if the colour is missing, it should be black, not white
2011-04-28 09:23:57 +09:00
Damien Elmes
4ff5b81134
return status of scheduler change
2011-04-28 09:23:57 +09:00
Damien Elmes
843e8f3b33
add routine to grab all css
2011-04-28 09:23:57 +09:00
Damien Elmes
cf43d23edd
fix factor
2011-04-28 09:23:57 +09:00
Damien Elmes
6b736f9f54
change deck stats layout
2011-04-28 09:23:57 +09:00
Damien Elmes
942bf43b52
fix stats
...
they're running now, but need to be sanity checked to make sure they're doing the right thing
2011-04-28 09:23:57 +09:00
Damien Elmes
63d1448d1e
only bump lrn count when cramming if card not immediately graduated
2011-04-28 09:23:57 +09:00
Damien Elmes
cfd4198503
add call to determine number of buttons to show; 2.5m -> 2.5mo
2011-04-28 09:23:57 +09:00
Damien Elmes
464eb2b684
make sure cramming works if there are no selected groups
2011-04-28 09:23:57 +09:00
Damien Elmes
31427f0133
fix lapse card scheduling
...
- make sure we set a timestamp due time, and put the card back in the queue
- add a unit test for it
2011-04-28 09:23:57 +09:00
Damien Elmes
765720b928
make sure due forecast returns 0 for empty days
2011-04-28 09:23:57 +09:00
Damien Elmes
e407697fb9
fix interval calculation for lapsed cards in learning queue
2011-04-28 09:23:57 +09:00
Damien Elmes
4d0e4836fe
add the ability to add extra classes to q/a
2011-04-28 09:23:57 +09:00
Damien Elmes
1d91e459ec
wrap the q/a in the card template div
2011-04-28 09:23:57 +09:00
Damien Elmes
8170b2a2f5
fix templates not being properly upgraded
2011-04-28 09:23:57 +09:00
Damien Elmes
4477e21369
make sure we load css on model init
2011-04-28 09:23:57 +09:00
Damien Elmes
9d52196949
add a bgclass helper func
2011-04-28 09:23:57 +09:00