Home > Welcome to Moodle > Course Settings Page > Completion Tracking (tags next to assignments) > Activity Completion: Student Must Earn Passing Grade on Quiz
These steps require that you have completion tracking enabled in your course.
Ideal for warm-up quizzes and terminology tests, where you want to encourage students to take a quiz/test until they pass it.