Hello,
i want to generate the certificate after the student pass the "vibe_quiz_passing_score " .
please let me know
is there any filter or hook avaible
Many thanks in advance
you need to run custom function to assign certificate on submit quiz hook like this . Bwlow code will work .just change the certificate id which is " 1871 ".
add_action('wplms_submit_quiz',function($quiz_id,$user_id,$answers){
$passing_score = get_post_meta($quiz_id,'vibe_quiz_passing_score',true);
$user_marks = get_post_meta($quiz_id,$user_id,true);
if(!empty($passing_score ) && isset($user_marks) && $user_marks > $passing_score){
$certificates = get_user_meta($user_id,'certificates',true);
if(empty($certificates)){
$certificates = array(1871);
}else{
$certificates[] = 1871;
}
}
});
Hello,
Is i have to add the code in the wplms-customizer.php ??
And once the student finish the course (read all unit and mark as complete) -> take quiz -> get more then the passing parameter in quiz -> assign the certificate automatically.
Is this possible with the current theme or i have to modify some filter
Thanks in advance.
Yes, you have to add this code in wplms-customizer.php file.
Yes it will work as mentioned by you, but you need to first connect the course with quiz from quiz settings. Refer :
http://prntscr.com/klimyo