Hide Correct answer and explanation till the user has passed the Quiz

Add below code snippet in your child theme – functions.php or WPLMS Customizer – wplms_customizer.php

add_filter('wplms_show_quiz_correct_answer','wplms_check_passed_quiz',10,2);
function wplms_check_passed_quiz($return,$quiz_id){
$user_id = get_current_user_id();
$marks = get_post_meta($quiz_id,$user_id,true);
if(isset($marks) && is_numeric($marks)){
    $passing_score = get_post_meta($quiz_id,'vibe_quiz_passing_score',true);
    if(is_numeric($passing_score) && $marks < $passing_score)
        return false;
}
return $return;
}