When a student fails, he is required to take the quizz again

Hello, how can I make it so that students who failed a quiz (got less than 80% of the questions correct) are required to retake it?

Use the course assessment extension, and in the behavior section enable ‘Allow assessment retakes?’ (and bear in mind the adjacent related settings in the same section - should be self-explanatory)