learnr- track student performance on multiple choice questions

I'm using learnr to make multiple choice questions, as shown below:

          answer(ques_1_ans_4, correct = TRUE))

I'd like to check what proportion of questions the students answered correctly, and if the student's proportion of correct answers does not exceed 50%, I'd like to make them repeat the set of questions from the beginning.

Does learnr have a variable that tracks student performance on question and can you form a conditional statement such as this:

if (student_performance < 0.50) {
   #make student redo question