Implemements the spacing algorithm.
Calculate new easy factor from old factor and rating.
EF’ := f(EF,q) where,
EF’ = new value of the easiness factor EF = old value of the easiness factor q = user difficulty rating (1-4) f(EF,q) = EF-0.8+0.28*q-0.02*q*q
| Parameters : |
|
|---|---|
| Returns: | int – minutes until next practice float: new easiness factor |
Calculate the inter-repetition interval
I(1):= r/2 I(2):= r for n>2 I(n):=I(n-1)*EF
| Parameters : |
|
|---|---|
| Returns: | int – days until next practice |
Simplified SM-2 spacing algorithm.
| Parameters : |
|
|---|---|
| Returns: | int – minutes until next practice float: new easiness factor |
Defines the Practice Model for keeping track of practice sessions.
Bases: django.db.models.base.Model
This model saves the learning stats of a user linked to a specific item.
The Practice model uses the django.contrib.contenttypes.models.ContentType framework to link it to a generic other object. This way, it can be used to keep track of learning progress of any other kind of model.
PK of the learnable object
ID of the learnable object
Combines the above.
Starting time of the most recent learning.
Ending time of the most recent learning.
The user who is practicing.
Calculated next time of practice.
Number of times the item has been practice by the user.
An arbitrary number roughly representing the difficulty of the item for the user.
Bases: django.core.exceptions.ObjectDoesNotExist
Bases: django.core.exceptions.MultipleObjectsReturned
Provides a generic relation to any object through content-type/object-id fields.