How to generate the certificate after student pass the quiz

Home Forums Legacy Support Support queries Other issues How to generate the certificate after student pass the quiz

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #172561
    redspark
    Spectator
    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
    #172693
    Anshuman Sahu
    Keymaster
    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; } } });
    #173045
    redspark
    Spectator
    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.
    #173124
    Mark Morgan
    Spectator
    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  
Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘How to generate the certificate after student pass the quiz’ is closed to new replies.