update_quiz: Update Quiz After Question Was Answered

View source: R/mark_words.R

update_quizR Documentation

Update Quiz After Question Was Answered

Description

After a question from a quiz was answered, the wordquiz object must be updated. This function performs the update depending on the success of the answer and the type of the quiz.

Usage

update_quiz(question, quiz, wl, success)

Arguments

question

the wordquestion object that has been quizzed.

quiz

the wordquiz from which the question was taken and which will be modified.

wl

the wordlist, on which the quiz is based.

success

logical indicating whether the question was answered correctly or not.

Details

If an wrong answer was given, the wordquiz object is returned unchanged. If the answer was correct, the word that has been quizzed is removed from the quiz.

If the quiz type is "newwords", a word is only removed from the quiz once it has reached a count of 2. Also, when a word is removed, the weights are adapted, such that an additional word is included into the quiz.


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