Quiz Completion Message

Home Forums Legacy Support Support queries How-to & Troubleshooting Quiz Completion Message

Tagged: 

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #154005
    TDFsites
    Spectator
    Hello. http://hhhcare.tdfdev.us/ I am trying to customize the content shown on the quiz completion/check results page. I can't seem to figure out where to do that. All theme/plugins are up to date and I have cleared my cache multiple times. I have added the following code in the php functions file in my child theme:

    add_filter('wplms_course_marks',array($this,'wplms_course_passfail'),10,2);

    function wplms_course_passfail($marks_html,$course_id){
    $extract = explode('/',$marks_html);
    $course_marks = intval($extract[0]);
    $certificate_val = get_post_meta($course_id,'vibe_course_passing_percentage',true);
    if(isset($certificate_val) && is_numeric($certificate_val)){
    if($course_marks >= $certificate_val){
    $marks_html = 'PASS';
    }elseif($course_marks==0){
    $marks_html = 'N.A';
    }else{
    $marks_html = 'FAIL';
    }
    }
    return $marks_html;
    }

    And put the following on the /course-status/ page in the text (not visual) box: Thank you for taking the quiz. In order to have passed the quiz, you must have answered 4 of the 5 questions correctly. [pass_fail id=”768” pass="1"] Congratulations! You have passed the quiz! [/pass_fail] [pass_fail id=”768” fail="1"] Unfortunately, you have failed in the Quiz. [/pass_fail] Please advise. Credentials coming in private reply.
    #154006
    TDFsites
    Spectator
    This reply has been marked as private.
    #154089
    Mark Morgan
    Spectator
    I checked this on our test site and it is working fine. Please replace the previous code with the below given code and make sure that you have set the quiz passing marks.Pate this code in the post quiz message box. To do this please go to edit course-> set curriculum-> edit quiz-> setting. Refer: http://prntscr.com/j9i6ii [pass_fail id="495" pass="1"] Congratulations ! you have passed the quiz! [/pass_fail] To add Failng  message : [pass_fail id="495"  fail="1"] Unfortunately, you have failed in the Quiz. [/pass_fail]
    #154093
    TDFsites
    Spectator
    Thank you for your reply! I'm sorry, my edit screen doesn't look like that. Can you login to my site to check where I would put that information?
    #154101
    TDFsites
    Spectator
    This is all I see:  
    #154155
    Diana
    Participant
    @TDFsites, Refer this video: https://screencast-o-matic.com/watch/cFfTftbXmU Go to the curriculum section and in the Quiz settings > Post Quiz Message, you have to paste this shortcode
Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Quiz Completion Message’ is closed to new replies.