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.
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?
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 );