See https://github.com/woothemes/sensei-certificates/issues/73
We definitely need some kind of course completion screen, whether it's a separate page or a pop-up, which displays the certificate link and course results etc.
Not a priority currently.
I can vouch for that. I've tested it several times on our internal learning tool at A8C and it leaves a bit of a strange impression when completing the final lesson/quiz that no indication is given that the course is completed.
cc @dllh
+1 Same here, and we have at least one recent ticket 504520-zd-woothemes requesting this as well.
Some good ideas in #1487 too.
Wonder if there are any updates on this?
923489-zen
941458-zen
Any updates on this? I just launched a new course on my website. I then completed the course myself as part of the testing process. While doing so, I realized how utterly lackluster it is to complete all the lessons and pass all the quizzes.
I agree with everyone else in this conversation that this is an important addition. We built out a learning system for a client, and this final step of a course leaves both them and their customers confused. They've hit Complete Lesson on the last page, and now what?
Any progress on this? Even a developer hook would be helpful to display our own message.
1331593-zen
1741862-zen
Alright everyone! Time to put an end to 4 years of ambiguity and lack of help from Automattic. I must say that I'm disappointed that the creators of this product have not been able to put aside 10 minutes to solve a lingering issue. Extremely unprofessional. Either way. Let's get this rolling.
@jkenzer @duncanplatt
This 100% be solved with action hooks on the single-lesson.php sensei template.
See code example below:
add_action('sensei_single_lesson_content_inside_after', 'after_course_completed', 30, 1);
function after_course_completed( $lesson_id ) {
$course_id = Sensei_Lesson::get_course_id($lesson_id);
$completed_course = Sensei_Utils::user_completed_course($course_id, get_current_user_id());
if ($completed_course) :
?>
<!-- This is some HTML we could output
<div class="sensei-message tick">
The course is complete.
</div>
-->
<?php
/**
* This example will simply redirect the user somewhere else :)
*/
// wp_redirect('https://google.com/');
// exit;
endif;
}
Keep in mind that this hook executes on EACH lesson so this will need to be modified to accomplish the above mentioned scenarios. Either way, this will be a good start for all the developers in here.
Good luck!
Thank you for taking this upon yourself, @cyberpunkinteractive!
Much appreciated.
@duncanplatt anytime dood. I hope it helps!
@cyberpunkinteractive i was looking for my own solution when i stumbled across this, i have added this to the child theme functions.php with no action on completion of the course. Assuming functions.php is the correct place to add this code, i uncommented the redirection and i am sending them to the /my-courses/ page so they can see the course is completed and download the certificate.
looking through the API Docs, it appears none of this has been depreciated. i assume this is the same action that triggers the course completion email?
you would think a company that creates an LMS would have better documentation!!!!
Thanks!
Sean
An alternate snippet to the above is the following, where the redirect sends the user to the course archive page:
function redirect_on_course_completed( $status ) {
if ( 'complete' === $status ) {
wp_safe_redirect( Sensei_Course::get_courses_page_url() );
}
}
add_action( 'sensei_course_status_updated', 'redirect_on_course_completed' );
Note that the above snippet does not work in the case where a quiz exists on the final lesson of the course, but does work when the user clicks the _Complete Lesson_ button on the final lesson page.
We recommend using the Code Snippets plugin instead of adding it directly to functions.php, so that your changes aren't lost when the theme is updated.
Different course creators may wish to display different information to learners after they complete a course. Given this, the most flexible solution would be to add a new course completion page that would work similarly to the existing course archive and _My Courses_ pages. That is, the page would be automatically generated by the setup wizard and be configurable in the settings:

This page could be customized to include any or all of the following information as blocks:
Some of these blocks, like course results, would be native to Sensei LMS. Things like a feedback or course evaluation form would not be included in Sensei, but could be integrated fairly easily using third party plugins (e.g. Jetpack forms).
Creating smart default page layouts using block templates or block patterns would provide a good starting point for a course completion page, while still allowing the freedom and flexibility to customize as needed.
Feel free to add comments about any other blocks you'd like to have available on this page, or your thoughts on the proposed approach.
i think this is a viable solution, i believe as long as there was a way to select a course/quiz completion page, adding sensei shortcodes on that page would accomplish most everything needed from sensei not in your list.
as we discussed, the issue with the above code is triggered by "clicking the Complete Lesson button, which does perform the redirect. The problem with redirecting after a quiz is that the redirect can't be performed because that page has already refreshed itself by the time the snippet is run." so in my case it would need to forward to a completion page when the last quiz in the course is completed.
im happy to help with testing when the time comes.
Sean
Most helpful comment
I can vouch for that. I've tested it several times on our internal learning tool at A8C and it leaves a bit of a strange impression when completing the final lesson/quiz that no indication is given that the course is completed.
cc @dllh