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.Cards are answered, and in the process Memorex.Domain.CardLogs 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)

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

Link to this function

answer_card(card_before, answer, time_now, config)

View Source

Answers a Memorex.Domain.Card, and updates it in the database (note no Memorex.Domain.CardLog is created)

Link to this function

answer_card_and_create_log_entry(card_before, answer, start_time, time_now, config)

View Source

Answers a Memorex.Domain.Card, and updates it in the database (and also creates a Memorex.Domain.CardLog)

Link to this function

bracket_time_to_answer(time_to_answer, config)

View Source
@spec bracket_time_to_answer(Timex.Duration.t(), Memorex.Scheduler.Config.t()) ::
  Timex.Duration.t()
Link to this function

time_to_answer(start_time, end_time, config)

View Source

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.