Requires WPLMS version 1.9.4+


a. Enable Quiz passing score in WP Admin - LMS - Settings

b. Set a passing score in Quiz settings.


c. Add this code in child theme functions.php or WPLMS customiser :


 

add_filter('wplms_quiz_retakes_left','wplms_passed_quiz_retakes',10,2);
function wplms_passed_quiz_retakes($remaining_retakes,$quiz_id){

$passing_score = get_post_meta($quiz_id,'vibe_quiz_passing_score',true);
if(isset($passing_score) && is_numeric($passing_score)){
	$user_id = get_current_user_id();
	$score = get_post_meta($quiz_id,$user_id,true);
	if($score > $passing_score){
		return 0;
	}
}
return $remaining_retakes;
}