mark_word: Register Success or Failure for a Word in a wordlist

View source: R/mark_words.R

mark_wordR Documentation

Register Success or Failure for a Word in a wordlist

Description

After a word has been quizzed, the wordlist must be changed.

Usage

mark_word(question, quiz, wl, success)

Arguments

question

the wordquestion object that has been quizzed.

quiz

the wordquiz from which the question was taken.

wl

the wordlist, on which the quiz is based and which will be modified.

success

logical indicating whether the question was answered correctly or not.

Details

After a word has been quizzed, its entry in the wordlist must be modified. The modifications affect the columns box, count, and date that belong to the direction that was quizzed.

In case of a correct answer, count is increased by one. If the limit of counts is reached, the word is moved to the next box by increasing box by one. count is reset to zero. date, which indicates the date of the last correct answer, is set to the current date.

In case of a wrong answer, count is set to zero and the word is moved on box back by decreasing box by one. date is left unchanged.

Value

a wordlist object


stibu81/WordBox documentation built on Nov. 28, 2024, 2:29 p.m.