LifterLMS WPForms: Required Lesson Forms and Custom Sign-Up
Set up the LifterLMS WPForms add-on to require lesson forms and replace registration forms, understand what WPForms Lite and Pro change, and use…
Read articleH5P lets you build interactive content without coding: interactive videos with questions inside them, drag and drop exercises, flashcards, branching scenarios, image hotspots and dozens more. It is free, open source and runs as a WordPress plugin, which makes it a natural partner for LifterLMS lessons.
The catch is that LifterLMS and H5P do not talk to each other out of the box. You can embed H5P in a lesson in minutes, but LifterLMS will not know whether the student finished or passed it. This guide shows how to add H5P to LifterLMS lessons and the three ways to connect H5P results to lesson completion, from no code to a small custom plugin.
It is for instructional designers and course creators who want richer lessons, and for developers asked to make "the lesson completes when the activity is passed" work.
LifterLMS has a capable quiz engine, and with the Advanced Quizzes add-on it covers many question types. Quizzes are graded, stored in the student's record, appear in reporting and can be required to pass a lesson. Use them for assessments that count.
H5P is better for practice and engagement inside the lesson:
A good pattern is H5P for learning activities within lessons and LifterLMS quizzes for the graded check at the end of each module. Our guide on creating quizzes in LifterLMS covers the assessment side.
Most H5P content types are responsive, but not all are equally pleasant on a phone. Drag and drop tasks with small targets and long course presentations are hard to use on a small screen. Check your analytics for the share of students on mobile and test each activity there. H5P publishes accessibility information for its content types; if your organization has accessibility requirements, choose types documented as accessible and add a text alternative where an activity relies on images or audio.
[h5p id="12"], from the H5P content list.Because the activity sits in lesson content, only enrolled students can use it, unless you mark the lesson as a Free Lesson. If you use LifterLMS focus mode, test it there as well, and keep LifterLMS up to date; version 10.2.1 fixed interactive blocks not working in focus mode.
In the H5P plugin settings, enable Log results for signed in users under User Results. H5P then stores each logged-in user's score in its own h5p_results database table when they finish an activity. You can also enable Save Content State so students can resume long activities. Everything in the next sections depends on result logging.
| Approach | Effort | What LifterLMS knows | Best for |
|---|---|---|---|
| Embed only | Minutes | Nothing; student clicks Mark Complete | Practice activities |
| Minimum time | Minutes | Time spent on the lesson | Making sure students do not skip |
| xAPI with GrassBlade | Hours, paid plugins | Completion and score, plus an LRS | Organizations already using xAPI or SCORM |
| Small custom plugin | A day of development | Pass or fail per activity; lesson completes on pass | "Pass the activity to complete the lesson" |
For practice activities this is enough. The student works through the H5P task and clicks Mark Complete. Add a line above the button such as "Finish the activity above before you continue."
Since version 10.1, LifterLMS can require a minimum time on a lesson. Turn on Enable Minimum Time in the lesson settings and set hours, minutes and seconds; Mark Complete stays unavailable until the time is reached. It does not prove the activity was passed, but it stops students clicking through. See LifterLMS lesson time tracking.
The free "Experience API for LifterLMS" plugin by Next Software Solutions works with their paid GrassBlade xAPI Companion plugin. It supports H5P among other content types, can complete a lesson when the xAPI content is completed, and can restrict progress until then. Detailed results go to a Learning Record Store (GrassBlade's LRS or another). It is the right route when you also need SCORM or xAPI packages; our guide to SCORM and xAPI with LifterLMS covers it.
When you want "pass this H5P activity to complete the lesson" without an LRS, a small plugin joins the two systems. It uses three real hooks:
h5p_alter_user_result, an action in the H5P plugin that fires when a result is saved, with the score data, the result ID, the content ID and the user ID.llms_trigger_lesson_completion, the LifterLMS action that completes a lesson through the normal checks, including quizzes and minimum time.llms_allow_lesson_completion, the LifterLMS filter that decides whether a lesson may be completed.<?php
/**
* Map H5P content IDs to LifterLMS lesson IDs and the score needed to pass.
*/
function llmsx_h5p_map() {
return array(
12 => array( 'lesson' => 345, 'pass' => 0.8 ), // 80% on H5P item 12 completes lesson 345.
);
}
function llmsx_h5p_for_lesson( $lesson_id ) {
foreach ( llmsx_h5p_map() as $content_id => $rule ) {
if ( (int) $rule['lesson'] === (int) $lesson_id ) {
return (int) $content_id;
}
}
return 0;
}
// 1. Record a pass when H5P saves a result, then try to complete the lesson.
add_action( 'h5p_alter_user_result', 'llmsx_h5p_result_saved', 10, 4 );
function llmsx_h5p_result_saved( $data, $result_id, $content_id, $user_id ) {
$map = llmsx_h5p_map();
if ( empty( $map[ $content_id ] ) || ! $user_id || empty( $data['max_score'] ) ) {
return;
}
$rule = $map[ $content_id ];
if ( ( $data['score'] / $data['max_score'] ) < $rule['pass'] ) {
return;
}
update_user_meta( $user_id, '_llmsx_h5p_passed_' . $content_id, time() );
if ( ! llms_is_complete( $user_id, $rule['lesson'], 'lesson' ) ) {
do_action( 'llms_trigger_lesson_completion', $user_id, $rule['lesson'], 'h5p_' . $content_id );
}
}
// 2. Block manual completion until the activity has been passed.
add_filter( 'llms_allow_lesson_completion', 'llmsx_h5p_require_pass', 20, 4 );
function llmsx_h5p_require_pass( $allow, $user_id, $lesson_id, $trigger ) {
$content_id = llmsx_h5p_for_lesson( $lesson_id );
if ( ! $allow || ! $content_id || 0 === strpos( (string) $trigger, 'admin_' ) ) {
return $allow;
}
return (bool) get_user_meta( $user_id, '_llmsx_h5p_passed_' . $content_id, true );
}
// 3. Hide the Mark Complete button until then.
add_filter( 'llms_show_mark_complete_button', 'llmsx_h5p_hide_button', 10, 2 );
function llmsx_h5p_hide_button( $show, $lesson ) {
$content_id = llmsx_h5p_for_lesson( $lesson->get( 'id' ) );
if ( $show && $content_id ) {
$show = (bool) get_user_meta( get_current_user_id(), '_llmsx_h5p_passed_' . $content_id, true );
}
return $show;
}
admin_ and are let through.llms_trigger_lesson_completion, LifterLMS's quiz and minimum time rules still apply, and engagements, webhooks and course completion fire as normal.Test it on staging with a student account, and confirm that H5P result logging is on, or nothing will fire. Our hooks and filters guide explains where to put code like this so updates do not remove it.
h5p_results table or H5P's results screen for what the activity actually reports.You can embed H5P in any lesson with the H5P plugin's shortcode. Linking H5P results to LifterLMS completion needs an xAPI plugin such as GrassBlade, or a small custom plugin.
The H5P WordPress plugin and its content types are free and open source.
For practice, yes. For graded assessments that should appear in LifterLMS reporting and grades, use LifterLMS quizzes.
Not with the custom plugin approach, which uses H5P's own results table. You need an LRS for the xAPI route.
Start with one interactive video in a high-drop-off lesson and see whether completion improves. If students skip it, add minimum time. If passing the activity must gate progress, use the custom approach above or the xAPI route.
We build lesson-level integrations like this, with author-friendly settings so you are not editing code for each lesson. See our LifterLMS plugin development service or tell us which activities you want to track.
References: the H5P plugin on WordPress.org and Experience API for LifterLMS.
Set up the LifterLMS WPForms add-on to require lesson forms and replace registration forms, understand what WPForms Lite and Pro change, and use…
Read article
LifterLMS does not import SCORM packages natively. Here is what SCORM and xAPI support looks like with third-party plugins, what you gain and lose…
Read article
A practical comparison of LifterLMS video hosting options: YouTube, Vimeo, Bunny Stream, Wistia and self-hosting. Privacy, cost model, completion…
Read articleSkip the trial and error. Get specialist LifterLMS help and ship faster.