View Source Memorex.Scheduler.CardReviewer (Memorex v0.2.4)
Memorex.Scheduler.CardReviewer
is used by the MemorexWeb.ReviewLive
Live View to review cards. Meorex.Domain.Card
s
are answered, and in the process Memorex.Domain.CardLog
s are created.
Note that in contrast to Memorex.Scheduler.CardStateMachine
, Memorex.Scheduler.CardReviewer
writes content to
the database (the updated Memorex.Domain.Card
, along with the Memorex.Domain.CardLog
.)
Link to this section Summary
Functions
Answers a Memorex.Domain.Card
, and updates it in the database (note no Memorex.Domain.CardLog
is created)
Answers a Memorex.Domain.Card
, and updates it in the database (and also creates a Memorex.Domain.CardLog
)
Computes the time to answer this card. Note that the time to answer is bracketed by :min_time_to_answer
and
:max_time_to_answer
on Memorex.Scheduler.Config
. The thought is that if you walk away from the computer when
drilling, the stored time_to_answer
will be stored as at most :max_time_to_answer
.
Link to this section Functions
@spec answer_card( Memorex.Domain.Card.t(), Memorex.Domain.Card.answer_choice(), DateTime.t(), Memorex.Scheduler.Config.t() ) :: Memorex.Domain.Card.t()
Answers a Memorex.Domain.Card
, and updates it in the database (note no Memorex.Domain.CardLog
is created)
answer_card_and_create_log_entry(card_before, answer, start_time, time_now, config)
View Source@spec answer_card_and_create_log_entry( Memorex.Domain.Card.t(), Memorex.Domain.Card.answer_choice(), DateTime.t(), DateTime.t(), Memorex.Scheduler.Config.t() ) :: {Memorex.Domain.Card.t(), Memorex.Domain.CardLog.t()}
Answers a Memorex.Domain.Card
, and updates it in the database (and also creates a Memorex.Domain.CardLog
)
@spec bracket_time_to_answer(Timex.Duration.t(), Memorex.Scheduler.Config.t()) :: Timex.Duration.t()
@spec time_to_answer(DateTime.t(), DateTime.t(), Memorex.Scheduler.Config.t()) :: Timex.Duration.t()
Computes the time to answer this card. Note that the time to answer is bracketed by :min_time_to_answer
and
:max_time_to_answer
on Memorex.Scheduler.Config
. The thought is that if you walk away from the computer when
drilling, the stored time_to_answer
will be stored as at most :max_time_to_answer
.