• Resolved yourbudweiser

    (@yourbudweiser)


    I can add quizzes for each lesson but how would I add a Final Exam (quiz) before issuing a Certificate?

    My thought was to add a section called “Final Exam” or something similar which would only include the remaining quiz.

    Please advise.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Alexander

    (@alextonio22)

    Hi @yourbudweiser ,

    I understand your concern. Yes, your idea to add a section and lesson called “Final Exam” is correct. You can include the final quiz in this lesson.

    After setting up the final exam, you can create an engagement that triggers the issuance of a certificate upon passing the final exam. Please refer to this documentation for detailed instructions on creating a certificate: How to Create a Certificate.

    Additionally, you can review this documentation on creating engagements: Engagements Overview.

    If you need further assistance, feel free to reach out.

    Thread Starter yourbudweiser

    (@yourbudweiser)

    Although the lesson is called “Final Exam” the buttons still say “Take Quiz” and “Start Quiz”. I would like to change the button text to “Take Final Exam” and “Start Fina Exam”, respectively.

    I saw the video on YouTube to change to change the button text but I am not using the block editor. Is there a filter or some other method I can use to change the button text on a specifi lesson rather than installing a plugin?

    Thread Starter yourbudweiser

    (@yourbudweiser)

    For future reference, this code works.

    // Change the button text for lessons containing 'Final Exam' in the title
    function custom_llms_quiz_button_text( $text, $quiz_id, $lesson ) {
    // Get the lesson post object using the lesson ID
    $lesson_post = get_post( $lesson->ID );

    // Check if the lesson title contains 'Final Exam' (case insensitive)
    if ( stripos( $lesson_post->post_title, 'Final Exam' ) !== false ) {
    // Change the button text
    if ( 'Take Quiz' === $text ) {
    return __( 'Take Final Exam', 'lifterlms' );
    } elseif ( 'Start Quiz' === $text ) {
    return __( 'Start Final Exam', 'lifterlms' );
    }
    }
    // Return the original text if no changes are made
    return $text;
    }
    add_filter( 'lifterlms_start_quiz_button_text', 'custom_llms_quiz_button_text', 10, 3 );

    // Function to change the button text for the 'Start Quiz' button
    function custom_llms_begin_quiz_button_text( $text, $quiz, $lesson ) {
    // Get the lesson post object using the lesson ID
    $lesson_post = get_post( $lesson->ID );

    // Check if the lesson title contains 'Final Exam' (case insensitive)
    if ( stripos( $lesson_post->post_title, 'Final Exam' ) !== false ) {
    // Change the button text
    if ( 'Start Quiz' === $text ) {
    return __( 'Start Final Exam', 'lifterlms' );
    }
    }
    // Return the original text if no changes are made
    return $text;
    }
    add_filter( 'lifterlms_begin_quiz_button_text', 'custom_llms_begin_quiz_button_text', 10, 3 );
Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.